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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 if (stub->IsUninitialized() && descriptor->has_miss_handler()) { | 263 if (stub->IsUninitialized() && descriptor->has_miss_handler()) { |
264 ASSERT(!descriptor->stack_parameter_count().is_valid()); | 264 ASSERT(!descriptor->stack_parameter_count().is_valid()); |
265 return stub->GenerateLightweightMissCode(); | 265 return stub->GenerateLightweightMissCode(); |
266 } | 266 } |
267 base::ElapsedTimer timer; | 267 base::ElapsedTimer timer; |
268 if (FLAG_profile_hydrogen_code_stub_compilation) { | 268 if (FLAG_profile_hydrogen_code_stub_compilation) { |
269 timer.Start(); | 269 timer.Start(); |
270 } | 270 } |
271 CodeStubGraphBuilder<Stub> builder(isolate, stub); | 271 CodeStubGraphBuilder<Stub> builder(isolate, stub); |
272 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 272 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 273 // TODO(yangguo) remove this once the code serializer handles code stubs. |
| 274 if (FLAG_serialize_toplevel) chunk->info()->PrepareForSerializing(); |
273 Handle<Code> code = chunk->Codegen(); | 275 Handle<Code> code = chunk->Codegen(); |
274 if (FLAG_profile_hydrogen_code_stub_compilation) { | 276 if (FLAG_profile_hydrogen_code_stub_compilation) { |
275 OFStream os(stdout); | 277 OFStream os(stdout); |
276 os << "[Lazy compilation of " << stub << " took " | 278 os << "[Lazy compilation of " << stub << " took " |
277 << timer.Elapsed().InMillisecondsF() << " ms]" << endl; | 279 << timer.Elapsed().InMillisecondsF() << " ms]" << endl; |
278 } | 280 } |
279 return code; | 281 return code; |
280 } | 282 } |
281 | 283 |
282 | 284 |
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 return Pop(); | 1729 return Pop(); |
1728 } | 1730 } |
1729 | 1731 |
1730 | 1732 |
1731 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { | 1733 Handle<Code> KeyedLoadGenericElementStub::GenerateCode() { |
1732 return DoGenerateCode(this); | 1734 return DoGenerateCode(this); |
1733 } | 1735 } |
1734 | 1736 |
1735 | 1737 |
1736 } } // namespace v8::internal | 1738 } } // namespace v8::internal |
OLD | NEW |