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

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

Issue 2085183002: PPC/s390: [builtins] NonNumberToNumber and StringToNumber now use CallRuntime instead of TailCallRu… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_S390 5 #if V8_TARGET_ARCH_S390
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 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after
2725 2725
2726 // Check if string has a cached array index. 2726 // Check if string has a cached array index.
2727 Label runtime; 2727 Label runtime;
2728 __ LoadlW(r4, FieldMemOperand(r2, String::kHashFieldOffset)); 2728 __ LoadlW(r4, FieldMemOperand(r2, String::kHashFieldOffset));
2729 __ And(r0, r4, Operand(String::kContainsCachedArrayIndexMask)); 2729 __ And(r0, r4, Operand(String::kContainsCachedArrayIndexMask));
2730 __ bne(&runtime); 2730 __ bne(&runtime);
2731 __ IndexFromHash(r4, r2); 2731 __ IndexFromHash(r4, r2);
2732 __ Ret(); 2732 __ Ret();
2733 2733
2734 __ bind(&runtime); 2734 __ bind(&runtime);
2735 __ push(r2); // Push argument. 2735 {
2736 __ TailCallRuntime(Runtime::kStringToNumber); 2736 FrameScope frame(masm, StackFrame::INTERNAL);
2737 // Push argument.
2738 __ push(r2);
2739 // We cannot use a tail call here because this builtin can also be called
2740 // from wasm.
2741 __ CallRuntime(Runtime::kStringToNumber);
2742 }
2743 __ Ret();
2737 } 2744 }
2738 2745
2739 // static 2746 // static
2740 void Builtins::Generate_ToNumber(MacroAssembler* masm) { 2747 void Builtins::Generate_ToNumber(MacroAssembler* masm) {
2741 // The ToNumber stub takes one argument in r2. 2748 // The ToNumber stub takes one argument in r2.
2742 STATIC_ASSERT(kSmiTag == 0); 2749 STATIC_ASSERT(kSmiTag == 0);
2743 __ TestIfSmi(r2); 2750 __ TestIfSmi(r2);
2744 __ Ret(eq); 2751 __ Ret(eq);
2745 2752
2746 __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE); 2753 __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE);
(...skipping 16 matching lines...) Expand all
2763 __ Jump(masm->isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET, 2770 __ Jump(masm->isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET,
2764 lt); 2771 lt);
2765 2772
2766 Label not_oddball; 2773 Label not_oddball;
2767 __ CmpP(r3, Operand(ODDBALL_TYPE)); 2774 __ CmpP(r3, Operand(ODDBALL_TYPE));
2768 __ bne(&not_oddball); 2775 __ bne(&not_oddball);
2769 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToNumberOffset)); 2776 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToNumberOffset));
2770 __ Ret(); 2777 __ Ret();
2771 __ bind(&not_oddball); 2778 __ bind(&not_oddball);
2772 2779
2773 __ push(r2); // Push argument. 2780 {
2774 __ TailCallRuntime(Runtime::kToNumber); 2781 FrameScope frame(masm, StackFrame::INTERNAL);
2782 // Push argument.
2783 __ push(r2);
2784 // We cannot use a tail call here because this builtin can also be called
2785 // from wasm.
2786 __ CallRuntime(Runtime::kToNumber);
2787 }
2788 __ Ret();
2775 } 2789 }
2776 2790
2777 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 2791 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
2778 // ----------- S t a t e ------------- 2792 // ----------- S t a t e -------------
2779 // -- r2 : actual number of arguments 2793 // -- r2 : actual number of arguments
2780 // -- r3 : function (passed through to callee) 2794 // -- r3 : function (passed through to callee)
2781 // -- r4 : expected number of arguments 2795 // -- r4 : expected number of arguments
2782 // -- r5 : new target (passed through to callee) 2796 // -- r5 : new target (passed through to callee)
2783 // ----------------------------------- 2797 // -----------------------------------
2784 2798
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2904 __ bkpt(0); 2918 __ bkpt(0);
2905 } 2919 }
2906 } 2920 }
2907 2921
2908 #undef __ 2922 #undef __
2909 2923
2910 } // namespace internal 2924 } // namespace internal
2911 } // namespace v8 2925 } // namespace v8
2912 2926
2913 #endif // V8_TARGET_ARCH_S390 2927 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698