5 #ifndef V8_WASM_COMPILATION_ENVIRONMENT_H_ 6 #define V8_WASM_COMPILATION_ENVIRONMENT_H_ 8 #include "src/wasm/wasm-limits.h" 9 #include "src/wasm/wasm-module.h" 18 enum RuntimeExceptionSupport :
bool {
19 kRuntimeExceptionSupport =
true,
20 kNoRuntimeExceptionSupport =
false 23 enum UseTrapHandler :
bool { kUseTrapHandler =
true, kNoTrapHandler =
false };
25 enum LowerSimd :
bool { kLowerSimd =
true, kNoLowerSimd =
false };
35 const UseTrapHandler use_trap_handler;
40 const RuntimeExceptionSupport runtime_exception_support;
44 const uint64_t min_memory_size;
48 const uint64_t max_memory_size;
50 const LowerSimd lower_simd;
53 UseTrapHandler use_trap_handler,
54 RuntimeExceptionSupport runtime_exception_support,
55 LowerSimd lower_simd = kNoLowerSimd)
57 use_trap_handler(use_trap_handler),
58 runtime_exception_support(runtime_exception_support),
59 min_memory_size(module ? module->initial_pages * uint64_t{kWasmPageSize}
61 max_memory_size((module && module->has_maximum_pages
62 ? module->maximum_pages
63 : kV8MaxWasmMemoryPages) *
64 uint64_t{kWasmPageSize}),
65 lower_simd(lower_simd) {}
86 void SetWireBytesStorage(std::shared_ptr<WireBytesStorage>);
88 std::shared_ptr<WireBytesStorage> GetWireBytesStorage();
101 #endif // V8_WASM_COMPILATION_ENVIRONMENT_H_