| Index: src/wasm/wasm-module.h
|
| diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
|
| index 2ad46e21b62b020a3252206504fd30339b5cdc3c..e22c4570274a7581dc629bb11c814ea1fb3a7022 100644
|
| --- a/src/wasm/wasm-module.h
|
| +++ b/src/wasm/wasm-module.h
|
| @@ -22,6 +22,7 @@ namespace internal {
|
| class WasmCompiledModule;
|
| class WasmDebugInfo;
|
| class WasmModuleObject;
|
| +class WasmInstanceObject;
|
|
|
| namespace compiler {
|
| class CallDescriptor;
|
| @@ -255,11 +256,9 @@ struct V8_EXPORT_PRIVATE WasmModule {
|
| }
|
|
|
| // Creates a new instantiation of the module in the given isolate.
|
| - static MaybeHandle<JSObject> Instantiate(Isolate* isolate,
|
| - ErrorThrower* thrower,
|
| - Handle<JSObject> wasm_module,
|
| - Handle<JSReceiver> ffi,
|
| - Handle<JSArrayBuffer> memory);
|
| + static MaybeHandle<WasmInstanceObject> Instantiate(
|
| + Isolate* isolate, ErrorThrower* thrower, Handle<JSObject> wasm_module,
|
| + Handle<JSReceiver> ffi, Handle<JSArrayBuffer> memory);
|
|
|
| MaybeHandle<WasmCompiledModule> CompileFunctions(
|
| Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper,
|
| @@ -370,13 +369,6 @@ Handle<WasmDebugInfo> GetDebugInfo(Handle<JSObject> wasm);
|
| // Return the number of functions in the given wasm object.
|
| int GetNumberOfFunctions(Handle<JSObject> wasm);
|
|
|
| -// Create and export JSFunction
|
| -Handle<JSFunction> WrapExportCodeAsJSFunction(Isolate* isolate,
|
| - Handle<Code> export_code,
|
| - Handle<String> name,
|
| - FunctionSig* sig, int func_index,
|
| - Handle<JSObject> instance);
|
| -
|
| // Check whether the given object represents a WebAssembly.Instance instance.
|
| // This checks the number and type of internal fields, so it's not 100 percent
|
| // secure. If it turns out that we need more complete checks, we could add a
|
| @@ -422,25 +414,28 @@ bool GetPositionInfo(Handle<WasmCompiledModule> compiled_module,
|
| // Assumed to be called with a code object associated to a wasm module instance.
|
| // Intended to be called from runtime functions.
|
| // Returns nullptr on failing to get owning instance.
|
| -Object* GetOwningWasmInstance(Code* code);
|
| +WasmInstanceObject* GetOwningWasmInstance(Code* code);
|
|
|
| -MaybeHandle<JSArrayBuffer> GetInstanceMemory(Isolate* isolate,
|
| - Handle<JSObject> instance);
|
| +MaybeHandle<JSArrayBuffer> GetInstanceMemory(
|
| + Isolate* isolate, Handle<WasmInstanceObject> instance);
|
|
|
| -int32_t GetInstanceMemorySize(Isolate* isolate, Handle<JSObject> instance);
|
| +int32_t GetInstanceMemorySize(Isolate* isolate,
|
| + Handle<WasmInstanceObject> instance);
|
|
|
| -int32_t GrowInstanceMemory(Isolate* isolate, Handle<JSObject> instance,
|
| - uint32_t pages);
|
| +int32_t GrowInstanceMemory(Isolate* isolate,
|
| + Handle<WasmInstanceObject> instance, uint32_t pages);
|
|
|
| void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
|
| int index, Handle<JSFunction> js_function);
|
|
|
| namespace testing {
|
|
|
| -void ValidateInstancesChain(Isolate* isolate, Handle<JSObject> wasm_module,
|
| +void ValidateInstancesChain(Isolate* isolate,
|
| + Handle<WasmModuleObject> module_obj,
|
| int instance_count);
|
| -void ValidateModuleState(Isolate* isolate, Handle<JSObject> wasm_module);
|
| -void ValidateOrphanedInstance(Isolate* isolate, Handle<JSObject> instance);
|
| +void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
|
| +void ValidateOrphanedInstance(Isolate* isolate,
|
| + Handle<WasmInstanceObject> instance);
|
|
|
| } // namespace testing
|
| } // namespace wasm
|
|
|