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

Side by Side Diff: src/builtins/ia32/builtins-ia32.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 Immediate(1 << Map::kIsConstructor)); 1608 Immediate(1 << Map::kIsConstructor));
1609 __ j(zero, &new_target_not_constructor, Label::kNear); 1609 __ j(zero, &new_target_not_constructor, Label::kNear);
1610 1610
1611 // 4a. Construct the target with the given new.target and argumentsList. 1611 // 4a. Construct the target with the given new.target and argumentsList.
1612 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); 1612 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET);
1613 1613
1614 // 4b. The target is not a constructor, throw an appropriate TypeError. 1614 // 4b. The target is not a constructor, throw an appropriate TypeError.
1615 __ bind(&target_not_constructor); 1615 __ bind(&target_not_constructor);
1616 { 1616 {
1617 __ mov(Operand(esp, kPointerSize), edi); 1617 __ mov(Operand(esp, kPointerSize), edi);
1618 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 1618 __ TailCallRuntime(Runtime::kNotConstructor);
1619 } 1619 }
1620 1620
1621 // 4c. The new.target is not a constructor, throw an appropriate TypeError. 1621 // 4c. The new.target is not a constructor, throw an appropriate TypeError.
1622 __ bind(&new_target_not_constructor); 1622 __ bind(&new_target_not_constructor);
1623 { 1623 {
1624 __ mov(Operand(esp, kPointerSize), edx); 1624 __ mov(Operand(esp, kPointerSize), edx);
1625 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); 1625 __ TailCallRuntime(Runtime::kNotConstructor);
1626 } 1626 }
1627 } 1627 }
1628 1628
1629 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { 1629 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) {
1630 // ----------- S t a t e ------------- 1630 // ----------- S t a t e -------------
1631 // -- eax : argc 1631 // -- eax : argc
1632 // -- esp[0] : return address 1632 // -- esp[0] : return address
1633 // -- esp[4] : last argument 1633 // -- esp[4] : last argument
1634 // ----------------------------------- 1634 // -----------------------------------
1635 Label generic_array_code; 1635 Label generic_array_code;
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after
3363 3363
3364 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { 3364 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
3365 Generate_OnStackReplacementHelper(masm, true); 3365 Generate_OnStackReplacementHelper(masm, true);
3366 } 3366 }
3367 3367
3368 #undef __ 3368 #undef __
3369 } // namespace internal 3369 } // namespace internal
3370 } // namespace v8 3370 } // namespace v8
3371 3371
3372 #endif // V8_TARGET_ARCH_IA32 3372 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698