| 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_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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 __ j(zero, &new_target_not_constructor, Label::kNear); | 1568 __ j(zero, &new_target_not_constructor, Label::kNear); |
| 1569 | 1569 |
| 1570 // 4a. Construct the target with the given new.target and argumentsList. | 1570 // 4a. Construct the target with the given new.target and argumentsList. |
| 1571 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 1571 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
| 1572 | 1572 |
| 1573 // 4b. The target is not a constructor, throw an appropriate TypeError. | 1573 // 4b. The target is not a constructor, throw an appropriate TypeError. |
| 1574 __ bind(&target_not_constructor); | 1574 __ bind(&target_not_constructor); |
| 1575 { | 1575 { |
| 1576 StackArgumentsAccessor args(rsp, 0); | 1576 StackArgumentsAccessor args(rsp, 0); |
| 1577 __ movp(args.GetReceiverOperand(), rdi); | 1577 __ movp(args.GetReceiverOperand(), rdi); |
| 1578 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1578 __ TailCallRuntime(Runtime::kNotConstructor); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 // 4c. The new.target is not a constructor, throw an appropriate TypeError. | 1581 // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
| 1582 __ bind(&new_target_not_constructor); | 1582 __ bind(&new_target_not_constructor); |
| 1583 { | 1583 { |
| 1584 StackArgumentsAccessor args(rsp, 0); | 1584 StackArgumentsAccessor args(rsp, 0); |
| 1585 __ movp(args.GetReceiverOperand(), rdx); | 1585 __ movp(args.GetReceiverOperand(), rdx); |
| 1586 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); | 1586 __ TailCallRuntime(Runtime::kNotConstructor); |
| 1587 } | 1587 } |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { | 1590 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { |
| 1591 // ----------- S t a t e ------------- | 1591 // ----------- S t a t e ------------- |
| 1592 // -- rax : argc | 1592 // -- rax : argc |
| 1593 // -- rsp[0] : return address | 1593 // -- rsp[0] : return address |
| 1594 // -- rsp[8] : last argument | 1594 // -- rsp[8] : last argument |
| 1595 // ----------------------------------- | 1595 // ----------------------------------- |
| 1596 Label generic_array_code; | 1596 Label generic_array_code; |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3256 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3256 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
| 3257 Generate_OnStackReplacementHelper(masm, true); | 3257 Generate_OnStackReplacementHelper(masm, true); |
| 3258 } | 3258 } |
| 3259 | 3259 |
| 3260 #undef __ | 3260 #undef __ |
| 3261 | 3261 |
| 3262 } // namespace internal | 3262 } // namespace internal |
| 3263 } // namespace v8 | 3263 } // namespace v8 |
| 3264 | 3264 |
| 3265 #endif // V8_TARGET_ARCH_X64 | 3265 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |