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

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

Issue 2320723005: [wasm] Compilation/Instantiation pipeline works off module object (Closed)
Patch Set: rebase Created 4 years, 3 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.h ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 18f6e9ed362d87812f9a5f92c45e063e0a52ce51..7d910a3a25e61b9f97ca001379affabfc9de7ef0 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1371,14 +1371,17 @@ Handle<FixedArray> CloneModuleForInstance(Isolate* isolate,
// * installs a named property "memory" for that buffer if exported
// * installs named properties on the object for exported functions
// * compiles wasm code to machine code
-MaybeHandle<JSObject> WasmModule::Instantiate(
- Isolate* isolate, Handle<FixedArray> compiled_module,
- Handle<JSReceiver> ffi, Handle<JSArrayBuffer> memory) {
+MaybeHandle<JSObject> WasmModule::Instantiate(Isolate* isolate,
+ Handle<JSObject> module_object,
+ Handle<JSReceiver> ffi,
+ Handle<JSArrayBuffer> memory) {
HistogramTimerScope wasm_instantiate_module_time_scope(
isolate->counters()->wasm_instantiate_module_time());
ErrorThrower thrower(isolate, "WasmModule::Instantiate()");
Factory* factory = isolate->factory();
+ Handle<FixedArray> compiled_module =
+ handle(FixedArray::cast(module_object->GetInternalField(0)));
compiled_module = CloneModuleForInstance(isolate, compiled_module);
// These fields are compulsory.
« no previous file with comments | « src/wasm/wasm-module.h ('k') | test/cctest/wasm/test-run-wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698