Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: test/cctest/wasm/wasm-run-utils.h

Issue 2134593002: [wasm] cloning compiled module before instantiation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [wasm] cloning compiled module before instantiation Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index ccd039a94984b53876722a86b161508dc071a1ec..9b1eac2eb5837f90b872beffdf96d3005f9307ee 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -207,9 +207,12 @@ class TestingModule : public ModuleEnv {
Handle<JSObject> module_object = Handle<JSObject>(0, isolate_);
Handle<Code> code = instance->function_code[index];
WasmJs::InstallWasmFunctionMap(isolate_, isolate_->native_context());
- Handle<JSFunction> ret =
- compiler::CompileJSToWasmWrapper(isolate_, this, name, code, index);
- ret->SetInternalField(0, *module_object);
+ Handle<Code> ret_code =
+ compiler::CompileJSToWasmWrapper(isolate_, this, code, index);
+ Handle<JSFunction> ret = WrapExportCodeAsJSFunction(
+ isolate_, ret_code, name,
+ static_cast<int>(this->module->functions[index].sig->parameter_count()),
+ module_object);
return ret;
}
@@ -238,6 +241,7 @@ class TestingModule : public ModuleEnv {
*instance->function_code[function_index]);
}
}
+
WasmFunction* GetFunctionAt(int index) { return &module_.functions[index]; }
WasmInterpreter* interpreter() { return interpreter_; }
« no previous file with comments | « src/wasm/wasm-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698