| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2086 __ tst(r4, Operand(1 << Map::kIsConstructor)); | 2086 __ tst(r4, Operand(1 << Map::kIsConstructor)); |
| 2087 __ b(eq, &new_target_not_constructor); | 2087 __ b(eq, &new_target_not_constructor); |
| 2088 | 2088 |
| 2089 // 4a. Construct the target with the given new.target and argumentsList. | 2089 // 4a. Construct the target with the given new.target and argumentsList. |
| 2090 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2090 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
| 2091 | 2091 |
| 2092 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2092 // 4b. The target is not a constructor, throw an appropriate TypeError. |
| 2093 __ bind(&target_not_constructor); | 2093 __ bind(&target_not_constructor); |
| 2094 { | 2094 { |
| 2095 __ str(r1, MemOperand(sp, 0)); | 2095 __ str(r1, MemOperand(sp, 0)); |
| 2096 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2096 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2097 } | 2097 } |
| 2098 | 2098 |
| 2099 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2099 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
| 2100 __ bind(&new_target_not_constructor); | 2100 __ bind(&new_target_not_constructor); |
| 2101 { | 2101 { |
| 2102 __ str(r3, MemOperand(sp, 0)); | 2102 __ str(r3, MemOperand(sp, 0)); |
| 2103 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2103 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2104 } | 2104 } |
| 2105 } | 2105 } |
| 2106 | 2106 |
| 2107 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2107 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| 2108 __ SmiTag(r0); | 2108 __ SmiTag(r0); |
| 2109 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 2109 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2110 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | | 2110 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | |
| 2111 (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | | 2111 (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | |
| 2112 fp.bit() | lr.bit()); | 2112 fp.bit() | lr.bit()); |
| 2113 __ add(fp, sp, | 2113 __ add(fp, sp, |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3147 __ bkpt(0); | 3147 __ bkpt(0); |
| 3148 } | 3148 } |
| 3149 } | 3149 } |
| 3150 | 3150 |
| 3151 #undef __ | 3151 #undef __ |
| 3152 | 3152 |
| 3153 } // namespace internal | 3153 } // namespace internal |
| 3154 } // namespace v8 | 3154 } // namespace v8 |
| 3155 | 3155 |
| 3156 #endif // V8_TARGET_ARCH_ARM | 3156 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |