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

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

Issue 2153053002: [builtins] Migrate NonNumberToNumber to TurboFan builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tail call to StringToNumber Created 4 years, 5 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/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/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 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 2838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2849 2849
2850 __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE); 2850 __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE);
2851 // r2: receiver 2851 // r2: receiver
2852 // r3: receiver instance type 2852 // r3: receiver instance type
2853 __ Ret(eq); 2853 __ Ret(eq);
2854 2854
2855 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), 2855 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(),
2856 RelocInfo::CODE_TARGET); 2856 RelocInfo::CODE_TARGET);
2857 } 2857 }
2858 2858
2859 // static
2860 void Builtins::Generate_NonNumberToNumber(MacroAssembler* masm) {
2861 // The NonNumberToNumber stub takes one argument in r2.
2862 __ AssertNotNumber(r2);
2863
2864 __ CompareObjectType(r2, r3, r3, FIRST_NONSTRING_TYPE);
2865 // r2: receiver
2866 // r3: receiver instance type
2867 __ Jump(masm->isolate()->builtins()->StringToNumber(), RelocInfo::CODE_TARGET,
2868 lt);
2869
2870 Label not_oddball;
2871 __ CmpP(r3, Operand(ODDBALL_TYPE));
2872 __ bne(&not_oddball);
2873 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToNumberOffset));
2874 __ Ret();
2875 __ bind(&not_oddball);
2876
2877 {
2878 FrameScope frame(masm, StackFrame::INTERNAL);
2879 // Push argument.
2880 __ push(r2);
2881 // We cannot use a tail call here because this builtin can also be called
2882 // from wasm.
2883 __ CallRuntime(Runtime::kToNumber);
2884 }
2885 __ Ret();
2886 }
2887
2888 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 2859 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
2889 // ----------- S t a t e ------------- 2860 // ----------- S t a t e -------------
2890 // -- r2 : actual number of arguments 2861 // -- r2 : actual number of arguments
2891 // -- r3 : function (passed through to callee) 2862 // -- r3 : function (passed through to callee)
2892 // -- r4 : expected number of arguments 2863 // -- r4 : expected number of arguments
2893 // -- r5 : new target (passed through to callee) 2864 // -- r5 : new target (passed through to callee)
2894 // ----------------------------------- 2865 // -----------------------------------
2895 2866
2896 Label invoke, dont_adapt_arguments, stack_overflow; 2867 Label invoke, dont_adapt_arguments, stack_overflow;
2897 2868
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 __ bkpt(0); 2986 __ bkpt(0);
3016 } 2987 }
3017 } 2988 }
3018 2989
3019 #undef __ 2990 #undef __
3020 2991
3021 } // namespace internal 2992 } // namespace internal
3022 } // namespace v8 2993 } // namespace v8
3023 2994
3024 #endif // V8_TARGET_ARCH_S390 2995 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698