| Index: src/codegen.cc
|
| diff --git a/src/codegen.cc b/src/codegen.cc
|
| index ff4003c1eff09b5a76d9c60e802b3c2575620469..af2f1f667ba4ca4f22c779cd98b5001e8817fc98 100644
|
| --- a/src/codegen.cc
|
| +++ b/src/codegen.cc
|
| @@ -58,13 +58,12 @@ Comment::~Comment() {
|
| #undef __
|
|
|
|
|
| -void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
|
| -#ifdef DEBUG
|
| +void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) {
|
| bool print_source = false;
|
| bool print_ast = false;
|
| const char* ftype;
|
|
|
| - if (Isolate::Current()->bootstrapper()->IsActive()) {
|
| + if (info->isolate()->bootstrapper()->IsActive()) {
|
| print_source = FLAG_print_builtin_source;
|
| print_ast = FLAG_print_builtin_ast;
|
| ftype = "builtin";
|
| @@ -75,17 +74,18 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
|
| }
|
|
|
| if (FLAG_trace_codegen || print_source || print_ast) {
|
| - PrintF("*** Generate code for %s function: ", ftype);
|
| + PrintF("[generating %s code for %s function: ", kind, ftype);
|
| if (info->IsStub()) {
|
| const char* name =
|
| CodeStub::MajorName(info->code_stub()->MajorKey(), true);
|
| PrintF("%s", name == NULL ? "<unknown>" : name);
|
| } else {
|
| - info->function()->name()->ShortPrint();
|
| + PrintF("%s", *info->function()->debug_name()->ToCString());
|
| }
|
| - PrintF(" ***\n");
|
| + PrintF("]\n");
|
| }
|
|
|
| +#ifdef DEBUG
|
| if (!info->IsStub() && print_source) {
|
| PrintF("--- Source from AST ---\n%s\n",
|
| PrettyPrinter().PrintProgram(info->function()));
|
|
|