Commit 6576495f authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[ignition] Fix AST printing to print eager inner literals

AST printing was printing the literal of the ParseInfo, which is the
current function being parsed. However, for eager compilation of inner
literals, this may not be the function being compiled, which is in the
CompilationInfo.

So, for --print-ast, we have to get the FunctionLiteral from
CompilationInfo.

Bug: chromium:771653
Change-Id: I2088e1f1f7b8a3d664aae65cab699a641e5fd302
Reviewed-on: https://chromium-review.googlesource.com/712354Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48470}
parent 4cf47645
......@@ -145,7 +145,8 @@ void MaybePrintAst(ParseInfo* parse_info, CompilationInfo* compilation_info) {
<< compilation_info->GetDebugName().get() << "]" << std::endl;
#ifdef DEBUG
os << "--- AST ---" << std::endl
<< AstPrinter(isolate).PrintProgram(parse_info->literal()) << std::endl;
<< AstPrinter(isolate).PrintProgram(compilation_info->literal())
<< std::endl;
#endif // DEBUG
}
......
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