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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 ExternalReference::get_date_field_function(masm->isolate()), 2); | 1740 ExternalReference::get_date_field_function(masm->isolate()), 2); |
1741 } | 1741 } |
1742 __ Ret(); | 1742 __ Ret(); |
1743 | 1743 |
1744 // 3. Raise a TypeError if the receiver is not a date. | 1744 // 3. Raise a TypeError if the receiver is not a date. |
1745 __ bind(&receiver_not_date); | 1745 __ bind(&receiver_not_date); |
1746 __ TailCallRuntime(Runtime::kThrowNotDateError); | 1746 __ TailCallRuntime(Runtime::kThrowNotDateError); |
1747 } | 1747 } |
1748 | 1748 |
1749 // static | 1749 // static |
1750 void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) { | |
1751 // ----------- S t a t e ------------- | |
1752 // -- a0 : argc | |
1753 // -- sp[0] : first argument (left-hand side) | |
1754 // -- sp[4] : receiver (right-hand side) | |
1755 // ----------------------------------- | |
1756 | |
1757 { | |
1758 FrameScope scope(masm, StackFrame::INTERNAL); | |
1759 __ lw(InstanceOfDescriptor::LeftRegister(), | |
1760 MemOperand(fp, 2 * kPointerSize)); // Load left-hand side. | |
1761 __ lw(InstanceOfDescriptor::RightRegister(), | |
1762 MemOperand(fp, 3 * kPointerSize)); // Load right-hand side. | |
1763 InstanceOfStub stub(masm->isolate(), true); | |
1764 __ CallStub(&stub); | |
1765 } | |
1766 | |
1767 // Pop the argument and the receiver. | |
1768 __ DropAndRet(2); | |
1769 } | |
1770 | |
1771 // static | |
1772 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1750 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1773 // ----------- S t a t e ------------- | 1751 // ----------- S t a t e ------------- |
1774 // -- a0 : argc | 1752 // -- a0 : argc |
1775 // -- sp[0] : argArray | 1753 // -- sp[0] : argArray |
1776 // -- sp[4] : thisArg | 1754 // -- sp[4] : thisArg |
1777 // -- sp[8] : receiver | 1755 // -- sp[8] : receiver |
1778 // ----------------------------------- | 1756 // ----------------------------------- |
1779 | 1757 |
1780 // 1. Load receiver into a1, argArray into a0 (if present), remove all | 1758 // 1. Load receiver into a1, argArray into a0 (if present), remove all |
1781 // arguments from the stack (including the receiver), and push thisArg (if | 1759 // arguments from the stack (including the receiver), and push thisArg (if |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2894 } | 2872 } |
2895 } | 2873 } |
2896 | 2874 |
2897 | 2875 |
2898 #undef __ | 2876 #undef __ |
2899 | 2877 |
2900 } // namespace internal | 2878 } // namespace internal |
2901 } // namespace v8 | 2879 } // namespace v8 |
2902 | 2880 |
2903 #endif // V8_TARGET_ARCH_MIPS | 2881 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |