| Index: src/wasm/wasm-module.h
|
| diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
|
| index ffb02bb8f41d4d9329165dd6141919e8447cb064..cd237566bfec1aecfc8e943a3ab8e9a1959fafb8 100644
|
| --- a/src/wasm/wasm-module.h
|
| +++ b/src/wasm/wasm-module.h
|
| @@ -28,7 +28,6 @@ class WasmMemoryObject;
|
|
|
| namespace compiler {
|
| class CallDescriptor;
|
| -class WasmCompilationUnit;
|
| }
|
|
|
| namespace wasm {
|
| @@ -217,18 +216,6 @@ struct V8_EXPORT_PRIVATE WasmModule {
|
| ~WasmModule() {
|
| if (owned_zone) delete owned_zone;
|
| }
|
| -
|
| - // Creates a new instantiation of the module in the given isolate.
|
| - static MaybeHandle<WasmInstanceObject> Instantiate(
|
| - Isolate* isolate, ErrorThrower* thrower,
|
| - Handle<WasmModuleObject> wasm_module, Handle<JSReceiver> ffi,
|
| - Handle<JSArrayBuffer> memory = Handle<JSArrayBuffer>::null());
|
| -
|
| - MaybeHandle<WasmCompiledModule> CompileFunctions(
|
| - Isolate* isolate, Handle<Managed<WasmModule>> module_wrapper,
|
| - ErrorThrower* thrower, const ModuleWireBytes& wire_bytes,
|
| - Handle<Script> asm_js_script,
|
| - Vector<const byte> asm_js_offset_table_bytes) const;
|
| };
|
|
|
| typedef Managed<WasmModule> WasmModuleWrapper;
|
| @@ -359,6 +346,7 @@ struct V8_EXPORT_PRIVATE ModuleEnv {
|
| return instance->function_code[index];
|
| }
|
|
|
| + // TODO(titzer): move these into src/compiler/wasm-compiler.cc
|
| static compiler::CallDescriptor* GetWasmCallDescriptor(Zone* zone,
|
| FunctionSig* sig);
|
| static compiler::CallDescriptor* GetI32WasmCallDescriptor(
|
| @@ -425,11 +413,6 @@ V8_EXPORT_PRIVATE Handle<JSArray> GetCustomSections(
|
| Isolate* isolate, Handle<WasmModuleObject> module, Handle<String> name,
|
| ErrorThrower* thrower);
|
|
|
| -V8_EXPORT_PRIVATE bool ValidateModuleBytes(Isolate* isolate, const byte* start,
|
| - const byte* end,
|
| - ErrorThrower* thrower,
|
| - ModuleOrigin origin);
|
| -
|
| // Get the offset of the code of a function within a module.
|
| int GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module,
|
| int func_index);
|
| @@ -464,15 +447,43 @@ void UpdateDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
|
| void GrowDispatchTables(Isolate* isolate, Handle<FixedArray> dispatch_tables,
|
| uint32_t old_size, uint32_t count);
|
|
|
| -namespace testing {
|
| +//============================================================================
|
| +//== Compilation and instantiation ===========================================
|
| +//============================================================================
|
| +V8_EXPORT_PRIVATE bool SyncValidate(Isolate* isolate, ErrorThrower* thrower,
|
| + const ModuleWireBytes& bytes);
|
| +
|
| +V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> SyncCompileTranslatedAsmJs(
|
| + Isolate* isolate, ErrorThrower* thrower, const ModuleWireBytes& bytes,
|
| + Handle<Script> asm_js_script, Vector<const byte> asm_js_offset_table_bytes);
|
| +
|
| +V8_EXPORT_PRIVATE MaybeHandle<WasmModuleObject> SyncCompile(
|
| + Isolate* isolate, ErrorThrower* thrower, const ModuleWireBytes& bytes);
|
| +
|
| +V8_EXPORT_PRIVATE MaybeHandle<WasmInstanceObject> SyncInstantiate(
|
| + Isolate* isolate, ErrorThrower* thrower,
|
| + Handle<WasmModuleObject> module_object, MaybeHandle<JSReceiver> imports,
|
| + MaybeHandle<JSArrayBuffer> memory);
|
|
|
| +V8_EXPORT_PRIVATE void AsyncCompile(Isolate* isolate, Handle<JSPromise> promise,
|
| + const ModuleWireBytes& bytes);
|
| +
|
| +V8_EXPORT_PRIVATE void AsyncInstantiate(Isolate* isolate,
|
| + Handle<JSPromise> promise,
|
| + Handle<WasmModuleObject> module_object,
|
| + MaybeHandle<JSReceiver> imports);
|
| +
|
| +V8_EXPORT_PRIVATE void AsyncCompileAndInstantiate(
|
| + Isolate* isolate, Handle<JSPromise> promise, const ModuleWireBytes& bytes,
|
| + MaybeHandle<JSReceiver> imports);
|
| +
|
| +namespace testing {
|
| void ValidateInstancesChain(Isolate* isolate,
|
| Handle<WasmModuleObject> module_obj,
|
| int instance_count);
|
| void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
|
| void ValidateOrphanedInstance(Isolate* isolate,
|
| Handle<WasmInstanceObject> instance);
|
| -
|
| } // namespace testing
|
| } // namespace wasm
|
| } // namespace internal
|
|
|