| 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 chunk_->AddInstruction(clobber, current_block_); | 918 chunk_->AddInstruction(clobber, current_block_); |
| 919 } | 919 } |
| 920 chunk_->AddInstruction(instr, current_block_); | 920 chunk_->AddInstruction(instr, current_block_); |
| 921 | 921 |
| 922 if (instr->IsCall()) { | 922 if (instr->IsCall()) { |
| 923 HEnvironment* hydrogen_env = current_block_->last_environment(); | 923 HEnvironment* hydrogen_env = current_block_->last_environment(); |
| 924 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 924 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
| 925 DCHECK_NOT_NULL(hydrogen_env); | 925 DCHECK_NOT_NULL(hydrogen_env); |
| 926 if (instr->IsSyntacticTailCall()) { | 926 if (instr->IsSyntacticTailCall()) { |
| 927 // If it was a syntactic tail call we need to drop the current frame and | 927 // If it was a syntactic tail call we need to drop the current frame and |
| 928 // an arguments adaptor frame on top of it (if the latter is present). | 928 // all the frames on top of it that are either an arguments adaptor frame |
| 929 // or a tail caller frame. |
| 929 hydrogen_env = hydrogen_env->outer(); | 930 hydrogen_env = hydrogen_env->outer(); |
| 930 if (hydrogen_env != nullptr && | 931 while (hydrogen_env != nullptr && |
| 931 hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) { | 932 (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR || |
| 933 hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) { |
| 932 hydrogen_env = hydrogen_env->outer(); | 934 hydrogen_env = hydrogen_env->outer(); |
| 933 } | 935 } |
| 934 if (hydrogen_env != nullptr) { | 936 if (hydrogen_env != nullptr) { |
| 935 // Push return value on top of outer environment. | 937 // Push return value on top of outer environment. |
| 936 hydrogen_env = hydrogen_env->Copy(); | 938 hydrogen_env = hydrogen_env->Copy(); |
| 937 hydrogen_env->Push(hydrogen_val); | 939 hydrogen_env->Push(hydrogen_val); |
| 938 } else { | 940 } else { |
| 939 // Although we don't need this lazy bailout for normal execution | 941 // Although we don't need this lazy bailout for normal execution |
| 940 // (because when we tail call from the outermost function we should pop | 942 // (because when we tail call from the outermost function we should pop |
| 941 // its frame) we still need it when debugger is on. | 943 // its frame) we still need it when debugger is on. |
| (...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2615 LOperand* index = UseTempRegister(instr->index()); | 2617 LOperand* index = UseTempRegister(instr->index()); |
| 2616 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2618 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2617 LInstruction* result = DefineSameAsFirst(load); | 2619 LInstruction* result = DefineSameAsFirst(load); |
| 2618 return AssignPointerMap(result); | 2620 return AssignPointerMap(result); |
| 2619 } | 2621 } |
| 2620 | 2622 |
| 2621 } // namespace internal | 2623 } // namespace internal |
| 2622 } // namespace v8 | 2624 } // namespace v8 |
| 2623 | 2625 |
| 2624 #endif // V8_TARGET_ARCH_X87 | 2626 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |