Index: src/compiler/wasm-compiler.cc |
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
index c47f5495e4646852d68a7bfa9d9859a393d2cb93..fb12fda6241afff25153b1c680460fdd97d02541 100644 |
--- a/src/compiler/wasm-compiler.cc |
+++ b/src/compiler/wasm-compiler.cc |
@@ -2458,6 +2458,12 @@ Handle<JSFunction> CompileJSToWasmWrapper( |
CompilationInfo info(func_name, isolate, &zone, flags); |
Handle<Code> code = |
Pipeline::GenerateCodeForTesting(&info, incoming, &graph, nullptr); |
+#ifdef ENABLE_DISASSEMBLER |
+ if (FLAG_print_opt_code && !code.is_null()) { |
+ OFStream os(stdout); |
+ code->Disassemble(buffer.start(), os); |
+ } |
+#endif |
if (debugging) { |
buffer.Dispose(); |
} |
@@ -2538,6 +2544,12 @@ Handle<Code> CompileWasmToJSWrapper(Isolate* isolate, wasm::ModuleEnv* module, |
CompilationInfo info(func_name, isolate, &zone, flags); |
code = Pipeline::GenerateCodeForTesting(&info, incoming, &graph, nullptr); |
+#ifdef ENABLE_DISASSEMBLER |
+ if (FLAG_print_opt_code && !code.is_null()) { |
+ OFStream os(stdout); |
+ code->Disassemble(buffer.start(), os); |
+ } |
+#endif |
if (debugging) { |
buffer.Dispose(); |
} |