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

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

Issue 2094563002: [wasm] Complete separation of compilation and instantiation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Incorporated Feedback Created 4 years, 6 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 1f758bb8535dcf5ec316210a4a2b70829aa35aa9..eb1de83dcdf0450088baf53e9e93e5425e40fad4 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -186,10 +186,9 @@ class TestingModule : public ModuleEnv {
Handle<JSFunction> jsfunc = Handle<JSFunction>::cast(v8::Utils::OpenHandle(
*v8::Local<v8::Function>::Cast(CompileRun(source))));
uint32_t index = AddFunction(sig, Handle<Code>::null());
- WasmName module_name = ArrayVector("test");
- WasmName function_name;
- Handle<Code> code = CompileWasmToJSWrapper(isolate_, jsfunc, sig,
- module_name, function_name);
+ Handle<Code> code =
+ CompileWasmToJSWrapper(isolate_, jsfunc, sig, index,
+ Handle<String>::null(), Handle<String>::null());
instance->function_code[index] = code;
return index;
}
@@ -200,8 +199,10 @@ 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());
- return compiler::CompileJSToWasmWrapper(isolate_, this, name, code,
- module_object, index);
+ Handle<JSFunction> ret =
+ compiler::CompileJSToWasmWrapper(isolate_, this, name, code, index);
+ ret->SetInternalField(0, *module_object);
+ return ret;
}
void SetFunctionCode(uint32_t index, Handle<Code> code) {
« 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