summaryrefslogtreecommitdiff
path: root/deps/v8/src/codegen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/codegen.cc')
-rw-r--r--deps/v8/src/codegen.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/deps/v8/src/codegen.cc b/deps/v8/src/codegen.cc
index 8a64d77b70..da479e8fc1 100644
--- a/deps/v8/src/codegen.cc
+++ b/deps/v8/src/codegen.cc
@@ -215,8 +215,17 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
}
PrintF("\n\n");
}
- PrintF("--- Code ---\n");
- code->Disassemble(*function->name()->ToCString());
+ if (info->IsOptimizing()) {
+ if (FLAG_print_unopt_code) {
+ PrintF("--- Unoptimized code ---\n");
+ info->closure()->shared()->code()->Disassemble(
+ *function->debug_name()->ToCString());
+ }
+ PrintF("--- Optimized code ---\n");
+ } else {
+ PrintF("--- Code ---\n");
+ }
+ code->Disassemble(*function->debug_name()->ToCString());
}
#endif // ENABLE_DISASSEMBLER
}