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 938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 | 949 |
950 // 3. Raise a TypeError if the receiver is not a date. | 950 // 3. Raise a TypeError if the receiver is not a date. |
951 __ bind(&receiver_not_date); | 951 __ bind(&receiver_not_date); |
952 { | 952 { |
953 FrameScope scope(masm, StackFrame::MANUAL); | 953 FrameScope scope(masm, StackFrame::MANUAL); |
954 __ EnterFrame(StackFrame::INTERNAL); | 954 __ EnterFrame(StackFrame::INTERNAL); |
955 __ CallRuntime(Runtime::kThrowNotDateError); | 955 __ CallRuntime(Runtime::kThrowNotDateError); |
956 } | 956 } |
957 } | 957 } |
958 | 958 |
| 959 // static |
| 960 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { |
| 961 // ----------- S t a t e ------------- |
| 962 // -- eax : argc |
| 963 // -- esp[0] : return address |
| 964 // -- esp[4] : first argument (left-hand side) |
| 965 // -- esp[8] : receiver (right-hand side) |
| 966 // ----------------------------------- |
| 967 |
| 968 { |
| 969 FrameScope scope(masm, StackFrame::INTERNAL); |
| 970 __ mov(InstanceOfDescriptor::LeftRegister(), |
| 971 Operand(ebp, 2 * kPointerSize)); // Load left-hand side. |
| 972 __ mov(InstanceOfDescriptor::RightRegister(), |
| 973 Operand(ebp, 3 * kPointerSize)); // Load right-hand side. |
| 974 InstanceOfStub stub(masm->isolate(), true); |
| 975 __ CallStub(&stub); |
| 976 } |
| 977 |
| 978 // Pop the argument and the receiver. |
| 979 __ ret(2 * kPointerSize); |
| 980 } |
959 | 981 |
960 // static | 982 // static |
961 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 983 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
962 // ----------- S t a t e ------------- | 984 // ----------- S t a t e ------------- |
963 // -- eax : argc | 985 // -- eax : argc |
964 // -- esp[0] : return address | 986 // -- esp[0] : return address |
965 // -- esp[4] : argArray | 987 // -- esp[4] : argArray |
966 // -- esp[8] : thisArg | 988 // -- esp[8] : thisArg |
967 // -- esp[12] : receiver | 989 // -- esp[12] : receiver |
968 // ----------------------------------- | 990 // ----------------------------------- |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); | 1157 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); |
1136 | 1158 |
1137 // 3b. The target is not callable, throw an appropriate TypeError. | 1159 // 3b. The target is not callable, throw an appropriate TypeError. |
1138 __ bind(&target_not_callable); | 1160 __ bind(&target_not_callable); |
1139 { | 1161 { |
1140 __ mov(Operand(esp, kPointerSize), edi); | 1162 __ mov(Operand(esp, kPointerSize), edi); |
1141 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); | 1163 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); |
1142 } | 1164 } |
1143 } | 1165 } |
1144 | 1166 |
1145 | |
1146 void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { | 1167 void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { |
1147 // ----------- S t a t e ------------- | 1168 // ----------- S t a t e ------------- |
1148 // -- eax : argc | 1169 // -- eax : argc |
1149 // -- esp[0] : return address | 1170 // -- esp[0] : return address |
1150 // -- esp[4] : new.target (optional) | 1171 // -- esp[4] : new.target (optional) |
1151 // -- esp[8] : argumentsList | 1172 // -- esp[8] : argumentsList |
1152 // -- esp[12] : target | 1173 // -- esp[12] : target |
1153 // -- esp[16] : receiver | 1174 // -- esp[16] : receiver |
1154 // ----------------------------------- | 1175 // ----------------------------------- |
1155 | 1176 |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2582 // And "return" to the OSR entry point of the function. | 2603 // And "return" to the OSR entry point of the function. |
2583 __ ret(0); | 2604 __ ret(0); |
2584 } | 2605 } |
2585 | 2606 |
2586 | 2607 |
2587 #undef __ | 2608 #undef __ |
2588 } // namespace internal | 2609 } // namespace internal |
2589 } // namespace v8 | 2610 } // namespace v8 |
2590 | 2611 |
2591 #endif // V8_TARGET_ARCH_IA32 | 2612 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |