| 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/codegen.h" | 5 #include "src/codegen.h" |
| 6 | 6 |
| 7 #if defined(V8_OS_AIX) | 7 #if defined(V8_OS_AIX) |
| 8 #include <fenv.h> // NOLINT(build/c++11) | 8 #include <fenv.h> // NOLINT(build/c++11) |
| 9 #endif | 9 #endif |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 print_ast = FLAG_print_builtin_ast; | 115 print_ast = FLAG_print_builtin_ast; |
| 116 ftype = "builtin"; | 116 ftype = "builtin"; |
| 117 } else { | 117 } else { |
| 118 print_source = FLAG_print_source; | 118 print_source = FLAG_print_source; |
| 119 print_ast = FLAG_print_ast; | 119 print_ast = FLAG_print_ast; |
| 120 ftype = "user-defined"; | 120 ftype = "user-defined"; |
| 121 } | 121 } |
| 122 | 122 |
| 123 if (FLAG_trace_codegen || print_source || print_ast) { | 123 if (FLAG_trace_codegen || print_source || print_ast) { |
| 124 base::SmartArrayPointer<char> name = info->GetDebugName(); | 124 base::SmartArrayPointer<char> name = info->GetDebugName(); |
| 125 PrintF("[generating %s code for %s function: %s]", kind, ftype, name.get()); | 125 PrintF("[generating %s code for %s function: %s]\n", kind, ftype, |
| 126 name.get()); |
| 126 } | 127 } |
| 127 | 128 |
| 128 #ifdef DEBUG | 129 #ifdef DEBUG |
| 129 if (info->parse_info() && print_source) { | 130 if (info->parse_info() && print_source) { |
| 130 PrintF("--- Source from AST ---\n%s\n", | 131 PrintF("--- Source from AST ---\n%s\n", |
| 131 PrettyPrinter(info->isolate()).PrintProgram(info->literal())); | 132 PrettyPrinter(info->isolate()).PrintProgram(info->literal())); |
| 132 } | 133 } |
| 133 | 134 |
| 134 if (info->parse_info() && print_ast) { | 135 if (info->parse_info() && print_ast) { |
| 135 PrintF("--- AST ---\n%s\n", | 136 PrintF("--- AST ---\n%s\n", |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 os << "source_position = " << literal->start_position() << "\n"; | 224 os << "source_position = " << literal->start_position() << "\n"; |
| 224 } | 225 } |
| 225 code->Disassemble(debug_name.get(), os); | 226 code->Disassemble(debug_name.get(), os); |
| 226 os << "--- End code ---\n"; | 227 os << "--- End code ---\n"; |
| 227 } | 228 } |
| 228 #endif // ENABLE_DISASSEMBLER | 229 #endif // ENABLE_DISASSEMBLER |
| 229 } | 230 } |
| 230 | 231 |
| 231 } // namespace internal | 232 } // namespace internal |
| 232 } // namespace v8 | 233 } // namespace v8 |
| OLD | NEW |