Commit 91ea744c authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[interpreter] Fix --print-ast dumping the AST twice.

R=neis@chromium.org
BUG=v8:5700

Review-Url: https://codereview.chromium.org/2538173002
Cr-Commit-Position: refs/heads/master@{#41413}
parent 82429663
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment