| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2141 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, | 2141 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, |
| 2142 &new_target_not_constructor); | 2142 &new_target_not_constructor); |
| 2143 | 2143 |
| 2144 // 4a. Construct the target with the given new.target and argumentsList. | 2144 // 4a. Construct the target with the given new.target and argumentsList. |
| 2145 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2145 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
| 2146 | 2146 |
| 2147 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2147 // 4b. The target is not a constructor, throw an appropriate TypeError. |
| 2148 __ Bind(&target_not_constructor); | 2148 __ Bind(&target_not_constructor); |
| 2149 { | 2149 { |
| 2150 __ Poke(target, 0); | 2150 __ Poke(target, 0); |
| 2151 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2151 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2152 } | 2152 } |
| 2153 | 2153 |
| 2154 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2154 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
| 2155 __ Bind(&new_target_not_constructor); | 2155 __ Bind(&new_target_not_constructor); |
| 2156 { | 2156 { |
| 2157 __ Poke(new_target, 0); | 2157 __ Poke(new_target, 0); |
| 2158 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2158 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2159 } | 2159 } |
| 2160 } | 2160 } |
| 2161 | 2161 |
| 2162 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2162 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| 2163 __ SmiTag(x10, x0); | 2163 __ SmiTag(x10, x0); |
| 2164 __ Mov(x11, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 2164 __ Mov(x11, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
| 2165 __ Push(lr, fp); | 2165 __ Push(lr, fp); |
| 2166 __ Push(x11, x1, x10); | 2166 __ Push(x11, x1, x10); |
| 2167 __ Add(fp, jssp, | 2167 __ Add(fp, jssp, |
| 2168 StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); | 2168 StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 __ Unreachable(); | 3253 __ Unreachable(); |
| 3254 } | 3254 } |
| 3255 } | 3255 } |
| 3256 | 3256 |
| 3257 #undef __ | 3257 #undef __ |
| 3258 | 3258 |
| 3259 } // namespace internal | 3259 } // namespace internal |
| 3260 } // namespace v8 | 3260 } // namespace v8 |
| 3261 | 3261 |
| 3262 #endif // V8_TARGET_ARCH_ARM | 3262 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |