| 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2107 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, | 2107 __ TestAndBranchIfAllClear(x10, 1 << Map::kIsConstructor, |
| 2108 &new_target_not_constructor); | 2108 &new_target_not_constructor); |
| 2109 | 2109 |
| 2110 // 4a. Construct the target with the given new.target and argumentsList. | 2110 // 4a. Construct the target with the given new.target and argumentsList. |
| 2111 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2111 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
| 2112 | 2112 |
| 2113 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2113 // 4b. The target is not a constructor, throw an appropriate TypeError. |
| 2114 __ Bind(&target_not_constructor); | 2114 __ Bind(&target_not_constructor); |
| 2115 { | 2115 { |
| 2116 __ Poke(target, 0); | 2116 __ Poke(target, 0); |
| 2117 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2117 __ TailCallRuntime(Runtime::kNotConstructor); |
| 2118 } | 2118 } |
| 2119 | 2119 |
| 2120 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2120 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
| 2121 __ Bind(&new_target_not_constructor); | 2121 __ Bind(&new_target_not_constructor); |
| 2122 { | 2122 { |
| 2123 __ Poke(new_target, 0); | 2123 __ Poke(new_target, 0); |
| 2124 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2124 __ TailCallRuntime(Runtime::kNotConstructor); |
| 2125 } | 2125 } |
| 2126 } | 2126 } |
| 2127 | 2127 |
| 2128 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2128 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| 2129 __ SmiTag(x10, x0); | 2129 __ SmiTag(x10, x0); |
| 2130 __ Mov(x11, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 2130 __ Mov(x11, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
| 2131 __ Push(lr, fp); | 2131 __ Push(lr, fp); |
| 2132 __ Push(x11, x1, x10); | 2132 __ Push(x11, x1, x10); |
| 2133 __ Add(fp, jssp, | 2133 __ Add(fp, jssp, |
| 2134 StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); | 2134 StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3219 __ Unreachable(); | 3219 __ Unreachable(); |
| 3220 } | 3220 } |
| 3221 } | 3221 } |
| 3222 | 3222 |
| 3223 #undef __ | 3223 #undef __ |
| 3224 | 3224 |
| 3225 } // namespace internal | 3225 } // namespace internal |
| 3226 } // namespace v8 | 3226 } // namespace v8 |
| 3227 | 3227 |
| 3228 #endif // V8_TARGET_ARCH_ARM | 3228 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |