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

Side by Side Diff: src/builtins/x64/builtins-x64.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/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.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 1592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1603 __ j(zero, &new_target_not_constructor, Label::kNear); 1603 __ j(zero, &new_target_not_constructor, Label::kNear);
1604 1604
1605 // 4a. Construct the target with the given new.target and argumentsList. 1605 // 4a. Construct the target with the given new.target and argumentsList.
1606 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); 1606 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET);
1607 1607
1608 // 4b. The target is not a constructor, throw an appropriate TypeError. 1608 // 4b. The target is not a constructor, throw an appropriate TypeError.
1609 __ bind(&target_not_constructor); 1609 __ bind(&target_not_constructor);
1610 { 1610 {
1611 StackArgumentsAccessor args(rsp, 0); 1611 StackArgumentsAccessor args(rsp, 0);
1612 __ movp(args.GetReceiverOperand(), rdi); 1612 __ movp(args.GetReceiverOperand(), rdi);
1613 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 1613 __ TailCallRuntime(Runtime::kThrowNotConstructor);
1614 } 1614 }
1615 1615
1616 // 4c. The new.target is not a constructor, throw an appropriate TypeError. 1616 // 4c. The new.target is not a constructor, throw an appropriate TypeError.
1617 __ bind(&new_target_not_constructor); 1617 __ bind(&new_target_not_constructor);
1618 { 1618 {
1619 StackArgumentsAccessor args(rsp, 0); 1619 StackArgumentsAccessor args(rsp, 0);
1620 __ movp(args.GetReceiverOperand(), rdx); 1620 __ movp(args.GetReceiverOperand(), rdx);
1621 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 1621 __ TailCallRuntime(Runtime::kThrowNotConstructor);
1622 } 1622 }
1623 } 1623 }
1624 1624
1625 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { 1625 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) {
1626 // ----------- S t a t e ------------- 1626 // ----------- S t a t e -------------
1627 // -- rax : argc 1627 // -- rax : argc
1628 // -- rsp[0] : return address 1628 // -- rsp[0] : return address
1629 // -- rsp[8] : last argument 1629 // -- rsp[8] : last argument
1630 // ----------------------------------- 1630 // -----------------------------------
1631 Label generic_array_code; 1631 Label generic_array_code;
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3291 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3292 Generate_OnStackReplacementHelper(masm, true); 3292 Generate_OnStackReplacementHelper(masm, true);
3293 } 3293 }
3294 3294
3295 #undef __ 3295 #undef __
3296 3296
3297 } // namespace internal 3297 } // namespace internal
3298 } // namespace v8 3298 } // namespace v8
3299 3299
3300 #endif // V8_TARGET_ARCH_X64 3300 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/builtins/s390/builtins-s390.cc ('k') | src/builtins/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698