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); |