OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 2093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2104 __ TestBit(r7, Map::kIsConstructor, r0); | 2104 __ TestBit(r7, Map::kIsConstructor, r0); |
2105 __ beq(&new_target_not_constructor, cr0); | 2105 __ beq(&new_target_not_constructor, cr0); |
2106 | 2106 |
2107 // 4a. Construct the target with the given new.target and argumentsList. | 2107 // 4a. Construct the target with the given new.target and argumentsList. |
2108 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2108 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
2109 | 2109 |
2110 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2110 // 4b. The target is not a constructor, throw an appropriate TypeError. |
2111 __ bind(&target_not_constructor); | 2111 __ bind(&target_not_constructor); |
2112 { | 2112 { |
2113 __ StoreP(r4, MemOperand(sp, 0)); | 2113 __ StoreP(r4, MemOperand(sp, 0)); |
2114 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2114 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
2115 } | 2115 } |
2116 | 2116 |
2117 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2117 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
2118 __ bind(&new_target_not_constructor); | 2118 __ bind(&new_target_not_constructor); |
2119 { | 2119 { |
2120 __ StoreP(r6, MemOperand(sp, 0)); | 2120 __ StoreP(r6, MemOperand(sp, 0)); |
2121 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2121 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
2122 } | 2122 } |
2123 } | 2123 } |
2124 | 2124 |
2125 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2125 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
2126 __ SmiTag(r3); | 2126 __ SmiTag(r3); |
2127 __ LoadSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 2127 __ LoadSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
2128 __ mflr(r0); | 2128 __ mflr(r0); |
2129 __ push(r0); | 2129 __ push(r0); |
2130 if (FLAG_enable_embedded_constant_pool) { | 2130 if (FLAG_enable_embedded_constant_pool) { |
2131 __ Push(fp, kConstantPoolRegister, r7, r4, r3); | 2131 __ Push(fp, kConstantPoolRegister, r7, r4, r3); |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3198 __ CallRuntime(Runtime::kThrowStackOverflow); | 3198 __ CallRuntime(Runtime::kThrowStackOverflow); |
3199 __ bkpt(0); | 3199 __ bkpt(0); |
3200 } | 3200 } |
3201 } | 3201 } |
3202 | 3202 |
3203 #undef __ | 3203 #undef __ |
3204 } // namespace internal | 3204 } // namespace internal |
3205 } // namespace v8 | 3205 } // namespace v8 |
3206 | 3206 |
3207 #endif // V8_TARGET_ARCH_PPC | 3207 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |