| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/field-index.h" | 8 #include "src/field-index.h" |
| 9 #include "src/hydrogen.h" | 9 #include "src/hydrogen.h" |
| 10 #include "src/lithium.h" | 10 #include "src/lithium.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 stub->InitializeInterfaceDescriptor(descriptor); | 255 stub->InitializeInterfaceDescriptor(descriptor); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // If we are uninitialized we can use a light-weight stub to enter | 258 // If we are uninitialized we can use a light-weight stub to enter |
| 259 // the runtime that is significantly faster than using the standard | 259 // the runtime that is significantly faster than using the standard |
| 260 // stub-failure deopt mechanism. | 260 // stub-failure deopt mechanism. |
| 261 if (stub->IsUninitialized() && descriptor->has_miss_handler()) { | 261 if (stub->IsUninitialized() && descriptor->has_miss_handler()) { |
| 262 ASSERT(!descriptor->stack_parameter_count().is_valid()); | 262 ASSERT(!descriptor->stack_parameter_count().is_valid()); |
| 263 return stub->GenerateLightweightMissCode(); | 263 return stub->GenerateLightweightMissCode(); |
| 264 } | 264 } |
| 265 ElapsedTimer timer; | 265 base::ElapsedTimer timer; |
| 266 if (FLAG_profile_hydrogen_code_stub_compilation) { | 266 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 267 timer.Start(); | 267 timer.Start(); |
| 268 } | 268 } |
| 269 CodeStubGraphBuilder<Stub> builder(isolate, stub); | 269 CodeStubGraphBuilder<Stub> builder(isolate, stub); |
| 270 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 270 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 271 Handle<Code> code = chunk->Codegen(); | 271 Handle<Code> code = chunk->Codegen(); |
| 272 if (FLAG_profile_hydrogen_code_stub_compilation) { | 272 if (FLAG_profile_hydrogen_code_stub_compilation) { |
| 273 double ms = timer.Elapsed().InMillisecondsF(); | 273 double ms = timer.Elapsed().InMillisecondsF(); |
| 274 PrintF("[Lazy compilation of %s took %0.3f ms]\n", | 274 PrintF("[Lazy compilation of %s took %0.3f ms]\n", |
| 275 stub->GetName().get(), ms); | 275 stub->GetName().get(), ms); |
| (...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 return Pop(); | 1704 return Pop(); |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 | 1707 |
| 1708 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { | 1708 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { |
| 1709 return DoGenerateCode(this); | 1709 return DoGenerateCode(this); |
| 1710 } | 1710 } |
| 1711 | 1711 |
| 1712 | 1712 |
| 1713 } } // namespace v8::internal | 1713 } } // namespace v8::internal |
| OLD | NEW |