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_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 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 Immediate(1 << Map::kIsConstructor)); | 1643 Immediate(1 << Map::kIsConstructor)); |
1644 __ j(zero, &new_target_not_constructor, Label::kNear); | 1644 __ j(zero, &new_target_not_constructor, Label::kNear); |
1645 | 1645 |
1646 // 4a. Construct the target with the given new.target and argumentsList. | 1646 // 4a. Construct the target with the given new.target and argumentsList. |
1647 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 1647 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
1648 | 1648 |
1649 // 4b. The target is not a constructor, throw an appropriate TypeError. | 1649 // 4b. The target is not a constructor, throw an appropriate TypeError. |
1650 __ bind(&target_not_constructor); | 1650 __ bind(&target_not_constructor); |
1651 { | 1651 { |
1652 __ mov(Operand(esp, kPointerSize), edi); | 1652 __ mov(Operand(esp, kPointerSize), edi); |
1653 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1653 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
1654 } | 1654 } |
1655 | 1655 |
1656 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 1656 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
1657 __ bind(&new_target_not_constructor); | 1657 __ bind(&new_target_not_constructor); |
1658 { | 1658 { |
1659 __ mov(Operand(esp, kPointerSize), edx); | 1659 __ mov(Operand(esp, kPointerSize), edx); |
1660 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1660 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
1661 } | 1661 } |
1662 } | 1662 } |
1663 | 1663 |
1664 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { | 1664 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { |
1665 // ----------- S t a t e ------------- | 1665 // ----------- S t a t e ------------- |
1666 // -- eax : argc | 1666 // -- eax : argc |
1667 // -- esp[0] : return address | 1667 // -- esp[0] : return address |
1668 // -- esp[4] : last argument | 1668 // -- esp[4] : last argument |
1669 // ----------------------------------- | 1669 // ----------------------------------- |
1670 Label generic_array_code; | 1670 Label generic_array_code; |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 | 3398 |
3399 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3399 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3400 Generate_OnStackReplacementHelper(masm, true); | 3400 Generate_OnStackReplacementHelper(masm, true); |
3401 } | 3401 } |
3402 | 3402 |
3403 #undef __ | 3403 #undef __ |
3404 } // namespace internal | 3404 } // namespace internal |
3405 } // namespace v8 | 3405 } // namespace v8 |
3406 | 3406 |
3407 #endif // V8_TARGET_ARCH_IA32 | 3407 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |