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

Unified Diff: src/wasm/wasm-js.cc

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/signature.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-js.cc
diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc
index 6dc14952a01e943b8bd5a9fc012c8d648c59dbae..fa9edf4d491f9c3e95c2ecd1808513c777d0c2b5 100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -192,9 +192,14 @@ i::MaybeHandle<i::JSObject> InstantiateModuleCommon(
memory = i::Handle<i::JSArrayBuffer>(i::JSArrayBuffer::cast(*mem_obj));
}
- object = result.val->Instantiate(isolate, ffi, memory);
- if (!object.is_null()) {
- args.GetReturnValue().Set(v8::Utils::ToLocal(object.ToHandleChecked()));
+ i::MaybeHandle<i::FixedArray> compiled_module =
+ result.val->CompileFunctions(isolate);
+ if (!compiled_module.is_null()) {
+ object = i::wasm::WasmModule::Instantiate(
+ isolate, compiled_module.ToHandleChecked(), ffi, memory);
+ if (!object.is_null()) {
+ args.GetReturnValue().Set(v8::Utils::ToLocal(object.ToHandleChecked()));
+ }
}
}
« no previous file with comments | « src/signature.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698