OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 __ CallCFunction( | 1431 __ CallCFunction( |
1432 ExternalReference::get_date_field_function(masm->isolate()), 2); | 1432 ExternalReference::get_date_field_function(masm->isolate()), 2); |
1433 } | 1433 } |
1434 __ Ret(); | 1434 __ Ret(); |
1435 | 1435 |
1436 // 3. Raise a TypeError if the receiver is not a date. | 1436 // 3. Raise a TypeError if the receiver is not a date. |
1437 __ Bind(&receiver_not_date); | 1437 __ Bind(&receiver_not_date); |
1438 __ TailCallRuntime(Runtime::kThrowNotDateError); | 1438 __ TailCallRuntime(Runtime::kThrowNotDateError); |
1439 } | 1439 } |
1440 | 1440 |
| 1441 // static |
| 1442 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { |
| 1443 // ----------- S t a t e ------------- |
| 1444 // -- x0 : argc |
| 1445 // -- jssp[0] : first argument (left-hand side) |
| 1446 // -- jssp[8] : receiver (right-hand side) |
| 1447 // ----------------------------------- |
| 1448 ASM_LOCATION("Builtins::Generate_FunctionHasInstance"); |
| 1449 |
| 1450 { |
| 1451 FrameScope scope(masm, StackFrame::INTERNAL); |
| 1452 __ Ldr(InstanceOfDescriptor::LeftRegister(), |
| 1453 MemOperand(fp, 2 * kPointerSize)); // Load left-hand side. |
| 1454 __ Ldr(InstanceOfDescriptor::RightRegister(), |
| 1455 MemOperand(fp, 3 * kPointerSize)); // Load right-hand side. |
| 1456 InstanceOfStub stub(masm->isolate(), true); |
| 1457 __ CallStub(&stub); |
| 1458 } |
| 1459 |
| 1460 // Pop the argument and the receiver. |
| 1461 __ Drop(2); |
| 1462 __ Ret(); |
| 1463 } |
1441 | 1464 |
1442 // static | 1465 // static |
1443 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1466 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1444 // ----------- S t a t e ------------- | 1467 // ----------- S t a t e ------------- |
1445 // -- x0 : argc | 1468 // -- x0 : argc |
1446 // -- jssp[0] : argArray (if argc == 2) | 1469 // -- jssp[0] : argArray (if argc == 2) |
1447 // -- jssp[8] : thisArg (if argc >= 1) | 1470 // -- jssp[8] : thisArg (if argc >= 1) |
1448 // -- jssp[16] : receiver | 1471 // -- jssp[16] : receiver |
1449 // ----------------------------------- | 1472 // ----------------------------------- |
1450 ASM_LOCATION("Builtins::Generate_FunctionPrototypeApply"); | 1473 ASM_LOCATION("Builtins::Generate_FunctionPrototypeApply"); |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 } | 2652 } |
2630 } | 2653 } |
2631 | 2654 |
2632 | 2655 |
2633 #undef __ | 2656 #undef __ |
2634 | 2657 |
2635 } // namespace internal | 2658 } // namespace internal |
2636 } // namespace v8 | 2659 } // namespace v8 |
2637 | 2660 |
2638 #endif // V8_TARGET_ARCH_ARM | 2661 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |