| 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 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 // 3. Raise a TypeError if the receiver is not a date. | 1255 // 3. Raise a TypeError if the receiver is not a date. |
| 1256 __ bind(&receiver_not_date); | 1256 __ bind(&receiver_not_date); |
| 1257 { | 1257 { |
| 1258 FrameScope scope(masm, StackFrame::MANUAL); | 1258 FrameScope scope(masm, StackFrame::MANUAL); |
| 1259 __ EnterFrame(StackFrame::INTERNAL); | 1259 __ EnterFrame(StackFrame::INTERNAL); |
| 1260 __ CallRuntime(Runtime::kThrowNotDateError); | 1260 __ CallRuntime(Runtime::kThrowNotDateError); |
| 1261 } | 1261 } |
| 1262 } | 1262 } |
| 1263 | 1263 |
| 1264 // static | 1264 // static |
| 1265 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { | |
| 1266 // ----------- S t a t e ------------- | |
| 1267 // -- rax : argc | |
| 1268 // -- rsp[0] : return address | |
| 1269 // -- rsp[8] : first argument (left-hand side) | |
| 1270 // -- rsp[16] : receiver (right-hand side) | |
| 1271 // ----------------------------------- | |
| 1272 | |
| 1273 { | |
| 1274 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 1275 __ movp(InstanceOfDescriptor::LeftRegister(), | |
| 1276 Operand(rbp, 2 * kPointerSize)); // Load left-hand side. | |
| 1277 __ movp(InstanceOfDescriptor::RightRegister(), | |
| 1278 Operand(rbp, 3 * kPointerSize)); // Load right-hand side. | |
| 1279 InstanceOfStub stub(masm->isolate(), true); | |
| 1280 __ CallStub(&stub); | |
| 1281 } | |
| 1282 | |
| 1283 // Pop the argument and the receiver. | |
| 1284 __ ret(2 * kPointerSize); | |
| 1285 } | |
| 1286 | |
| 1287 // static | |
| 1288 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1265 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
| 1289 // ----------- S t a t e ------------- | 1266 // ----------- S t a t e ------------- |
| 1290 // -- rax : argc | 1267 // -- rax : argc |
| 1291 // -- rsp[0] : return address | 1268 // -- rsp[0] : return address |
| 1292 // -- rsp[8] : argArray | 1269 // -- rsp[8] : argArray |
| 1293 // -- rsp[16] : thisArg | 1270 // -- rsp[16] : thisArg |
| 1294 // -- rsp[24] : receiver | 1271 // -- rsp[24] : receiver |
| 1295 // ----------------------------------- | 1272 // ----------------------------------- |
| 1296 | 1273 |
| 1297 // 1. Load receiver into rdi, argArray into rax (if present), remove all | 1274 // 1. Load receiver into rdi, argArray into rax (if present), remove all |
| (...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2955 __ ret(0); | 2932 __ ret(0); |
| 2956 } | 2933 } |
| 2957 | 2934 |
| 2958 | 2935 |
| 2959 #undef __ | 2936 #undef __ |
| 2960 | 2937 |
| 2961 } // namespace internal | 2938 } // namespace internal |
| 2962 } // namespace v8 | 2939 } // namespace v8 |
| 2963 | 2940 |
| 2964 #endif // V8_TARGET_ARCH_X64 | 2941 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |