| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/hydrogen-osr.h" | 7 #include "src/hydrogen-osr.h" |
| 8 #include "src/lithium-inl.h" | 8 #include "src/lithium-inl.h" |
| 9 #include "src/ppc/lithium-codegen-ppc.h" | 9 #include "src/ppc/lithium-codegen-ppc.h" |
| 10 | 10 |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 #endif | 921 #endif |
| 922 | 922 |
| 923 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { | 923 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { |
| 924 instr = AssignPointerMap(instr); | 924 instr = AssignPointerMap(instr); |
| 925 } | 925 } |
| 926 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 926 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
| 927 instr = AssignEnvironment(instr); | 927 instr = AssignEnvironment(instr); |
| 928 } | 928 } |
| 929 chunk_->AddInstruction(instr, current_block_); | 929 chunk_->AddInstruction(instr, current_block_); |
| 930 | 930 |
| 931 if (instr->IsCall()) { | 931 if (instr->IsCall() || instr->IsPrologue()) { |
| 932 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 932 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
| 933 if (hydrogen_val->HasObservableSideEffects()) { | 933 if (hydrogen_val->HasObservableSideEffects()) { |
| 934 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 934 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
| 935 sim->ReplayEnvironment(current_block_->last_environment()); | 935 sim->ReplayEnvironment(current_block_->last_environment()); |
| 936 hydrogen_value_for_lazy_bailout = sim; | 936 hydrogen_value_for_lazy_bailout = sim; |
| 937 } | 937 } |
| 938 LInstruction* bailout = AssignEnvironment(new (zone()) LLazyBailout()); | 938 LInstruction* bailout = AssignEnvironment(new (zone()) LLazyBailout()); |
| 939 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 939 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
| 940 chunk_->AddInstruction(bailout, current_block_); | 940 chunk_->AddInstruction(bailout, current_block_); |
| 941 } | 941 } |
| 942 } | 942 } |
| 943 | 943 |
| 944 | 944 |
| 945 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
| 946 return new (zone()) LPrologue(); |
| 947 } |
| 948 |
| 949 |
| 945 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 950 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 946 return new (zone()) LGoto(instr->FirstSuccessor()); | 951 return new (zone()) LGoto(instr->FirstSuccessor()); |
| 947 } | 952 } |
| 948 | 953 |
| 949 | 954 |
| 950 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 955 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 951 HValue* value = instr->value(); | 956 HValue* value = instr->value(); |
| 952 Representation r = value->representation(); | 957 Representation r = value->representation(); |
| 953 HType type = value->type(); | 958 HType type = value->type(); |
| 954 ToBooleanStub::Types expected = instr->expected_input_types(); | 959 ToBooleanStub::Types expected = instr->expected_input_types(); |
| (...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 LInstruction* LChunkBuilder::DoAllocateBlockContext( | 2648 LInstruction* LChunkBuilder::DoAllocateBlockContext( |
| 2644 HAllocateBlockContext* instr) { | 2649 HAllocateBlockContext* instr) { |
| 2645 LOperand* context = UseFixed(instr->context(), cp); | 2650 LOperand* context = UseFixed(instr->context(), cp); |
| 2646 LOperand* function = UseRegisterAtStart(instr->function()); | 2651 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2647 LAllocateBlockContext* result = | 2652 LAllocateBlockContext* result = |
| 2648 new (zone()) LAllocateBlockContext(context, function); | 2653 new (zone()) LAllocateBlockContext(context, function); |
| 2649 return MarkAsCall(DefineFixed(result, cp), instr); | 2654 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2650 } | 2655 } |
| 2651 } // namespace internal | 2656 } // namespace internal |
| 2652 } // namespace v8 | 2657 } // namespace v8 |
| OLD | NEW |