Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Side by Side Diff: src/builtins/mips/builtins-mips.cc

Issue 2688393003: Fix TypeError message for Reflect.construct (Closed)
Patch Set: Fix the rest Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 __ And(t0, t0, Operand(1 << Map::kIsConstructor)); 2078 __ And(t0, t0, Operand(1 << Map::kIsConstructor));
2079 __ Branch(&new_target_not_constructor, eq, t0, Operand(zero_reg)); 2079 __ Branch(&new_target_not_constructor, eq, t0, Operand(zero_reg));
2080 2080
2081 // 4a. Construct the target with the given new.target and argumentsList. 2081 // 4a. Construct the target with the given new.target and argumentsList.
2082 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); 2082 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET);
2083 2083
2084 // 4b. The target is not a constructor, throw an appropriate TypeError. 2084 // 4b. The target is not a constructor, throw an appropriate TypeError.
2085 __ bind(&target_not_constructor); 2085 __ bind(&target_not_constructor);
2086 { 2086 {
2087 __ sw(a1, MemOperand(sp)); 2087 __ sw(a1, MemOperand(sp));
2088 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 2088 __ TailCallRuntime(Runtime::kNotConstructor);
2089 } 2089 }
2090 2090
2091 // 4c. The new.target is not a constructor, throw an appropriate TypeError. 2091 // 4c. The new.target is not a constructor, throw an appropriate TypeError.
2092 __ bind(&new_target_not_constructor); 2092 __ bind(&new_target_not_constructor);
2093 { 2093 {
2094 __ sw(a3, MemOperand(sp)); 2094 __ sw(a3, MemOperand(sp));
2095 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 2095 __ TailCallRuntime(Runtime::kNotConstructor);
2096 } 2096 }
2097 } 2097 }
2098 2098
2099 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { 2099 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
2100 __ sll(a0, a0, kSmiTagSize); 2100 __ sll(a0, a0, kSmiTagSize);
2101 __ li(t0, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 2101 __ li(t0, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2102 __ MultiPush(a0.bit() | a1.bit() | t0.bit() | fp.bit() | ra.bit()); 2102 __ MultiPush(a0.bit() | a1.bit() | t0.bit() | fp.bit() | ra.bit());
2103 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + 2103 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp +
2104 kPointerSize)); 2104 kPointerSize));
2105 } 2105 }
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3185 __ break_(0xCC); 3185 __ break_(0xCC);
3186 } 3186 }
3187 } 3187 }
3188 3188
3189 #undef __ 3189 #undef __
3190 3190
3191 } // namespace internal 3191 } // namespace internal
3192 } // namespace v8 3192 } // namespace v8
3193 3193
3194 #endif // V8_TARGET_ARCH_MIPS 3194 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698