Commit 373320ae authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] flag for asm-wasm investigations

This is a flag useful for testing/perf investigations for asm-wasm.

We can dump the internal representation of a asm.js module (when asm-wasm is
enabled with --validate-asm) using --dump-wasm-module. We can't pick that
module afterwards because it contains non-compliant opcodes - used as
implementation detail of our asm-wasm pipeline.

This flag forces asm.js origin on the decoder.

BUG=

Review-Url: https://codereview.chromium.org/2656103003
Cr-Commit-Position: refs/heads/master@{#42716}
parent adc42c3a
......@@ -501,6 +501,8 @@ DEFINE_NEG_IMPLICATION(minimal, use_ic)
// Flags for native WebAssembly.
DEFINE_BOOL(expose_wasm, true, "expose WASM interface to JavaScript")
DEFINE_BOOL(assume_asmjs_origin, false,
"force wasm decoder to assume input is internal asm-wasm format")
DEFINE_BOOL(wasm_disable_structured_cloning, false,
"disable WASM structured cloning")
DEFINE_INT(wasm_num_compilation_tasks, 10,
......
......@@ -178,7 +178,9 @@ class ModuleDecoder : public Decoder {
public:
ModuleDecoder(Zone* zone, const byte* module_start, const byte* module_end,
ModuleOrigin origin)
: Decoder(module_start, module_end), module_zone(zone), origin_(origin) {
: Decoder(module_start, module_end),
module_zone(zone),
origin_(FLAG_assume_asmjs_origin ? kAsmJsOrigin : origin) {
result_.start = start_;
if (end_ < start_) {
error(start_, "end is less than start");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment