OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.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 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1764 ExternalReference::get_date_field_function(masm->isolate()), 2); | 1764 ExternalReference::get_date_field_function(masm->isolate()), 2); |
1765 } | 1765 } |
1766 __ Ret(); | 1766 __ Ret(); |
1767 | 1767 |
1768 // 3. Raise a TypeError if the receiver is not a date. | 1768 // 3. Raise a TypeError if the receiver is not a date. |
1769 __ bind(&receiver_not_date); | 1769 __ bind(&receiver_not_date); |
1770 __ TailCallRuntime(Runtime::kThrowNotDateError); | 1770 __ TailCallRuntime(Runtime::kThrowNotDateError); |
1771 } | 1771 } |
1772 | 1772 |
1773 // static | 1773 // static |
1774 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { | |
1775 // ----------- S t a t e ------------- | |
1776 // -- r3 : argc | |
1777 // -- sp[0] : first argument (left-hand side) | |
1778 // -- sp[4] : receiver (right-hand side) | |
1779 // ----------------------------------- | |
1780 | |
1781 { | |
1782 FrameScope scope(masm, StackFrame::INTERNAL); | |
1783 __ LoadP(InstanceOfDescriptor::LeftRegister(), | |
1784 MemOperand(fp, 2 * kPointerSize)); // Load left-hand side. | |
1785 __ LoadP(InstanceOfDescriptor::RightRegister(), | |
1786 MemOperand(fp, 3 * kPointerSize)); // Load right-hand side. | |
1787 InstanceOfStub stub(masm->isolate(), true); | |
1788 __ CallStub(&stub); | |
1789 } | |
1790 | |
1791 // Pop the argument and the receiver. | |
1792 __ Ret(2); | |
1793 } | |
1794 | |
1795 // static | |
1796 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1774 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1797 // ----------- S t a t e ------------- | 1775 // ----------- S t a t e ------------- |
1798 // -- r3 : argc | 1776 // -- r3 : argc |
1799 // -- sp[0] : argArray | 1777 // -- sp[0] : argArray |
1800 // -- sp[4] : thisArg | 1778 // -- sp[4] : thisArg |
1801 // -- sp[8] : receiver | 1779 // -- sp[8] : receiver |
1802 // ----------------------------------- | 1780 // ----------------------------------- |
1803 | 1781 |
1804 // 1. Load receiver into r4, argArray into r3 (if present), remove all | 1782 // 1. Load receiver into r4, argArray into r3 (if present), remove all |
1805 // arguments from the stack (including the receiver), and push thisArg (if | 1783 // arguments from the stack (including the receiver), and push thisArg (if |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 __ bkpt(0); | 2869 __ bkpt(0); |
2892 } | 2870 } |
2893 } | 2871 } |
2894 | 2872 |
2895 | 2873 |
2896 #undef __ | 2874 #undef __ |
2897 } // namespace internal | 2875 } // namespace internal |
2898 } // namespace v8 | 2876 } // namespace v8 |
2899 | 2877 |
2900 #endif // V8_TARGET_ARCH_PPC | 2878 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |