| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // stub-failure deopt mechanism. | 271 // stub-failure deopt mechanism. |
| 272 if (stub->IsUninitialized() && descriptor.has_miss_handler()) { | 272 if (stub->IsUninitialized() && descriptor.has_miss_handler()) { |
| 273 DCHECK(!descriptor.stack_parameter_count().is_valid()); | 273 DCHECK(!descriptor.stack_parameter_count().is_valid()); |
| 274 return stub->GenerateLightweightMissCode(descriptor.miss_handler()); | 274 return stub->GenerateLightweightMissCode(descriptor.miss_handler()); |
| 275 } | 275 } |
| 276 base::ElapsedTimer timer; | 276 base::ElapsedTimer timer; |
| 277 if (FLAG_profile_hydrogen_code_stub_compilation) { | 277 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 278 timer.Start(); | 278 timer.Start(); |
| 279 } | 279 } |
| 280 Zone zone(isolate->allocator()); | 280 Zone zone(isolate->allocator()); |
| 281 CompilationInfo info(CodeStub::MajorName(stub->MajorKey()), isolate, &zone, | 281 CompilationInfo info(CStrVector(CodeStub::MajorName(stub->MajorKey())), |
| 282 stub->GetCodeFlags()); | 282 isolate, &zone, stub->GetCodeFlags()); |
| 283 // Parameter count is number of stack parameters. | 283 // Parameter count is number of stack parameters. |
| 284 int parameter_count = descriptor.GetStackParameterCount(); | 284 int parameter_count = descriptor.GetStackParameterCount(); |
| 285 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { | 285 if (descriptor.function_mode() == NOT_JS_FUNCTION_STUB_MODE) { |
| 286 parameter_count--; | 286 parameter_count--; |
| 287 } | 287 } |
| 288 info.set_parameter_count(parameter_count); | 288 info.set_parameter_count(parameter_count); |
| 289 CodeStubGraphBuilder<Stub> builder(&info, stub); | 289 CodeStubGraphBuilder<Stub> builder(&info, stub); |
| 290 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 290 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 291 Handle<Code> code = chunk->Codegen(); | 291 Handle<Code> code = chunk->Codegen(); |
| 292 if (FLAG_profile_hydrogen_code_stub_compilation) { | 292 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| (...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2292 return Pop(); | 2292 return Pop(); |
| 2293 } | 2293 } |
| 2294 | 2294 |
| 2295 | 2295 |
| 2296 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2296 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
| 2297 return DoGenerateCode(this); | 2297 return DoGenerateCode(this); |
| 2298 } | 2298 } |
| 2299 | 2299 |
| 2300 } // namespace internal | 2300 } // namespace internal |
| 2301 } // namespace v8 | 2301 } // namespace v8 |
| OLD | NEW |