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/x87/lithium-x87.h" | 5 #include "src/crankshaft/x87/lithium-x87.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_X87 | 9 #if V8_TARGET_ARCH_X87 |
10 | 10 |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 // TODO(olivf) Since phis of spilled values are joined as registers | 917 // TODO(olivf) Since phis of spilled values are joined as registers |
918 // (not in the stack slot), we need to allow the goto gaps to keep one | 918 // (not in the stack slot), we need to allow the goto gaps to keep one |
919 // x87 register alive. To ensure all other values are still spilled, we | 919 // x87 register alive. To ensure all other values are still spilled, we |
920 // insert a fpu register barrier right before. | 920 // insert a fpu register barrier right before. |
921 LClobberDoubles* clobber = new(zone()) LClobberDoubles(isolate()); | 921 LClobberDoubles* clobber = new(zone()) LClobberDoubles(isolate()); |
922 clobber->set_hydrogen_value(hydrogen_val); | 922 clobber->set_hydrogen_value(hydrogen_val); |
923 chunk_->AddInstruction(clobber, current_block_); | 923 chunk_->AddInstruction(clobber, current_block_); |
924 } | 924 } |
925 chunk_->AddInstruction(instr, current_block_); | 925 chunk_->AddInstruction(instr, current_block_); |
926 | 926 |
927 if (instr->IsCall() || instr->IsPrologue()) { | 927 if (instr->IsCall()) { |
928 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 928 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
929 if (hydrogen_val->HasObservableSideEffects()) { | 929 if (hydrogen_val->HasObservableSideEffects()) { |
930 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 930 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
931 sim->ReplayEnvironment(current_block_->last_environment()); | 931 sim->ReplayEnvironment(current_block_->last_environment()); |
932 hydrogen_value_for_lazy_bailout = sim; | 932 hydrogen_value_for_lazy_bailout = sim; |
933 } | 933 } |
934 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); | 934 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); |
935 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 935 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
936 chunk_->AddInstruction(bailout, current_block_); | 936 chunk_->AddInstruction(bailout, current_block_); |
937 } | 937 } |
938 } | 938 } |
939 | 939 |
940 | 940 |
941 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { | 941 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
942 return new (zone()) LPrologue(); | 942 LInstruction* result = new (zone()) LPrologue(); |
| 943 if (info_->num_heap_slots() > 0) { |
| 944 result = MarkAsCall(result, instr); |
| 945 } |
| 946 return result; |
943 } | 947 } |
944 | 948 |
945 | 949 |
946 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 950 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
947 return new(zone()) LGoto(instr->FirstSuccessor()); | 951 return new(zone()) LGoto(instr->FirstSuccessor()); |
948 } | 952 } |
949 | 953 |
950 | 954 |
951 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 955 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
952 HValue* value = instr->value(); | 956 HValue* value = instr->value(); |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2603 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2607 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
2604 LOperand* context = UseRegisterAtStart(instr->context()); | 2608 LOperand* context = UseRegisterAtStart(instr->context()); |
2605 return new(zone()) LStoreFrameContext(context); | 2609 return new(zone()) LStoreFrameContext(context); |
2606 } | 2610 } |
2607 | 2611 |
2608 | 2612 |
2609 } // namespace internal | 2613 } // namespace internal |
2610 } // namespace v8 | 2614 } // namespace v8 |
2611 | 2615 |
2612 #endif // V8_TARGET_ARCH_X87 | 2616 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |