| 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/scopes.h" | 7 #include "src/scopes.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 #include "src/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/ia32/lithium-ia32.h" // NOLINT |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 assembler.positions_recorder())); | 513 assembler.positions_recorder())); |
| 514 // Code serializer only takes unoptimized code. | 514 // Code serializer only takes unoptimized code. |
| 515 DCHECK(!info()->will_serialize()); | 515 DCHECK(!info()->will_serialize()); |
| 516 LCodeGen generator(this, &assembler, info()); | 516 LCodeGen generator(this, &assembler, info()); |
| 517 | 517 |
| 518 MarkEmptyBlocks(); | 518 MarkEmptyBlocks(); |
| 519 | 519 |
| 520 if (generator.GenerateCode()) { | 520 if (generator.GenerateCode()) { |
| 521 generator.CheckEnvironmentUsage(); | 521 generator.CheckEnvironmentUsage(); |
| 522 CodeGenerator::MakeCodePrologue(info(), "optimized"); | 522 CodeGenerator::MakeCodePrologue(info(), "optimized"); |
| 523 Code::Flags flags = info()->flags(); | 523 Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&assembler, info()); |
| 524 Handle<Code> code = | |
| 525 CodeGenerator::MakeCodeEpilogue(&assembler, flags, info()); | |
| 526 generator.FinishCode(code); | 524 generator.FinishCode(code); |
| 527 CommitDependencies(code); | 525 CommitDependencies(code); |
| 528 code->set_is_crankshafted(true); | 526 code->set_is_crankshafted(true); |
| 529 void* jit_handler_data = | 527 void* jit_handler_data = |
| 530 assembler.positions_recorder()->DetachJITHandlerData(); | 528 assembler.positions_recorder()->DetachJITHandlerData(); |
| 531 LOG_CODE_EVENT(info()->isolate(), | 529 LOG_CODE_EVENT(info()->isolate(), |
| 532 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); | 530 CodeEndLinePosInfoRecordEvent(*code, jit_handler_data)); |
| 533 | 531 |
| 534 CodeGenerator::PrintCode(code, info()); | 532 CodeGenerator::PrintCode(code, info()); |
| 535 DCHECK(!(info()->isolate()->serializer_enabled() && | 533 DCHECK(!(info()->isolate()->serializer_enabled() && |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 709 |
| 712 LPhase::~LPhase() { | 710 LPhase::~LPhase() { |
| 713 if (ShouldProduceTraceOutput()) { | 711 if (ShouldProduceTraceOutput()) { |
| 714 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 712 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 715 } | 713 } |
| 716 } | 714 } |
| 717 | 715 |
| 718 | 716 |
| 719 } // namespace internal | 717 } // namespace internal |
| 720 } // namespace v8 | 718 } // namespace v8 |
| OLD | NEW |