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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 | 1002 |
1003 // 3. Raise a TypeError if the receiver is not a date. | 1003 // 3. Raise a TypeError if the receiver is not a date. |
1004 __ bind(&receiver_not_date); | 1004 __ bind(&receiver_not_date); |
1005 { | 1005 { |
1006 FrameScope scope(masm, StackFrame::MANUAL); | 1006 FrameScope scope(masm, StackFrame::MANUAL); |
1007 __ EnterFrame(StackFrame::INTERNAL); | 1007 __ EnterFrame(StackFrame::INTERNAL); |
1008 __ CallRuntime(Runtime::kThrowNotDateError); | 1008 __ CallRuntime(Runtime::kThrowNotDateError); |
1009 } | 1009 } |
1010 } | 1010 } |
1011 | 1011 |
| 1012 // static |
| 1013 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { |
| 1014 // ----------- S t a t e ------------- |
| 1015 // -- rax : argc |
| 1016 // -- rsp[0] : return address |
| 1017 // -- rsp[8] : first argument (left-hand side) |
| 1018 // -- rsp[16] : receiver (right-hand side) |
| 1019 // ----------------------------------- |
| 1020 |
| 1021 { |
| 1022 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1023 __ movp(InstanceOfDescriptor::LeftRegister(), |
| 1024 Operand(rbp, 2 * kPointerSize)); // Load left-hand side. |
| 1025 __ movp(InstanceOfDescriptor::RightRegister(), |
| 1026 Operand(rbp, 3 * kPointerSize)); // Load right-hand side. |
| 1027 InstanceOfStub stub(masm->isolate(), true); |
| 1028 __ CallStub(&stub); |
| 1029 } |
| 1030 |
| 1031 // Pop the argument and the receiver. |
| 1032 __ ret(2 * kPointerSize); |
| 1033 } |
1012 | 1034 |
1013 // static | 1035 // static |
1014 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1036 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1015 // ----------- S t a t e ------------- | 1037 // ----------- S t a t e ------------- |
1016 // -- rax : argc | 1038 // -- rax : argc |
1017 // -- rsp[0] : return address | 1039 // -- rsp[0] : return address |
1018 // -- rsp[8] : argArray | 1040 // -- rsp[8] : argArray |
1019 // -- rsp[16] : thisArg | 1041 // -- rsp[16] : thisArg |
1020 // -- rsp[24] : receiver | 1042 // -- rsp[24] : receiver |
1021 // ----------------------------------- | 1043 // ----------------------------------- |
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2652 __ ret(0); | 2674 __ ret(0); |
2653 } | 2675 } |
2654 | 2676 |
2655 | 2677 |
2656 #undef __ | 2678 #undef __ |
2657 | 2679 |
2658 } // namespace internal | 2680 } // namespace internal |
2659 } // namespace v8 | 2681 } // namespace v8 |
2660 | 2682 |
2661 #endif // V8_TARGET_ARCH_X64 | 2683 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |