Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 2078443002: [builtins] Use BUILTIN frame in DatePrototype_GetField (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@20160616-builtin-frame
Patch Set: Do not store argc Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 1713
1714 // And "return" to the OSR entry point of the function. 1714 // And "return" to the OSR entry point of the function.
1715 __ Ret(); 1715 __ Ret();
1716 } 1716 }
1717 1717
1718 1718
1719 // static 1719 // static
1720 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm, 1720 void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
1721 int field_index) { 1721 int field_index) {
1722 // ----------- S t a t e ------------- 1722 // ----------- S t a t e -------------
1723 // -- a0 : number of arguments
1724 // -- a1 : function
1725 // -- cp : context
1723 // -- sp[0] : receiver 1726 // -- sp[0] : receiver
1724 // ----------------------------------- 1727 // -----------------------------------
1725 1728
1726 // 1. Pop receiver into a0 and check that it's actually a JSDate object. 1729 // 1. Pop receiver into a0 and check that it's actually a JSDate object.
1727 Label receiver_not_date; 1730 Label receiver_not_date;
1728 { 1731 {
1729 __ Pop(a0); 1732 __ Pop(a0);
1730 __ JumpIfSmi(a0, &receiver_not_date); 1733 __ JumpIfSmi(a0, &receiver_not_date);
1731 __ GetObjectType(a0, t0, t0); 1734 __ GetObjectType(a0, t0, t0);
1732 __ Branch(&receiver_not_date, ne, t0, Operand(JS_DATE_TYPE)); 1735 __ Branch(&receiver_not_date, ne, t0, Operand(JS_DATE_TYPE));
(...skipping 19 matching lines...) Expand all
1752 FrameScope scope(masm, StackFrame::INTERNAL); 1755 FrameScope scope(masm, StackFrame::INTERNAL);
1753 __ PrepareCallCFunction(2, t0); 1756 __ PrepareCallCFunction(2, t0);
1754 __ li(a1, Operand(Smi::FromInt(field_index))); 1757 __ li(a1, Operand(Smi::FromInt(field_index)));
1755 __ CallCFunction( 1758 __ CallCFunction(
1756 ExternalReference::get_date_field_function(masm->isolate()), 2); 1759 ExternalReference::get_date_field_function(masm->isolate()), 2);
1757 } 1760 }
1758 __ Ret(); 1761 __ Ret();
1759 1762
1760 // 3. Raise a TypeError if the receiver is not a date. 1763 // 3. Raise a TypeError if the receiver is not a date.
1761 __ bind(&receiver_not_date); 1764 __ bind(&receiver_not_date);
1762 __ TailCallRuntime(Runtime::kThrowNotDateError); 1765 {
1766 FrameScope scope(masm, StackFrame::MANUAL);
1767 __ Push(a0, ra, fp);
1768 __ Move(fp, sp);
1769 __ Push(cp, a1);
1770 __ Push(Smi::FromInt(0));
1771 __ CallRuntime(Runtime::kThrowNotDateError);
1772 }
1763 } 1773 }
1764 1774
1765 // static 1775 // static
1766 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) { 1776 void Builtins::Generate_FunctionPrototypeApply(MacroAssembler* masm) {
1767 // ----------- S t a t e ------------- 1777 // ----------- S t a t e -------------
1768 // -- a0 : argc 1778 // -- a0 : argc
1769 // -- sp[0] : argArray 1779 // -- sp[0] : argArray
1770 // -- sp[4] : thisArg 1780 // -- sp[4] : thisArg
1771 // -- sp[8] : receiver 1781 // -- sp[8] : receiver
1772 // ----------------------------------- 1782 // -----------------------------------
(...skipping 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2953 } 2963 }
2954 } 2964 }
2955 2965
2956 2966
2957 #undef __ 2967 #undef __
2958 2968
2959 } // namespace internal 2969 } // namespace internal
2960 } // namespace v8 2970 } // namespace v8
2961 2971
2962 #endif // V8_TARGET_ARCH_MIPS64 2972 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/builtins-mips.cc ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698