| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 ftype = "user-defined"; | 109 ftype = "user-defined"; |
| 110 } | 110 } |
| 111 | 111 |
| 112 if (FLAG_trace_codegen || print_source || print_ast) { | 112 if (FLAG_trace_codegen || print_source || print_ast) { |
| 113 PrintF("[generating %s code for %s function: ", kind, ftype); | 113 PrintF("[generating %s code for %s function: ", kind, ftype); |
| 114 if (info->IsStub()) { | 114 if (info->IsStub()) { |
| 115 const char* name = | 115 const char* name = |
| 116 CodeStub::MajorName(info->code_stub()->MajorKey(), true); | 116 CodeStub::MajorName(info->code_stub()->MajorKey(), true); |
| 117 PrintF("%s", name == NULL ? "<unknown>" : name); | 117 PrintF("%s", name == NULL ? "<unknown>" : name); |
| 118 } else { | 118 } else { |
| 119 AllowDeferredHandleDereference allow_deference_for_trace; |
| 119 PrintF("%s", info->function()->debug_name()->ToCString().get()); | 120 PrintF("%s", info->function()->debug_name()->ToCString().get()); |
| 120 } | 121 } |
| 121 PrintF("]\n"); | 122 PrintF("]\n"); |
| 122 } | 123 } |
| 123 | 124 |
| 124 #ifdef DEBUG | 125 #ifdef DEBUG |
| 125 if (!info->IsStub() && print_source) { | 126 if (!info->IsStub() && print_source) { |
| 126 PrintF("--- Source from AST ---\n%s\n", | 127 PrintF("--- Source from AST ---\n%s\n", |
| 127 PrettyPrinter(info->zone()).PrintProgram(info->function())); | 128 PrettyPrinter(info->zone()).PrintProgram(info->function())); |
| 128 } | 129 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 masm->positions_recorder()->RecordStatementPosition(pos); | 229 masm->positions_recorder()->RecordStatementPosition(pos); |
| 229 masm->positions_recorder()->RecordPosition(pos); | 230 masm->positions_recorder()->RecordPosition(pos); |
| 230 if (right_here) { | 231 if (right_here) { |
| 231 return masm->positions_recorder()->WriteRecordedPositions(); | 232 return masm->positions_recorder()->WriteRecordedPositions(); |
| 232 } | 233 } |
| 233 } | 234 } |
| 234 return false; | 235 return false; |
| 235 } | 236 } |
| 236 | 237 |
| 237 } } // namespace v8::internal | 238 } } // namespace v8::internal |
| OLD | NEW |