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

Unified Diff: src/interpreter/interpreter.cc

Issue 2538173002: [interpreter] Fix --print-ast dumping the AST twice. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index bb731b455bf4afa740027200449273555cdb45bf..93e8fc93799b29b775755a1d0259526f18683510 100644
--- a/src/interpreter/interpreter.cc
+++ b/src/interpreter/interpreter.cc
@@ -163,7 +163,8 @@ InterpreterCompilationJob::InterpreterCompilationJob(CompilationInfo* info)
: CompilationJob(info->isolate(), info, "Ignition"), generator_(info) {}
InterpreterCompilationJob::Status InterpreterCompilationJob::PrepareJobImpl() {
- if (FLAG_print_bytecode || FLAG_print_ast) {
+ CodeGenerator::MakeCodePrologue(info(), "interpreter");
+ if (FLAG_print_bytecode) {
OFStream os(stdout);
std::unique_ptr<char[]> name = info()->GetDebugName();
os << "[generating bytecode for function: " << info()->GetDebugName().get()
@@ -171,16 +172,6 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::PrepareJobImpl() {
<< std::flush;
}
-#ifdef DEBUG
- if (info()->parse_info() && FLAG_print_ast) {
- OFStream os(stdout);
- os << "--- AST ---" << std::endl
- << AstPrinter(info()->isolate()).PrintProgram(info()->literal())
- << std::endl
- << std::flush;
- }
-#endif // DEBUG
-
return SUCCEEDED;
}
@@ -206,8 +197,6 @@ InterpreterCompilationJob::Status InterpreterCompilationJob::FinalizeJobImpl() {
return FAILED;
}
- CodeGenerator::MakeCodePrologue(info(), "interpreter");
-
if (FLAG_print_bytecode) {
OFStream os(stdout);
bytecodes->Print(os);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698