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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 CompilationInfo* info, | 115 CompilationInfo* info, |
116 Handle<Object> self_reference) { | 116 Handle<Object> self_reference) { |
117 Isolate* isolate = info->isolate(); | 117 Isolate* isolate = info->isolate(); |
118 | 118 |
119 // Allocate and install the code. | 119 // Allocate and install the code. |
120 CodeDesc desc; | 120 CodeDesc desc; |
121 Code::Flags flags = info->code_flags(); | 121 Code::Flags flags = info->code_flags(); |
122 bool is_crankshafted = | 122 bool is_crankshafted = |
123 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || | 123 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || |
124 info->IsStub(); | 124 info->IsStub(); |
125 masm->GetCode(&desc); | 125 masm->GetCode(isolate, &desc); |
126 if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc); | 126 if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc); |
127 | 127 |
128 Handle<Code> code = isolate->factory()->NewCode( | 128 Handle<Code> code = isolate->factory()->NewCode( |
129 desc, flags, self_reference, false, is_crankshafted, | 129 desc, flags, self_reference, false, is_crankshafted, |
130 info->prologue_offset(), info->is_debug() && !is_crankshafted); | 130 info->prologue_offset(), info->is_debug() && !is_crankshafted); |
131 isolate->counters()->total_compiled_code_size()->Increment( | 131 isolate->counters()->total_compiled_code_size()->Increment( |
132 code->instruction_size()); | 132 code->instruction_size()); |
133 return code; | 133 return code; |
134 } | 134 } |
135 | 135 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 os << "source_position = " << shared->start_position() << "\n"; | 280 os << "source_position = " << shared->start_position() << "\n"; |
281 } | 281 } |
282 code->Disassemble(debug_name.get(), os); | 282 code->Disassemble(debug_name.get(), os); |
283 os << "--- End code ---\n"; | 283 os << "--- End code ---\n"; |
284 } | 284 } |
285 #endif // ENABLE_DISASSEMBLER | 285 #endif // ENABLE_DISASSEMBLER |
286 } | 286 } |
287 | 287 |
288 } // namespace internal | 288 } // namespace internal |
289 } // namespace v8 | 289 } // namespace v8 |
OLD | NEW |