| 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/lithium.h" | 5 #include "src/lithium.h" |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/scopes.h" | 9 #include "src/scopes.h" |
| 10 #include "src/serialize.h" | 10 #include "src/serialize.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 | 456 |
| 457 return chunk; | 457 return chunk; |
| 458 } | 458 } |
| 459 | 459 |
| 460 | 460 |
| 461 Handle<Code> LChunk::Codegen() { | 461 Handle<Code> LChunk::Codegen() { |
| 462 MacroAssembler assembler(info()->isolate(), NULL, 0); | 462 MacroAssembler assembler(info()->isolate(), NULL, 0); |
| 463 LOG_CODE_EVENT(info()->isolate(), | 463 LOG_CODE_EVENT(info()->isolate(), |
| 464 CodeStartLinePosInfoRecordEvent( | 464 CodeStartLinePosInfoRecordEvent( |
| 465 assembler.positions_recorder())); | 465 assembler.positions_recorder())); |
| 466 // TODO(yangguo) remove this once the code serializer handles code stubs. | 466 // Code serializer only takes unoptimized code. |
| 467 if (info()->will_serialize()) assembler.enable_serializer(); | 467 DCHECK(!info()->will_serialize()); |
| 468 LCodeGen generator(this, &assembler, info()); | 468 LCodeGen generator(this, &assembler, info()); |
| 469 | 469 |
| 470 MarkEmptyBlocks(); | 470 MarkEmptyBlocks(); |
| 471 | 471 |
| 472 if (generator.GenerateCode()) { | 472 if (generator.GenerateCode()) { |
| 473 generator.CheckEnvironmentUsage(); | 473 generator.CheckEnvironmentUsage(); |
| 474 CodeGenerator::MakeCodePrologue(info(), "optimized"); | 474 CodeGenerator::MakeCodePrologue(info(), "optimized"); |
| 475 Code::Flags flags = info()->flags(); | 475 Code::Flags flags = info()->flags(); |
| 476 Handle<Code> code = | 476 Handle<Code> code = |
| 477 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | 477 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 662 |
| 663 | 663 |
| 664 LPhase::~LPhase() { | 664 LPhase::~LPhase() { |
| 665 if (ShouldProduceTraceOutput()) { | 665 if (ShouldProduceTraceOutput()) { |
| 666 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 666 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 667 } | 667 } |
| 668 } | 668 } |
| 669 | 669 |
| 670 | 670 |
| 671 } } // namespace v8::internal | 671 } } // namespace v8::internal |
| OLD | NEW |