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 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 | 1726 |
1727 // And "return" to the OSR entry point of the function. | 1727 // And "return" to the OSR entry point of the function. |
1728 __ Ret(); | 1728 __ Ret(); |
1729 } | 1729 } |
1730 | 1730 |
1731 | 1731 |
1732 // static | 1732 // static |
1733 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, | 1733 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, |
1734 int field_index) { | 1734 int field_index) { |
1735 // ----------- S t a t e ------------- | 1735 // ----------- S t a t e ------------- |
| 1736 // -- a0 : number of arguments |
| 1737 // -- a1 : function |
| 1738 // -- cp : context |
1736 // -- sp[0] : receiver | 1739 // -- sp[0] : receiver |
1737 // ----------------------------------- | 1740 // ----------------------------------- |
1738 | 1741 |
1739 // 1. Pop receiver into a0 and check that it's actually a JSDate object. | 1742 // 1. Pop receiver into a0 and check that it's actually a JSDate object. |
1740 Label receiver_not_date; | 1743 Label receiver_not_date; |
1741 { | 1744 { |
1742 __ Pop(a0); | 1745 __ Pop(a0); |
1743 __ JumpIfSmi(a0, &receiver_not_date); | 1746 __ JumpIfSmi(a0, &receiver_not_date); |
1744 __ GetObjectType(a0, t0, t0); | 1747 __ GetObjectType(a0, t0, t0); |
1745 __ Branch(&receiver_not_date, ne, t0, Operand(JS_DATE_TYPE)); | 1748 __ Branch(&receiver_not_date, ne, t0, Operand(JS_DATE_TYPE)); |
(...skipping 19 matching lines...) Expand all Loading... |
1765 FrameScope scope(masm, StackFrame::INTERNAL); | 1768 FrameScope scope(masm, StackFrame::INTERNAL); |
1766 __ PrepareCallCFunction(2, t0); | 1769 __ PrepareCallCFunction(2, t0); |
1767 __ li(a1, Operand(Smi::FromInt(field_index))); | 1770 __ li(a1, Operand(Smi::FromInt(field_index))); |
1768 __ CallCFunction( | 1771 __ CallCFunction( |
1769 ExternalReference::get_date_field_function(masm->isolate()), 2); | 1772 ExternalReference::get_date_field_function(masm->isolate()), 2); |
1770 } | 1773 } |
1771 __ Ret(); | 1774 __ Ret(); |
1772 | 1775 |
1773 // 3. Raise a TypeError if the receiver is not a date. | 1776 // 3. Raise a TypeError if the receiver is not a date. |
1774 __ bind(&receiver_not_date); | 1777 __ bind(&receiver_not_date); |
1775 __ TailCallRuntime(Runtime::kThrowNotDateError); | 1778 { |
| 1779 FrameScope scope(masm, StackFrame::MANUAL); |
| 1780 __ Push(a0, ra, fp); |
| 1781 __ Move(fp, sp); |
| 1782 __ Push(cp, a1); |
| 1783 __ Push(Smi::FromInt(0)); |
| 1784 __ CallRuntime(Runtime::kThrowNotDateError); |
| 1785 } |
1776 } | 1786 } |
1777 | 1787 |
1778 // static | 1788 // static |
1779 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { | 1789 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { |
1780 // ----------- S t a t e ------------- | 1790 // ----------- S t a t e ------------- |
1781 // -- a0 : argc | 1791 // -- a0 : argc |
1782 // -- sp[0] : argArray | 1792 // -- sp[0] : argArray |
1783 // -- sp[4] : thisArg | 1793 // -- sp[4] : thisArg |
1784 // -- sp[8] : receiver | 1794 // -- sp[8] : receiver |
1785 // ----------------------------------- | 1795 // ----------------------------------- |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 } | 2975 } |
2966 } | 2976 } |
2967 | 2977 |
2968 | 2978 |
2969 #undef __ | 2979 #undef __ |
2970 | 2980 |
2971 } // namespace internal | 2981 } // namespace internal |
2972 } // namespace v8 | 2982 } // namespace v8 |
2973 | 2983 |
2974 #endif // V8_TARGET_ARCH_MIPS | 2984 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |