| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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]", kind, ftype, name.get()); |
| 126 } | 126 } |
| 127 | 127 |
| 128 #ifdef DEBUG | 128 #ifdef DEBUG |
| 129 if (info->parse_info() && print_source) { | 129 if (info->parse_info() && print_source) { |
| 130 PrintF("--- Source from AST ---\n%s\n", | 130 PrintF("--- Source from AST ---\n%s\n", |
| 131 PrettyPrinter(info->isolate(), info->zone()) | 131 PrettyPrinter(info->isolate()).PrintProgram(info->literal())); |
| 132 .PrintProgram(info->literal())); | |
| 133 } | 132 } |
| 134 | 133 |
| 135 if (info->parse_info() && print_ast) { | 134 if (info->parse_info() && print_ast) { |
| 136 PrintF("--- AST ---\n%s\n", AstPrinter(info->isolate(), info->zone()) | 135 PrintF("--- AST ---\n%s\n", |
| 137 .PrintProgram(info->literal())); | 136 AstPrinter(info->isolate()).PrintProgram(info->literal())); |
| 138 } | 137 } |
| 139 #endif // DEBUG | 138 #endif // DEBUG |
| 140 } | 139 } |
| 141 | 140 |
| 142 | 141 |
| 143 Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, | 142 Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, |
| 144 CompilationInfo* info) { | 143 CompilationInfo* info) { |
| 145 Isolate* isolate = info->isolate(); | 144 Isolate* isolate = info->isolate(); |
| 146 | 145 |
| 147 Code::Flags flags; | 146 Code::Flags flags; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 os << "source_position = " << literal->start_position() << "\n"; | 223 os << "source_position = " << literal->start_position() << "\n"; |
| 225 } | 224 } |
| 226 code->Disassemble(debug_name.get(), os); | 225 code->Disassemble(debug_name.get(), os); |
| 227 os << "--- End code ---\n"; | 226 os << "--- End code ---\n"; |
| 228 } | 227 } |
| 229 #endif // ENABLE_DISASSEMBLER | 228 #endif // ENABLE_DISASSEMBLER |
| 230 } | 229 } |
| 231 | 230 |
| 232 } // namespace internal | 231 } // namespace internal |
| 233 } // namespace v8 | 232 } // namespace v8 |
| OLD | NEW |