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/x87/lithium-x87.h" | 5 #include "src/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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 // TODO(olivf) Since phis of spilled values are joined as registers | 966 // TODO(olivf) Since phis of spilled values are joined as registers |
967 // (not in the stack slot), we need to allow the goto gaps to keep one | 967 // (not in the stack slot), we need to allow the goto gaps to keep one |
968 // x87 register alive. To ensure all other values are still spilled, we | 968 // x87 register alive. To ensure all other values are still spilled, we |
969 // insert a fpu register barrier right before. | 969 // insert a fpu register barrier right before. |
970 LClobberDoubles* clobber = new(zone()) LClobberDoubles(isolate()); | 970 LClobberDoubles* clobber = new(zone()) LClobberDoubles(isolate()); |
971 clobber->set_hydrogen_value(hydrogen_val); | 971 clobber->set_hydrogen_value(hydrogen_val); |
972 chunk_->AddInstruction(clobber, current_block_); | 972 chunk_->AddInstruction(clobber, current_block_); |
973 } | 973 } |
974 chunk_->AddInstruction(instr, current_block_); | 974 chunk_->AddInstruction(instr, current_block_); |
975 | 975 |
976 if (instr->IsCall()) { | 976 if (instr->IsCall() || instr->IsPrologue()) { |
977 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 977 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
978 if (hydrogen_val->HasObservableSideEffects()) { | 978 if (hydrogen_val->HasObservableSideEffects()) { |
979 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 979 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
980 sim->ReplayEnvironment(current_block_->last_environment()); | 980 sim->ReplayEnvironment(current_block_->last_environment()); |
981 hydrogen_value_for_lazy_bailout = sim; | 981 hydrogen_value_for_lazy_bailout = sim; |
982 } | 982 } |
983 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); | 983 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); |
984 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 984 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
985 chunk_->AddInstruction(bailout, current_block_); | 985 chunk_->AddInstruction(bailout, current_block_); |
986 } | 986 } |
987 } | 987 } |
988 | 988 |
989 | 989 |
| 990 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
| 991 return new (zone()) LPrologue(); |
| 992 } |
| 993 |
| 994 |
990 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 995 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
991 return new(zone()) LGoto(instr->FirstSuccessor()); | 996 return new(zone()) LGoto(instr->FirstSuccessor()); |
992 } | 997 } |
993 | 998 |
994 | 999 |
995 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 1000 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
996 HValue* value = instr->value(); | 1001 HValue* value = instr->value(); |
997 Representation r = value->representation(); | 1002 Representation r = value->representation(); |
998 HType type = value->type(); | 1003 HType type = value->type(); |
999 ToBooleanStub::Types expected = instr->expected_input_types(); | 1004 ToBooleanStub::Types expected = instr->expected_input_types(); |
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2760 LAllocateBlockContext* result = | 2765 LAllocateBlockContext* result = |
2761 new(zone()) LAllocateBlockContext(context, function); | 2766 new(zone()) LAllocateBlockContext(context, function); |
2762 return MarkAsCall(DefineFixed(result, esi), instr); | 2767 return MarkAsCall(DefineFixed(result, esi), instr); |
2763 } | 2768 } |
2764 | 2769 |
2765 | 2770 |
2766 } // namespace internal | 2771 } // namespace internal |
2767 } // namespace v8 | 2772 } // namespace v8 |
2768 | 2773 |
2769 #endif // V8_TARGET_ARCH_X87 | 2774 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |