| 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/lithium.h" | 7 #include "src/lithium.h" |
| 8 #include "src/scopes.h" | 8 #include "src/scopes.h" |
| 9 #include "src/serialize.h" | 9 #include "src/serialize.h" |
| 10 | 10 |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 | 431 |
| 432 return chunk; | 432 return chunk; |
| 433 } | 433 } |
| 434 | 434 |
| 435 | 435 |
| 436 Handle<Code> LChunk::Codegen() { | 436 Handle<Code> LChunk::Codegen() { |
| 437 MacroAssembler assembler(info()->isolate(), NULL, 0); | 437 MacroAssembler assembler(info()->isolate(), NULL, 0); |
| 438 LOG_CODE_EVENT(info()->isolate(), | 438 LOG_CODE_EVENT(info()->isolate(), |
| 439 CodeStartLinePosInfoRecordEvent( | 439 CodeStartLinePosInfoRecordEvent( |
| 440 assembler.positions_recorder())); | 440 assembler.positions_recorder())); |
| 441 // TODO(yangguo) remove this once the code serializer handles code stubs. |
| 442 if (info()->will_serialize()) assembler.enable_serializer(); |
| 441 LCodeGen generator(this, &assembler, info()); | 443 LCodeGen generator(this, &assembler, info()); |
| 442 | 444 |
| 443 MarkEmptyBlocks(); | 445 MarkEmptyBlocks(); |
| 444 | 446 |
| 445 if (generator.GenerateCode()) { | 447 if (generator.GenerateCode()) { |
| 446 generator.CheckEnvironmentUsage(); | 448 generator.CheckEnvironmentUsage(); |
| 447 CodeGenerator::MakeCodePrologue(info(), "optimized"); | 449 CodeGenerator::MakeCodePrologue(info(), "optimized"); |
| 448 Code::Flags flags = info()->flags(); | 450 Code::Flags flags = info()->flags(); |
| 449 Handle<Code> code = | 451 Handle<Code> code = |
| 450 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 452 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 | 619 |
| 618 | 620 |
| 619 LPhase::~LPhase() { | 621 LPhase::~LPhase() { |
| 620 if (ShouldProduceTraceOutput()) { | 622 if (ShouldProduceTraceOutput()) { |
| 621 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 623 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 622 } | 624 } |
| 623 } | 625 } |
| 624 | 626 |
| 625 | 627 |
| 626 } } // namespace v8::internal | 628 } } // namespace v8::internal |
| OLD | NEW |