| 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 // 3. Raise a TypeError if the receiver is not a date. | 1211 // 3. Raise a TypeError if the receiver is not a date. |
| 1212 __ bind(&receiver_not_date); | 1212 __ bind(&receiver_not_date); |
| 1213 { | 1213 { |
| 1214 FrameScope scope(masm, StackFrame::MANUAL); | 1214 FrameScope scope(masm, StackFrame::MANUAL); |
| 1215 __ EnterFrame(StackFrame::INTERNAL); | 1215 __ EnterFrame(StackFrame::INTERNAL); |
| 1216 __ CallRuntime(Runtime::kThrowNotDateError); | 1216 __ CallRuntime(Runtime::kThrowNotDateError); |
| 1217 } | 1217 } |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 // static | 1220 // static |
| 1221 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { | |
| 1222 // ----------- S t a t e ------------- | |
| 1223 // -- eax : argc | |
| 1224 // -- esp[0] : return address | |
| 1225 // -- esp[4] : first argument (left-hand side) | |
| 1226 // -- esp[8] : receiver (right-hand side) | |
| 1227 // ----------------------------------- | |
| 1228 | |
| 1229 { | |
| 1230 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 1231 __ mov(InstanceOfDescriptor::LeftRegister(), | |
| 1232 Operand(ebp, 2 * kPointerSize)); // Load left-hand side. | |
| 1233 __ mov(InstanceOfDescriptor::RightRegister(), | |
| 1234 Operand(ebp, 3 * kPointerSize)); // Load right-hand side. | |
| 1235 InstanceOfStub stub(masm->isolate(), true); | |
| 1236 __ CallStub(&stub); | |
| 1237 } | |
| 1238 | |
| 1239 // Pop the argument and the receiver. | |
| 1240 __ ret(2 * kPointerSize); | |
| 1241 } | |
| 1242 | |
| 1243 // static | |
| 1244 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1221 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
| 1245 // ----------- S t a t e ------------- | 1222 // ----------- S t a t e ------------- |
| 1246 // -- eax : argc | 1223 // -- eax : argc |
| 1247 // -- esp[0] : return address | 1224 // -- esp[0] : return address |
| 1248 // -- esp[4] : argArray | 1225 // -- esp[4] : argArray |
| 1249 // -- esp[8] : thisArg | 1226 // -- esp[8] : thisArg |
| 1250 // -- esp[12] : receiver | 1227 // -- esp[12] : receiver |
| 1251 // ----------------------------------- | 1228 // ----------------------------------- |
| 1252 | 1229 |
| 1253 // 1. Load receiver into edi, argArray into eax (if present), remove all | 1230 // 1. Load receiver into edi, argArray into eax (if present), remove all |
| (...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2926 // And "return" to the OSR entry point of the function. | 2903 // And "return" to the OSR entry point of the function. |
| 2927 __ ret(0); | 2904 __ ret(0); |
| 2928 } | 2905 } |
| 2929 | 2906 |
| 2930 | 2907 |
| 2931 #undef __ | 2908 #undef __ |
| 2932 } // namespace internal | 2909 } // namespace internal |
| 2933 } // namespace v8 | 2910 } // namespace v8 |
| 2934 | 2911 |
| 2935 #endif // V8_TARGET_ARCH_X87 | 2912 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |