| 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/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 870 instr = AssignEnvironment(instr); | 870 instr = AssignEnvironment(instr); |
| 871 } | 871 } |
| 872 chunk_->AddInstruction(instr, current_block_); | 872 chunk_->AddInstruction(instr, current_block_); |
| 873 | 873 |
| 874 if (instr->IsCall()) { | 874 if (instr->IsCall()) { |
| 875 HEnvironment* hydrogen_env = current_block_->last_environment(); | 875 HEnvironment* hydrogen_env = current_block_->last_environment(); |
| 876 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; | 876 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; |
| 877 DCHECK_NOT_NULL(hydrogen_env); | 877 DCHECK_NOT_NULL(hydrogen_env); |
| 878 if (instr->IsSyntacticTailCall()) { | 878 if (instr->IsSyntacticTailCall()) { |
| 879 // If it was a syntactic tail call we need to drop the current frame and | 879 // If it was a syntactic tail call we need to drop the current frame and |
| 880 // an arguments adaptor frame on top of it (if the latter is present). | 880 // all the frames on top of it that are either an arguments adaptor frame |
| 881 // or a tail caller frame. |
| 881 hydrogen_env = hydrogen_env->outer(); | 882 hydrogen_env = hydrogen_env->outer(); |
| 882 if (hydrogen_env != nullptr && | 883 while (hydrogen_env != nullptr && |
| 883 hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) { | 884 (hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR || |
| 885 hydrogen_env->frame_type() == TAIL_CALLER_FUNCTION)) { |
| 884 hydrogen_env = hydrogen_env->outer(); | 886 hydrogen_env = hydrogen_env->outer(); |
| 885 } | 887 } |
| 886 if (hydrogen_env != nullptr) { | 888 if (hydrogen_env != nullptr) { |
| 887 // Push return value on top of outer environment. | 889 // Push return value on top of outer environment. |
| 888 hydrogen_env = hydrogen_env->Copy(); | 890 hydrogen_env = hydrogen_env->Copy(); |
| 889 hydrogen_env->Push(hydrogen_val); | 891 hydrogen_env->Push(hydrogen_val); |
| 890 } else { | 892 } else { |
| 891 // Although we don't need this lazy bailout for normal execution | 893 // Although we don't need this lazy bailout for normal execution |
| 892 // (because when we tail call from the outermost function we should pop | 894 // (because when we tail call from the outermost function we should pop |
| 893 // its frame) we still need it when debugger is on. | 895 // its frame) we still need it when debugger is on. |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2558 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2557 LOperand* object = UseRegister(instr->object()); | 2559 LOperand* object = UseRegister(instr->object()); |
| 2558 LOperand* index = UseTempRegister(instr->index()); | 2560 LOperand* index = UseTempRegister(instr->index()); |
| 2559 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2561 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2560 LInstruction* result = DefineSameAsFirst(load); | 2562 LInstruction* result = DefineSameAsFirst(load); |
| 2561 return AssignPointerMap(result); | 2563 return AssignPointerMap(result); |
| 2562 } | 2564 } |
| 2563 | 2565 |
| 2564 } // namespace internal | 2566 } // namespace internal |
| 2565 } // namespace v8 | 2567 } // namespace v8 |
| OLD | NEW |