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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1610 Immediate(1 << Map::kIsConstructor)); | 1610 Immediate(1 << Map::kIsConstructor)); |
1611 __ j(zero, &new_target_not_constructor, Label::kNear); | 1611 __ j(zero, &new_target_not_constructor, Label::kNear); |
1612 | 1612 |
1613 // 4a. Construct the target with the given new.target and argumentsList. | 1613 // 4a. Construct the target with the given new.target and argumentsList. |
1614 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 1614 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
1615 | 1615 |
1616 // 4b. The target is not a constructor, throw an appropriate TypeError. | 1616 // 4b. The target is not a constructor, throw an appropriate TypeError. |
1617 __ bind(&target_not_constructor); | 1617 __ bind(&target_not_constructor); |
1618 { | 1618 { |
1619 __ mov(Operand(esp, kPointerSize), edi); | 1619 __ mov(Operand(esp, kPointerSize), edi); |
1620 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1620 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
1621 } | 1621 } |
1622 | 1622 |
1623 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 1623 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
1624 __ bind(&new_target_not_constructor); | 1624 __ bind(&new_target_not_constructor); |
1625 { | 1625 { |
1626 __ mov(Operand(esp, kPointerSize), edx); | 1626 __ mov(Operand(esp, kPointerSize), edx); |
1627 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1627 __ TailCallRuntime(Runtime::kThrowNotConstructor); |
1628 } | 1628 } |
1629 } | 1629 } |
1630 | 1630 |
1631 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { | 1631 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { |
1632 // ----------- S t a t e ------------- | 1632 // ----------- S t a t e ------------- |
1633 // -- eax : argc | 1633 // -- eax : argc |
1634 // -- esp[0] : return address | 1634 // -- esp[0] : return address |
1635 // -- esp[4] : last argument | 1635 // -- esp[4] : last argument |
1636 // ----------------------------------- | 1636 // ----------------------------------- |
1637 Label generic_array_code; | 1637 Label generic_array_code; |
(...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3334 | 3334 |
3335 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3335 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3336 Generate_OnStackReplacementHelper(masm, true); | 3336 Generate_OnStackReplacementHelper(masm, true); |
3337 } | 3337 } |
3338 | 3338 |
3339 #undef __ | 3339 #undef __ |
3340 } // namespace internal | 3340 } // namespace internal |
3341 } // namespace v8 | 3341 } // namespace v8 |
3342 | 3342 |
3343 #endif // V8_TARGET_ARCH_X87 | 3343 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |