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

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

Issue 1697723002: Add command line flags to dump asm.js -> wasm conversion data. (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/flag-definitions.h ('k') | no next file » | 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 663e4b56b1b07975b61aba64a7e7d67ef7fde33a..62a2676032e5096f63921605205d403795a85666 100644
--- a/src/wasm/wasm-js.cc
+++ b/src/wasm/wasm-js.cc
@@ -126,6 +126,15 @@ v8::internal::wasm::WasmModuleIndex* TranslateAsmModule(
auto module = v8::internal::wasm::AsmWasmBuilder(
info->isolate(), info->zone(), info->literal(), foreign)
.Run();
+
+ if (i::FLAG_dump_asmjs_wasm) {
+ FILE* wasm_file = fopen(i::FLAG_asmjs_wasm_dumpfile, "wb");
+ if (wasm_file) {
+ fwrite(module->Begin(), module->End() - module->Begin(), 1, wasm_file);
+ fclose(wasm_file);
+ }
+ }
+
return module;
}
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698