| 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/ia32/lithium-ia32.h" | 5 #include "src/crankshaft/ia32/lithium-ia32.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 | 10 |
| (...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 instr = AssignEnvironment(instr); | 903 instr = AssignEnvironment(instr); |
| 904 } | 904 } |
| 905 chunk_->AddInstruction(instr, current_block_); | 905 chunk_->AddInstruction(instr, current_block_); |
| 906 | 906 |
| 907 if (instr->IsCall()) { | 907 if (instr->IsCall()) { |
| 908 HEnvironment* hydrogen_env = current_block_->last_environment(); | 908 HEnvironment* hydrogen_env = current_block_->last_environment(); |
| 909 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 909 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
| 910 DCHECK_NOT_NULL(hydrogen_env); | 910 DCHECK_NOT_NULL(hydrogen_env); |
| 911 if (instr->IsSyntacticTailCall()) { | 911 if (instr->IsSyntacticTailCall()) { |
| 912 // If it was a syntactic tail call we need to drop the current frame and | 912 // If it was a syntactic tail call we need to drop the current frame and |
| 913 // an arguments adaptor frame on top of it (if the latter is present). | 913 // all the frames on top of it that are either an arguments adaptor frame |
| 914 // or a tail caller frame. |
| 914 hydrogen_env = hydrogen_env->outer(); | 915 hydrogen_env = hydrogen_env->outer(); |
| 915 if (hydrogen_env != nullptr && | 916 while (hydrogen_env != nullptr && |
| 916 hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) { | 917 (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR || |
| 918 hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) { |
| 917 hydrogen_env = hydrogen_env->outer(); | 919 hydrogen_env = hydrogen_env->outer(); |
| 918 } | 920 } |
| 919 if (hydrogen_env != nullptr) { | 921 if (hydrogen_env != nullptr) { |
| 920 // Push return value on top of outer environment. | 922 // Push return value on top of outer environment. |
| 921 hydrogen_env = hydrogen_env->Copy(); | 923 hydrogen_env = hydrogen_env->Copy(); |
| 922 hydrogen_env->Push(hydrogen_val); | 924 hydrogen_env->Push(hydrogen_val); |
| 923 } else { | 925 } else { |
| 924 // Although we don't need this lazy bailout for normal execution | 926 // Although we don't need this lazy bailout for normal execution |
| 925 // (because when we tail call from the outermost function we should pop | 927 // (because when we tail call from the outermost function we should pop |
| 926 // its frame) we still need it when debugger is on. | 928 // its frame) we still need it when debugger is on. |
| (...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2622 LOperand* index = UseTempRegister(instr->index()); | 2624 LOperand* index = UseTempRegister(instr->index()); |
| 2623 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2625 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2624 LInstruction* result = DefineSameAsFirst(load); | 2626 LInstruction* result = DefineSameAsFirst(load); |
| 2625 return AssignPointerMap(result); | 2627 return AssignPointerMap(result); |
| 2626 } | 2628 } |
| 2627 | 2629 |
| 2628 } // namespace internal | 2630 } // namespace internal |
| 2629 } // namespace v8 | 2631 } // namespace v8 |
| 2630 | 2632 |
| 2631 #endif // V8_TARGET_ARCH_IA32 | 2633 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |