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 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } \ | 62 } \ |
63 double fast_##name(double x, Isolate* isolate) { \ | 63 double fast_##name(double x, Isolate* isolate) { \ |
64 return (*fast_##name##_function)(x, isolate); \ | 64 return (*fast_##name##_function)(x, isolate); \ |
65 } | 65 } |
66 | 66 |
67 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction) | 67 UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction) |
68 | 68 |
69 #undef UNARY_MATH_FUNCTION | 69 #undef UNARY_MATH_FUNCTION |
70 | 70 |
71 | 71 |
72 #define __ ACCESS_MASM(masm_) | |
73 | |
74 #ifdef DEBUG | 72 #ifdef DEBUG |
75 | 73 |
76 Comment::Comment(MacroAssembler* masm, const char* msg) | 74 Comment::Comment(Assembler* assembler, const char* msg) |
77 : masm_(masm), msg_(msg) { | 75 : assembler_(assembler), msg_(msg) { |
78 __ RecordComment(msg); | 76 assembler_->RecordComment(msg); |
79 } | 77 } |
80 | 78 |
81 | 79 |
82 Comment::~Comment() { | 80 Comment::~Comment() { |
83 if (msg_[0] == '[') __ RecordComment("]"); | 81 if (msg_[0] == '[') assembler_->RecordComment("]"); |
84 } | 82 } |
85 | 83 |
86 #endif // DEBUG | 84 #endif // DEBUG |
87 | 85 |
88 #undef __ | |
89 | |
90 | 86 |
91 void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { | 87 void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { |
92 bool print_ast = false; | 88 bool print_ast = false; |
93 const char* ftype; | 89 const char* ftype; |
94 | 90 |
95 if (info->isolate()->bootstrapper()->IsActive()) { | 91 if (info->isolate()->bootstrapper()->IsActive()) { |
96 print_ast = FLAG_print_builtin_ast; | 92 print_ast = FLAG_print_builtin_ast; |
97 ftype = "builtin"; | 93 ftype = "builtin"; |
98 } else { | 94 } else { |
99 print_ast = FLAG_print_ast; | 95 print_ast = FLAG_print_ast; |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 os << "source_position = " << shared->start_position() << "\n"; | 280 os << "source_position = " << shared->start_position() << "\n"; |
285 } | 281 } |
286 code->Disassemble(debug_name.get(), os); | 282 code->Disassemble(debug_name.get(), os); |
287 os << "--- End code ---\n"; | 283 os << "--- End code ---\n"; |
288 } | 284 } |
289 #endif // ENABLE_DISASSEMBLER | 285 #endif // ENABLE_DISASSEMBLER |
290 } | 286 } |
291 | 287 |
292 } // namespace internal | 288 } // namespace internal |
293 } // namespace v8 | 289 } // namespace v8 |
OLD | NEW |