| 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/x64/lithium-x64.h" | 5 #include "src/crankshaft/x64/lithium-x64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 #endif | 893 #endif |
| 894 | 894 |
| 895 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { | 895 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { |
| 896 instr = AssignPointerMap(instr); | 896 instr = AssignPointerMap(instr); |
| 897 } | 897 } |
| 898 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 898 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
| 899 instr = AssignEnvironment(instr); | 899 instr = AssignEnvironment(instr); |
| 900 } | 900 } |
| 901 chunk_->AddInstruction(instr, current_block_); | 901 chunk_->AddInstruction(instr, current_block_); |
| 902 | 902 |
| 903 if (instr->IsCall() || instr->IsPrologue()) { | 903 if (instr->IsCall()) { |
| 904 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 904 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
| 905 if (hydrogen_val->HasObservableSideEffects()) { | 905 if (hydrogen_val->HasObservableSideEffects()) { |
| 906 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); | 906 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); |
| 907 sim->ReplayEnvironment(current_block_->last_environment()); | 907 sim->ReplayEnvironment(current_block_->last_environment()); |
| 908 hydrogen_value_for_lazy_bailout = sim; | 908 hydrogen_value_for_lazy_bailout = sim; |
| 909 } | 909 } |
| 910 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); | 910 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); |
| 911 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); | 911 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); |
| 912 chunk_->AddInstruction(bailout, current_block_); | 912 chunk_->AddInstruction(bailout, current_block_); |
| 913 } | 913 } |
| 914 } | 914 } |
| 915 | 915 |
| 916 | 916 |
| 917 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { | 917 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { |
| 918 return new(zone()) LGoto(instr->FirstSuccessor()); | 918 return new(zone()) LGoto(instr->FirstSuccessor()); |
| 919 } | 919 } |
| 920 | 920 |
| 921 | 921 |
| 922 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { | 922 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { |
| 923 return new (zone()) LPrologue(); | 923 LInstruction* result = new (zone()) LPrologue(); |
| 924 if (info_->num_heap_slots() > 0) { |
| 925 result = MarkAsCall(result, instr); |
| 926 } |
| 927 return result; |
| 924 } | 928 } |
| 925 | 929 |
| 926 | 930 |
| 927 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { | 931 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { |
| 928 return new(zone()) LDebugBreak(); | 932 return new(zone()) LDebugBreak(); |
| 929 } | 933 } |
| 930 | 934 |
| 931 | 935 |
| 932 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { | 936 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { |
| 933 HValue* value = instr->value(); | 937 HValue* value = instr->value(); |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2601 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { | 2605 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { |
| 2602 LOperand* context = UseRegisterAtStart(instr->context()); | 2606 LOperand* context = UseRegisterAtStart(instr->context()); |
| 2603 return new(zone()) LStoreFrameContext(context); | 2607 return new(zone()) LStoreFrameContext(context); |
| 2604 } | 2608 } |
| 2605 | 2609 |
| 2606 | 2610 |
| 2607 } // namespace internal | 2611 } // namespace internal |
| 2608 } // namespace v8 | 2612 } // namespace v8 |
| 2609 | 2613 |
| 2610 #endif // V8_TARGET_ARCH_X64 | 2614 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |