OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/arm64/lithium-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-arm64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 #endif | 707 #endif |
708 | 708 |
709 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { | 709 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { |
710 instr = AssignPointerMap(instr); | 710 instr = AssignPointerMap(instr); |
711 } | 711 } |
712 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 712 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
713 instr = AssignEnvironment(instr); | 713 instr = AssignEnvironment(instr); |
714 } | 714 } |
715 chunk_->AddInstruction(instr, current_block_); | 715 chunk_->AddInstruction(instr, current_block_); |
716 | 716 |
717 if (instr->IsCall() || instr->IsPrologue()) { | 717 if (instr->IsCall()) { |
718 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 718 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
719 if (hydrogen_val->HasObservableSideEffects()) { | 719 if (hydrogen_val->HasObservableSideEffects()) { |
720 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 720 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
721 sim->ReplayEnvironment(current_block_->last_environment()); | 721 sim->ReplayEnvironment(current_block_->last_environment()); |
722 hydrogen_value_for_lazy_bailout = sim; | 722 hydrogen_value_for_lazy_bailout = sim; |
723 } | 723 } |
724 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); | 724 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); |
725 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 725 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
726 chunk_->AddInstruction(bailout, current_block_); | 726 chunk_->AddInstruction(bailout, current_block_); |
727 } | 727 } |
728 } | 728 } |
729 | 729 |
730 | 730 |
731 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { | 731 LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { |
732 HEnvironment* hydrogen_env = current_block_->last_environment(); | 732 HEnvironment* hydrogen_env = current_block_->last_environment(); |
733 int argument_index_accumulator = 0; | 733 int argument_index_accumulator = 0; |
734 ZoneList<HValue*> objects_to_materialize(0, zone()); | 734 ZoneList<HValue*> objects_to_materialize(0, zone()); |
735 instr->set_environment(CreateEnvironment(hydrogen_env, | 735 instr->set_environment(CreateEnvironment(hydrogen_env, |
736 &argument_index_accumulator, | 736 &argument_index_accumulator, |
737 &objects_to_materialize)); | 737 &objects_to_materialize)); |
738 return instr; | 738 return instr; |
739 } | 739 } |
740 | 740 |
741 | 741 |
742 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { | 742 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
743 return new (zone()) LPrologue(); | 743 LInstruction* result = new (zone()) LPrologue(); |
| 744 if (info_->num_heap_slots() > 0) { |
| 745 result = MarkAsCall(result, instr); |
| 746 } |
| 747 return result; |
744 } | 748 } |
745 | 749 |
746 | 750 |
747 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { | 751 LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { |
748 // The control instruction marking the end of a block that completed | 752 // The control instruction marking the end of a block that completed |
749 // abruptly (e.g., threw an exception). There is nothing specific to do. | 753 // abruptly (e.g., threw an exception). There is nothing specific to do. |
750 return NULL; | 754 return NULL; |
751 } | 755 } |
752 | 756 |
753 | 757 |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2636 | 2640 |
2637 | 2641 |
2638 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2642 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2639 LOperand* context = UseRegisterAtStart(instr->context()); | 2643 LOperand* context = UseRegisterAtStart(instr->context()); |
2640 return new(zone()) LStoreFrameContext(context); | 2644 return new(zone()) LStoreFrameContext(context); |
2641 } | 2645 } |
2642 | 2646 |
2643 | 2647 |
2644 } // namespace internal | 2648 } // namespace internal |
2645 } // namespace v8 | 2649 } // namespace v8 |
OLD | NEW |