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

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

Issue 1742073002: [wasm] Properly plumb the origin of the WASM module from asm.js translation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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.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 f2f39cf56bde8f5c537c5833bc687394ff70a8ea..7784eb444b0aa44515fa1b726867ff601465598c 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -278,6 +278,7 @@ WasmModule::WasmModule()
mem_export(false),
mem_external(false),
start_function_index(-1),
+ origin(kWasmOrigin),
globals(nullptr),
signatures(nullptr),
functions(nullptr),
@@ -389,7 +390,7 @@ MaybeHandle<JSObject> WasmModule::Instantiate(Isolate* isolate,
module_env.module = this;
module_env.instance = &instance;
module_env.linker = &linker;
- module_env.asm_js = false;
+ module_env.origin = origin;
if (import_table->size() > 0) {
instance.import_code = &import_code;
@@ -538,8 +539,8 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
Zone zone;
// Decode the module, but don't verify function bodies, since we'll
// be compiling them anyway.
- ModuleResult result =
- DecodeWasmModule(isolate, &zone, module_start, module_end, false, false);
+ ModuleResult result = DecodeWasmModule(isolate, &zone, module_start,
+ module_end, false, kWasmOrigin);
if (result.failed()) {
// Module verification failed. throw.
std::ostringstream str;
@@ -579,7 +580,7 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, WasmModule* module) {
module_env.module = module;
module_env.instance = &instance;
module_env.linker = &linker;
- module_env.asm_js = false;
+ module_env.origin = module->origin;
// Compile all functions.
Handle<Code> main_code = Handle<Code>::null(); // record last code.
« no previous file with comments | « src/wasm/wasm-module.h ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698