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/mips64/lithium-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-mips64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 instr = AssignEnvironment(instr); | 880 instr = AssignEnvironment(instr); |
881 } | 881 } |
882 chunk_->AddInstruction(instr, current_block_); | 882 chunk_->AddInstruction(instr, current_block_); |
883 | 883 |
884 if (instr->IsCall()) { | 884 if (instr->IsCall()) { |
885 HEnvironment* hydrogen_env = current_block_->last_environment(); | 885 HEnvironment* hydrogen_env = current_block_->last_environment(); |
886 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 886 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
887 DCHECK_NOT_NULL(hydrogen_env); | 887 DCHECK_NOT_NULL(hydrogen_env); |
888 if (instr->IsSyntacticTailCall()) { | 888 if (instr->IsSyntacticTailCall()) { |
889 // If it was a syntactic tail call we need to drop the current frame and | 889 // If it was a syntactic tail call we need to drop the current frame and |
890 // an arguments adaptor frame on top of it (if the latter is present). | 890 // all the frames on top of it that are either an arguments adaptor frame |
| 891 // or a tail caller frame. |
891 hydrogen_env = hydrogen_env->outer(); | 892 hydrogen_env = hydrogen_env->outer(); |
892 if (hydrogen_env != nullptr && | 893 while (hydrogen_env != nullptr && |
893 hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) { | 894 (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR || |
| 895 hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) { |
894 hydrogen_env = hydrogen_env->outer(); | 896 hydrogen_env = hydrogen_env->outer(); |
895 } | 897 } |
896 if (hydrogen_env != nullptr) { | 898 if (hydrogen_env != nullptr) { |
897 // Push return value on top of outer environment. | 899 // Push return value on top of outer environment. |
898 hydrogen_env = hydrogen_env->Copy(); | 900 hydrogen_env = hydrogen_env->Copy(); |
899 hydrogen_env->Push(hydrogen_val); | 901 hydrogen_env->Push(hydrogen_val); |
900 } else { | 902 } else { |
901 // Although we don't need this lazy bailout for normal execution | 903 // Although we don't need this lazy bailout for normal execution |
902 // (because when we tail call from the outermost function we should pop | 904 // (because when we tail call from the outermost function we should pop |
903 // its frame) we still need it when debugger is on. | 905 // its frame) we still need it when debugger is on. |
(...skipping 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 LOperand* index = UseTempRegister(instr->index()); | 2512 LOperand* index = UseTempRegister(instr->index()); |
2511 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2513 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2512 LInstruction* result = DefineSameAsFirst(load); | 2514 LInstruction* result = DefineSameAsFirst(load); |
2513 return AssignPointerMap(result); | 2515 return AssignPointerMap(result); |
2514 } | 2516 } |
2515 | 2517 |
2516 } // namespace internal | 2518 } // namespace internal |
2517 } // namespace v8 | 2519 } // namespace v8 |
2518 | 2520 |
2519 #endif // V8_TARGET_ARCH_MIPS64 | 2521 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |