summaryrefslogtreecommitdiff
path: root/deps/v8/src/codegen.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-12-21 10:24:08 -0800
committerRyan Dahl <ry@tinyclouds.org>2010-12-21 10:24:08 -0800
commit1a894b39b3c622e7c7d228c049e68b65e4334ee5 (patch)
treed115a78b28c3b1643154589473c74c75ed039fc7 /deps/v8/src/codegen.cc
parent6f726cf8c7415d58acb5f6b8493fe53f272b1dd4 (diff)
downloadnode-new-1a894b39b3c622e7c7d228c049e68b65e4334ee5.tar.gz
Upgrade V8 to 3.0.4
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
}