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/crankshaft/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 #endif | 869 #endif |
870 | 870 |
871 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { | 871 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { |
872 instr = AssignPointerMap(instr); | 872 instr = AssignPointerMap(instr); |
873 } | 873 } |
874 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 874 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
875 instr = AssignEnvironment(instr); | 875 instr = AssignEnvironment(instr); |
876 } | 876 } |
877 chunk_->AddInstruction(instr, current_block_); | 877 chunk_->AddInstruction(instr, current_block_); |
878 | 878 |
879 if (instr->IsCall() || instr->IsPrologue()) { | 879 if (instr->IsCall()) { |
880 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 880 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
881 if (hydrogen_val->HasObservableSideEffects()) { | 881 if (hydrogen_val->HasObservableSideEffects()) { |
882 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 882 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
883 sim->ReplayEnvironment(current_block_->last_environment()); | 883 sim->ReplayEnvironment(current_block_->last_environment()); |
884 hydrogen_value_for_lazy_bailout = sim; | 884 hydrogen_value_for_lazy_bailout = sim; |
885 } | 885 } |
886 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); | 886 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); |
887 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 887 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
888 chunk_->AddInstruction(bailout, current_block_); | 888 chunk_->AddInstruction(bailout, current_block_); |
889 } | 889 } |
890 } | 890 } |
891 | 891 |
892 | 892 |
893 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { | 893 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
894 return new (zone()) LPrologue(); | 894 LInstruction* result = new (zone()) LPrologue(); |
| 895 if (info_->num_heap_slots() > 0) { |
| 896 result = MarkAsCall(result, instr); |
| 897 } |
| 898 return result; |
895 } | 899 } |
896 | 900 |
897 | 901 |
898 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 902 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
899 return new(zone()) LGoto(instr->FirstSuccessor()); | 903 return new(zone()) LGoto(instr->FirstSuccessor()); |
900 } | 904 } |
901 | 905 |
902 | 906 |
903 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 907 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
904 HValue* value = instr->value(); | 908 HValue* value = instr->value(); |
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2543 } | 2547 } |
2544 | 2548 |
2545 | 2549 |
2546 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2550 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2547 LOperand* context = UseRegisterAtStart(instr->context()); | 2551 LOperand* context = UseRegisterAtStart(instr->context()); |
2548 return new(zone()) LStoreFrameContext(context); | 2552 return new(zone()) LStoreFrameContext(context); |
2549 } | 2553 } |
2550 | 2554 |
2551 } // namespace internal | 2555 } // namespace internal |
2552 } // namespace v8 | 2556 } // namespace v8 |
OLD | NEW |