OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 deoptimization_index); | 674 deoptimization_index); |
675 } | 675 } |
676 | 676 |
677 | 677 |
678 void LCodeGen::RecordPosition(int position) { | 678 void LCodeGen::RecordPosition(int position) { |
679 if (!FLAG_debug_info || position == RelocInfo::kNoPosition) return; | 679 if (!FLAG_debug_info || position == RelocInfo::kNoPosition) return; |
680 masm()->positions_recorder()->RecordPosition(position); | 680 masm()->positions_recorder()->RecordPosition(position); |
681 } | 681 } |
682 | 682 |
683 | 683 |
684 void LCodeGen::DoLabel(LLabel* label) { | |
685 if (label->is_loop_header()) { | |
686 Comment(";;; B%d - LOOP entry", label->block_id()); | |
687 } else { | |
688 Comment(";;; B%d", label->block_id()); | |
689 } | |
690 __ bind(label->label()); | |
691 current_block_ = label->block_id(); | |
692 LCodeGen::DoGap(label); | |
693 } | |
694 | |
695 | |
696 void LCodeGen::DoParallelMove(LParallelMove* move) { | |
697 resolver_.Resolve(move); | |
698 } | |
699 | |
700 | |
701 void LCodeGen::DoGap(LGap* gap) { | 684 void LCodeGen::DoGap(LGap* gap) { |
702 for (int i = LGap::FIRST_INNER_POSITION; | 685 for (int i = LGap::FIRST_INNER_POSITION; |
703 i <= LGap::LAST_INNER_POSITION; | 686 i <= LGap::LAST_INNER_POSITION; |
704 i++) { | 687 i++) { |
705 LGap::InnerPosition inner_pos = static_cast<LGap::InnerPosition>(i); | 688 LGap::InnerPosition inner_pos = static_cast<LGap::InnerPosition>(i); |
706 LParallelMove* move = gap->GetParallelMove(inner_pos); | 689 LParallelMove* move = gap->GetParallelMove(inner_pos); |
707 if (move != NULL) DoParallelMove(move); | 690 if (move != NULL) DoParallelMove(move); |
708 } | 691 } |
709 | 692 |
710 LInstruction* next = GetNextInstruction(); | 693 LInstruction* next = GetNextInstruction(); |
711 if (next != NULL && next->IsLazyBailout()) { | 694 if (next != NULL && next->IsLazyBailout()) { |
712 int pc = masm()->pc_offset(); | 695 int pc = masm()->pc_offset(); |
713 safepoints_.SetPcAfterGap(pc); | 696 safepoints_.SetPcAfterGap(pc); |
714 } | 697 } |
715 } | 698 } |
716 | 699 |
717 | 700 |
| 701 void LCodeGen::DoInstructionGap(LInstructionGap* instr) { |
| 702 DoGap(instr); |
| 703 } |
| 704 |
| 705 |
| 706 void LCodeGen::DoLabel(LLabel* label) { |
| 707 if (label->is_loop_header()) { |
| 708 Comment(";;; B%d - LOOP entry", label->block_id()); |
| 709 } else { |
| 710 Comment(";;; B%d", label->block_id()); |
| 711 } |
| 712 __ bind(label->label()); |
| 713 current_block_ = label->block_id(); |
| 714 DoGap(label); |
| 715 } |
| 716 |
| 717 |
| 718 void LCodeGen::DoParallelMove(LParallelMove* move) { |
| 719 resolver_.Resolve(move); |
| 720 } |
| 721 |
| 722 |
718 void LCodeGen::DoParameter(LParameter* instr) { | 723 void LCodeGen::DoParameter(LParameter* instr) { |
719 // Nothing to do. | 724 // Nothing to do. |
720 } | 725 } |
721 | 726 |
722 | 727 |
723 void LCodeGen::DoCallStub(LCallStub* instr) { | 728 void LCodeGen::DoCallStub(LCallStub* instr) { |
724 ASSERT(ToRegister(instr->context()).is(esi)); | 729 ASSERT(ToRegister(instr->context()).is(esi)); |
725 ASSERT(ToRegister(instr->result()).is(eax)); | 730 ASSERT(ToRegister(instr->result()).is(eax)); |
726 switch (instr->hydrogen()->major_key()) { | 731 switch (instr->hydrogen()->major_key()) { |
727 case CodeStub::RegExpConstructResult: { | 732 case CodeStub::RegExpConstructResult: { |
(...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4216 ASSERT(osr_pc_offset_ == -1); | 4221 ASSERT(osr_pc_offset_ == -1); |
4217 osr_pc_offset_ = masm()->pc_offset(); | 4222 osr_pc_offset_ = masm()->pc_offset(); |
4218 } | 4223 } |
4219 | 4224 |
4220 | 4225 |
4221 #undef __ | 4226 #undef __ |
4222 | 4227 |
4223 } } // namespace v8::internal | 4228 } } // namespace v8::internal |
4224 | 4229 |
4225 #endif // V8_TARGET_ARCH_IA32 | 4230 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |