| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2117 __ And(a4, a4, Operand(1 << Map::kIsConstructor)); | 2117 __ And(a4, a4, Operand(1 << Map::kIsConstructor)); |
| 2118 __ Branch(&new_target_not_constructor, eq, a4, Operand(zero_reg)); | 2118 __ Branch(&new_target_not_constructor, eq, a4, Operand(zero_reg)); |
| 2119 | 2119 |
| 2120 // 4a. Construct the target with the given new.target and argumentsList. | 2120 // 4a. Construct the target with the given new.target and argumentsList. |
| 2121 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 2121 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
| 2122 | 2122 |
| 2123 // 4b. The target is not a constructor, throw an appropriate TypeError. | 2123 // 4b. The target is not a constructor, throw an appropriate TypeError. |
| 2124 __ bind(&target_not_constructor); | 2124 __ bind(&target_not_constructor); |
| 2125 { | 2125 { |
| 2126 __ sd(target, MemOperand(sp)); | 2126 __ sd(target, MemOperand(sp)); |
| 2127 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2127 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2128 } | 2128 } |
| 2129 | 2129 |
| 2130 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 2130 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
| 2131 __ bind(&new_target_not_constructor); | 2131 __ bind(&new_target_not_constructor); |
| 2132 { | 2132 { |
| 2133 __ sd(new_target, MemOperand(sp)); | 2133 __ sd(new_target, MemOperand(sp)); |
| 2134 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 2134 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
| 2135 } | 2135 } |
| 2136 } | 2136 } |
| 2137 | 2137 |
| 2138 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { | 2138 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| 2139 // __ sll(a0, a0, kSmiTagSize); | 2139 // __ sll(a0, a0, kSmiTagSize); |
| 2140 __ dsll32(a0, a0, 0); | 2140 __ dsll32(a0, a0, 0); |
| 2141 __ li(a4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 2141 __ li(a4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 2142 __ MultiPush(a0.bit() | a1.bit() | a4.bit() | fp.bit() | ra.bit()); | 2142 __ MultiPush(a0.bit() | a1.bit() | a4.bit() | fp.bit() | ra.bit()); |
| 2143 __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + | 2143 __ Daddu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + |
| 2144 kPointerSize)); | 2144 kPointerSize)); |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3244 __ break_(0xCC); | 3244 __ break_(0xCC); |
| 3245 } | 3245 } |
| 3246 } | 3246 } |
| 3247 | 3247 |
| 3248 #undef __ | 3248 #undef __ |
| 3249 | 3249 |
| 3250 } // namespace internal | 3250 } // namespace internal |
| 3251 } // namespace v8 | 3251 } // namespace v8 |
| 3252 | 3252 |
| 3253 #endif // V8_TARGET_ARCH_MIPS64 | 3253 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |