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

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

Issue 2688393003: Fix TypeError message for Reflect.construct (Closed)
Patch Set: Fix order in runtime-internal.cc 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
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2113 __ And(t0, t0, Operand(1 << Map::kIsConstructor)); 2113 __ And(t0, t0, Operand(1 << Map::kIsConstructor));
2114 __ Branch(&new_target_not_constructor, eq, t0, Operand(zero_reg)); 2114 __ Branch(&new_target_not_constructor, eq, t0, Operand(zero_reg));
2115 2115
2116 // 4a. Construct the target with the given new.target and argumentsList. 2116 // 4a. Construct the target with the given new.target and argumentsList.
2117 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); 2117 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET);
2118 2118
2119 // 4b. The target is not a constructor, throw an appropriate TypeError. 2119 // 4b. The target is not a constructor, throw an appropriate TypeError.
2120 __ bind(&target_not_constructor); 2120 __ bind(&target_not_constructor);
2121 { 2121 {
2122 __ sw(a1, MemOperand(sp)); 2122 __ sw(a1, MemOperand(sp));
2123 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 2123 __ TailCallRuntime(Runtime::kThrowNotConstructor);
2124 } 2124 }
2125 2125
2126 // 4c. The new.target is not a constructor, throw an appropriate TypeError. 2126 // 4c. The new.target is not a constructor, throw an appropriate TypeError.
2127 __ bind(&new_target_not_constructor); 2127 __ bind(&new_target_not_constructor);
2128 { 2128 {
2129 __ sw(a3, MemOperand(sp)); 2129 __ sw(a3, MemOperand(sp));
2130 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 2130 __ TailCallRuntime(Runtime::kThrowNotConstructor);
2131 } 2131 }
2132 } 2132 }
2133 2133
2134 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { 2134 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
2135 __ sll(a0, a0, kSmiTagSize); 2135 __ sll(a0, a0, kSmiTagSize);
2136 __ li(t0, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 2136 __ li(t0, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2137 __ MultiPush(a0.bit() | a1.bit() | t0.bit() | fp.bit() | ra.bit()); 2137 __ MultiPush(a0.bit() | a1.bit() | t0.bit() | fp.bit() | ra.bit());
2138 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + 2138 __ Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp +
2139 kPointerSize)); 2139 kPointerSize));
2140 } 2140 }
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3220 __ break_(0xCC); 3220 __ break_(0xCC);
3221 } 3221 }
3222 } 3222 }
3223 3223
3224 #undef __ 3224 #undef __
3225 3225
3226 } // namespace internal 3226 } // namespace internal
3227 } // namespace v8 3227 } // namespace v8
3228 3228
3229 #endif // V8_TARGET_ARCH_MIPS 3229 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698