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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/field-index.h" | 10 #include "src/field-index.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 // the runtime that is significantly faster than using the standard | 290 // the runtime that is significantly faster than using the standard |
291 // stub-failure deopt mechanism. | 291 // stub-failure deopt mechanism. |
292 if (stub->IsUninitialized() && descriptor.has_miss_handler()) { | 292 if (stub->IsUninitialized() && descriptor.has_miss_handler()) { |
293 DCHECK(!descriptor.stack_parameter_count().is_valid()); | 293 DCHECK(!descriptor.stack_parameter_count().is_valid()); |
294 return stub->GenerateLightweightMissCode(descriptor.miss_handler()); | 294 return stub->GenerateLightweightMissCode(descriptor.miss_handler()); |
295 } | 295 } |
296 base::ElapsedTimer timer; | 296 base::ElapsedTimer timer; |
297 if (FLAG_profile_hydrogen_code_stub_compilation) { | 297 if (FLAG_profile_hydrogen_code_stub_compilation) { |
298 timer.Start(); | 298 timer.Start(); |
299 } | 299 } |
300 Zone zone; | 300 Zone zone(isolate->allocator()); |
301 CompilationInfo info(CodeStub::MajorName(stub->MajorKey()), isolate, &zone, | 301 CompilationInfo info(CodeStub::MajorName(stub->MajorKey()), isolate, &zone, |
302 stub->GetCodeFlags()); | 302 stub->GetCodeFlags()); |
303 // Parameter count is number of stack parameters. | 303 // Parameter count is number of stack parameters. |
304 int parameter_count = descriptor.GetStackParameterCount(); | 304 int parameter_count = descriptor.GetStackParameterCount(); |
305 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { | 305 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { |
306 parameter_count--; | 306 parameter_count--; |
307 } | 307 } |
308 info.set_parameter_count(parameter_count); | 308 info.set_parameter_count(parameter_count); |
309 CodeStubGraphBuilder<Stub> builder(&info, stub); | 309 CodeStubGraphBuilder<Stub> builder(&info, stub); |
310 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 310 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
(...skipping 2257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2568 return Pop(); | 2568 return Pop(); |
2569 } | 2569 } |
2570 | 2570 |
2571 | 2571 |
2572 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2572 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2573 return DoGenerateCode(this); | 2573 return DoGenerateCode(this); |
2574 } | 2574 } |
2575 | 2575 |
2576 } // namespace internal | 2576 } // namespace internal |
2577 } // namespace v8 | 2577 } // namespace v8 |
OLD | NEW |