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