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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "bootstrapper.h" | 7 #include "bootstrapper.h" |
8 #include "codegen.h" | 8 #include "codegen.h" |
9 #include "compiler.h" | 9 #include "compiler.h" |
10 #include "cpu-profiler.h" | 10 #include "cpu-profiler.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 143 |
144 // Allocate and install the code. | 144 // Allocate and install the code. |
145 CodeDesc desc; | 145 CodeDesc desc; |
146 bool is_crankshafted = | 146 bool is_crankshafted = |
147 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || | 147 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || |
148 info->IsStub(); | 148 info->IsStub(); |
149 masm->GetCode(&desc); | 149 masm->GetCode(&desc); |
150 Handle<Code> code = | 150 Handle<Code> code = |
151 isolate->factory()->NewCode(desc, flags, masm->CodeObject(), | 151 isolate->factory()->NewCode(desc, flags, masm->CodeObject(), |
152 false, is_crankshafted, | 152 false, is_crankshafted, |
153 info->prologue_offset()); | 153 info->prologue_offset(), |
| 154 info->is_debug()); |
154 isolate->counters()->total_compiled_code_size()->Increment( | 155 isolate->counters()->total_compiled_code_size()->Increment( |
155 code->instruction_size()); | 156 code->instruction_size()); |
156 isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted, | 157 isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted, |
157 code->instruction_size()); | 158 code->instruction_size()); |
158 return code; | 159 return code; |
159 } | 160 } |
160 | 161 |
161 | 162 |
162 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { | 163 void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) { |
163 #ifdef ENABLE_DISASSEMBLER | 164 #ifdef ENABLE_DISASSEMBLER |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 ASSERT(result_size_ == 1 || result_size_ == 2); | 262 ASSERT(result_size_ == 1 || result_size_ == 2); |
262 #ifdef _WIN64 | 263 #ifdef _WIN64 |
263 return result | ((result_size_ == 1) ? 0 : 2); | 264 return result | ((result_size_ == 1) ? 0 : 2); |
264 #else | 265 #else |
265 return result; | 266 return result; |
266 #endif | 267 #endif |
267 } | 268 } |
268 | 269 |
269 | 270 |
270 } } // namespace v8::internal | 271 } } // namespace v8::internal |
OLD | NEW |