5#ifndef V8_WASM_WASM_JS_H_
6#define V8_WASM_WASM_JS_H_
8#if !V8_ENABLE_WEBASSEMBLY
9#error This header should only be included if WebAssembly is enabled.
19class FunctionCallbackInfo;
26class CompilationResultResolver;
27class StreamingDecoder;
30 Isolate*, std::shared_ptr<wasm::CompilationResultResolver>);
32#define WASM_JS_EXTERNAL_REFERENCE_LIST(V) \
33 V(WebAssemblyCompile) \
34 V(WebAssemblyException) \
35 V(WebAssemblyExceptionGetArg) \
36 V(WebAssemblyExceptionIs) \
37 V(WebAssemblyGlobal) \
38 V(WebAssemblyGlobalGetValue) \
39 V(WebAssemblyGlobalSetValue) \
40 V(WebAssemblyGlobalValueOf) \
41 V(WebAssemblyInstance) \
42 V(WebAssemblyInstanceGetExports) \
43 V(WebAssemblyInstantiate) \
44 V(WebAssemblyMemory) \
45 V(WebAssemblyMemoryMapDescriptor) \
46 V(WebAssemblyMemoryGetBuffer) \
47 V(WebAssemblyMemoryGrow) \
48 V(WebAssemblyMemoryMapDescriptorMap) \
49 V(WebAssemblyMemoryMapDescriptorUnmap) \
50 V(WebAssemblyMemoryToFixedLengthBuffer) \
51 V(WebAssemblyMemoryToResizableBuffer) \
52 V(WebAssemblyModule) \
53 V(WebAssemblyModuleCustomSections) \
54 V(WebAssemblyModuleExports) \
55 V(WebAssemblyModuleImports) \
57 V(WebAssemblyTableGet) \
58 V(WebAssemblyTableGetLength) \
59 V(WebAssemblyTableGrow) \
60 V(WebAssemblyTableSet) \
62 V(WebAssemblySuspending) \
63 V(WebAssemblyValidate)
65#define DECL_WASM_JS_EXTERNAL_REFERENCE(Name) \
66 V8_EXPORT_PRIVATE void Name(const v8::FunctionCallbackInfo<v8::Value>& info);
68#undef DECL_WASM_JS_EXTERNAL_REFERENCE
static V8_EXPORT_PRIVATE void InstallModule(Isolate *isolate, DirectHandle< JSObject > webassembly)
static V8_EXPORT_PRIVATE bool InstallJSPromiseIntegration(Isolate *isolate, DirectHandle< NativeContext > context, DirectHandle< JSObject > webassembly)
static V8_EXPORT_PRIVATE void Install(Isolate *isolate)
static V8_EXPORT_PRIVATE bool InstallTypeReflection(Isolate *isolate, DirectHandle< NativeContext > context, DirectHandle< JSObject > webassembly)
static V8_EXPORT_PRIVATE void InstallMemoryControl(Isolate *isolate, DirectHandle< NativeContext > context, DirectHandle< JSObject > webassembly)
static V8_EXPORT_PRIVATE void InstallConditionalFeatures(Isolate *isolate, DirectHandle< NativeContext > context)
static V8_EXPORT_PRIVATE void InstallResizableBufferIntegration(Isolate *isolate, DirectHandle< NativeContext > context, DirectHandle< JSObject > webassembly)
static V8_EXPORT_PRIVATE void PrepareForSnapshot(Isolate *isolate)
std::unique_ptr< WasmStreaming > StartStreamingForTesting(Isolate *isolate, std::shared_ptr< wasm::CompilationResultResolver > resolver)
#define V8_EXPORT_PRIVATE
#define WASM_JS_EXTERNAL_REFERENCE_LIST(V)
#define DECL_WASM_JS_EXTERNAL_REFERENCE(Name)