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 "src/crankshaft/s390/lithium-s390.h" | 5 #include "src/crankshaft/s390/lithium-s390.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 instr = AssignEnvironment(instr); | 809 instr = AssignEnvironment(instr); |
810 } | 810 } |
811 chunk_->AddInstruction(instr, current_block_); | 811 chunk_->AddInstruction(instr, current_block_); |
812 | 812 |
813 if (instr->IsCall()) { | 813 if (instr->IsCall()) { |
814 HEnvironment* hydrogen_env = current_block_->last_environment(); | 814 HEnvironment* hydrogen_env = current_block_->last_environment(); |
815 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 815 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
816 DCHECK_NOT_NULL(hydrogen_env); | 816 DCHECK_NOT_NULL(hydrogen_env); |
817 if (instr->IsSyntacticTailCall()) { | 817 if (instr->IsSyntacticTailCall()) { |
818 // If it was a syntactic tail call we need to drop the current frame and | 818 // If it was a syntactic tail call we need to drop the current frame and |
819 // an arguments adaptor frame on top of it (if the latter is present). | 819 // all the frames on top of it that are either an arguments adaptor frame |
| 820 // or a tail caller frame. |
820 hydrogen_env = hydrogen_env->outer(); | 821 hydrogen_env = hydrogen_env->outer(); |
821 if (hydrogen_env != nullptr && | 822 while (hydrogen_env != nullptr && |
822 hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) { | 823 (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR || |
| 824 hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) { |
823 hydrogen_env = hydrogen_env->outer(); | 825 hydrogen_env = hydrogen_env->outer(); |
824 } | 826 } |
825 if (hydrogen_env != nullptr) { | 827 if (hydrogen_env != nullptr) { |
826 // Push return value on top of outer environment. | 828 // Push return value on top of outer environment. |
827 hydrogen_env = hydrogen_env->Copy(); | 829 hydrogen_env = hydrogen_env->Copy(); |
828 hydrogen_env->Push(hydrogen_val); | 830 hydrogen_env->Push(hydrogen_val); |
829 } else { | 831 } else { |
830 // Although we don't need this lazy bailout for normal execution | 832 // Although we don't need this lazy bailout for normal execution |
831 // (because when we tail call from the outermost function we should pop | 833 // (because when we tail call from the outermost function we should pop |
832 // its frame) we still need it when debugger is on. | 834 // its frame) we still need it when debugger is on. |
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2315 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2314 LOperand* object = UseRegister(instr->object()); | 2316 LOperand* object = UseRegister(instr->object()); |
2315 LOperand* index = UseTempRegister(instr->index()); | 2317 LOperand* index = UseTempRegister(instr->index()); |
2316 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2318 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2317 LInstruction* result = DefineSameAsFirst(load); | 2319 LInstruction* result = DefineSameAsFirst(load); |
2318 return AssignPointerMap(result); | 2320 return AssignPointerMap(result); |
2319 } | 2321 } |
2320 | 2322 |
2321 } // namespace internal | 2323 } // namespace internal |
2322 } // namespace v8 | 2324 } // namespace v8 |
OLD | NEW |