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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
950 | 950 |
951 // 3. Raise a TypeError if the receiver is not a date. | 951 // 3. Raise a TypeError if the receiver is not a date. |
952 __ bind(&receiver_not_date); | 952 __ bind(&receiver_not_date); |
953 { | 953 { |
954 FrameScope scope(masm, StackFrame::MANUAL); | 954 FrameScope scope(masm, StackFrame::MANUAL); |
955 __ EnterFrame(StackFrame::INTERNAL); | 955 __ EnterFrame(StackFrame::INTERNAL); |
956 __ CallRuntime(Runtime::kThrowNotDateError); | 956 __ CallRuntime(Runtime::kThrowNotDateError); |
957 } | 957 } |
958 } | 958 } |
959 | 959 |
| 960 // static |
| 961 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { |
| 962 // ----------- S t a t e ------------- |
| 963 // -- eax : argc |
| 964 // -- esp[0] : return address |
| 965 // -- esp[4] : first argument (left-hand side) |
| 966 // -- esp[8] : receiver (right-hand side) |
| 967 // ----------------------------------- |
| 968 |
| 969 { |
| 970 FrameScope scope(masm, StackFrame::INTERNAL); |
| 971 __ mov(InstanceOfDescriptor::LeftRegister(), |
| 972 Operand(ebp, 2 * kPointerSize)); // Load left-hand side. |
| 973 __ mov(InstanceOfDescriptor::RightRegister(), |
| 974 Operand(ebp, 3 * kPointerSize)); // Load right-hand side. |
| 975 InstanceOfStub stub(masm->isolate(), true); |
| 976 __ CallStub(&stub); |
| 977 } |
| 978 |
| 979 // Pop the argument and the receiver. |
| 980 __ ret(2 * kPointerSize); |
| 981 } |
960 | 982 |
961 // static | 983 // static |
962 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 984 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
963 // ----------- S t a t e ------------- | 985 // ----------- S t a t e ------------- |
964 // -- eax : argc | 986 // -- eax : argc |
965 // -- esp[0] : return address | 987 // -- esp[0] : return address |
966 // -- esp[4] : argArray | 988 // -- esp[4] : argArray |
967 // -- esp[8] : thisArg | 989 // -- esp[8] : thisArg |
968 // -- esp[12] : receiver | 990 // -- esp[12] : receiver |
969 // ----------------------------------- | 991 // ----------------------------------- |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 1160 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
1139 | 1161 |
1140 // 3b. The target is not callable, throw an appropriate TypeError. | 1162 // 3b. The target is not callable, throw an appropriate TypeError. |
1141 __ bind(&target_not_callable); | 1163 __ bind(&target_not_callable); |
1142 { | 1164 { |
1143 __ mov(Operand(esp, kPointerSize), edi); | 1165 __ mov(Operand(esp, kPointerSize), edi); |
1144 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); | 1166 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); |
1145 } | 1167 } |
1146 } | 1168 } |
1147 | 1169 |
1148 | |
1149 void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { | 1170 void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { |
1150 // ----------- S t a t e ------------- | 1171 // ----------- S t a t e ------------- |
1151 // -- eax : argc | 1172 // -- eax : argc |
1152 // -- esp[0] : return address | 1173 // -- esp[0] : return address |
1153 // -- esp[4] : new.target (optional) | 1174 // -- esp[4] : new.target (optional) |
1154 // -- esp[8] : argumentsList | 1175 // -- esp[8] : argumentsList |
1155 // -- esp[12] : target | 1176 // -- esp[12] : target |
1156 // -- esp[16] : receiver | 1177 // -- esp[16] : receiver |
1157 // ----------------------------------- | 1178 // ----------------------------------- |
1158 | 1179 |
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2615 // And "return" to the OSR entry point of the function. | 2636 // And "return" to the OSR entry point of the function. |
2616 __ ret(0); | 2637 __ ret(0); |
2617 } | 2638 } |
2618 | 2639 |
2619 | 2640 |
2620 #undef __ | 2641 #undef __ |
2621 } // namespace internal | 2642 } // namespace internal |
2622 } // namespace v8 | 2643 } // namespace v8 |
2623 | 2644 |
2624 #endif // V8_TARGET_ARCH_X87 | 2645 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |