We can't print the AST or the source for stubs.

BUG=v8:2486

Review URL: https://codereview.chromium.org/11881017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
svenpanne@chromium.org 2013-01-14 08:36:38 +00:00
parent 7bea34038d
commit 9a8c8ed58c

View File

@ -86,12 +86,12 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
PrintF(" ***\n");
}
if (print_source) {
if (!info->IsStub() && print_source) {
PrintF("--- Source from AST ---\n%s\n",
PrettyPrinter().PrintProgram(info->function()));
}
if (print_ast) {
if (!info->IsStub() && print_ast) {
PrintF("--- AST ---\n%s\n",
AstPrinter().PrintProgram(info->function()));
}