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 2040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 __ tst(r4, Operand(1 << Map::kIsConstructor)); | 2051 __ tst(r4, Operand(1 << Map::kIsConstructor)); |
2052 __ b(eq, &new_target_not_constructor); | 2052 __ b(eq, &new_target_not_constructor); |
2053 | 2053 |
2054 // 4a. Construct the target with the given new.target and argumentsList. | 2054 // 4a. Construct the target with the given new.target and argumentsList. |
2055 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2055 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
2056 | 2056 |
2057 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2057 // 4b. The target is not a constructor, throw an appropriate TypeError. |
2058 __ bind(&target_not_constructor); | 2058 __ bind(&target_not_constructor); |
2059 { | 2059 { |
2060 __ str(r1, MemOperand(sp, 0)); | 2060 __ str(r1, MemOperand(sp, 0)); |
2061 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2061 __ TailCallRuntime(Runtime::kNotConstructor); |
2062 } | 2062 } |
2063 | 2063 |
2064 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2064 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
2065 __ bind(&new_target_not_constructor); | 2065 __ bind(&new_target_not_constructor); |
2066 { | 2066 { |
2067 __ str(r3, MemOperand(sp, 0)); | 2067 __ str(r3, MemOperand(sp, 0)); |
2068 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2068 __ TailCallRuntime(Runtime::kNotConstructor); |
2069 } | 2069 } |
2070 } | 2070 } |
2071 | 2071 |
2072 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2072 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
2073 __ SmiTag(r0); | 2073 __ SmiTag(r0); |
2074 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 2074 __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
2075 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | | 2075 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | |
2076 (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | | 2076 (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) | |
2077 fp.bit() | lr.bit()); | 2077 fp.bit() | lr.bit()); |
2078 __ add(fp, sp, | 2078 __ add(fp, sp, |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3112 __ bkpt(0); | 3112 __ bkpt(0); |
3113 } | 3113 } |
3114 } | 3114 } |
3115 | 3115 |
3116 #undef __ | 3116 #undef __ |
3117 | 3117 |
3118 } // namespace internal | 3118 } // namespace internal |
3119 } // namespace v8 | 3119 } // namespace v8 |
3120 | 3120 |
3121 #endif // V8_TARGET_ARCH_ARM | 3121 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |