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

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

Issue 2168183002: [wasm] Adding a convolution matrix filter test to highlight the performance advantages of JITing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Removed unnecessary changes 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 | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/ast-decoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-wasm.cc
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc
index c883fb7e1a94fee7c4c064a8e1e64bd4e270e6bd..b55acf1b33fd70e8c23a1a4035682296288282c3 100644
--- a/src/runtime/runtime-wasm.cc
+++ b/src/runtime/runtime-wasm.cc
@@ -152,11 +152,18 @@ RUNTIME_FUNCTION(Runtime_JITSingleFunction) {
Handle<JSArrayBuffer> mem_buffer = Handle<JSArrayBuffer>::cast(obj);
- wasm::WasmModule module(reinterpret_cast<byte*>(mem_buffer->backing_store()));
wasm::ErrorThrower thrower(isolate, "JITSingleFunction");
+ wasm::WasmModule module(reinterpret_cast<byte*>(mem_buffer->backing_store()));
+ wasm::WasmModuleInstance instance(&module);
+ instance.context = isolate->native_context();
+ instance.mem_size =
+ static_cast<uint32_t>(mem_buffer->byte_length()->Number());
+ instance.mem_start = reinterpret_cast<byte*>(mem_buffer->backing_store());
+ instance.globals_start = nullptr;
+
wasm::ModuleEnv module_env;
module_env.module = &module;
- module_env.instance = nullptr;
+ module_env.instance = &instance;
module_env.origin = wasm::kWasmOrigin;
uint32_t signature_size = args.length() - fixed_args;
« no previous file with comments | « no previous file | src/wasm/ast-decoder.cc » ('j') | src/wasm/ast-decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698