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

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

Issue 2327703003: [builtins] Migrate ToNumber to TurboFan. (Closed)
Patch Set: Rebase Created 4 years, 3 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/mips/builtins-mips.cc ('k') | src/builtins/ppc/builtins-ppc.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 2876 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 void Builtins::Generate_Abort(MacroAssembler* masm) { 2887 void Builtins::Generate_Abort(MacroAssembler* masm) {
2888 // ----------- S t a t e ------------- 2888 // ----------- S t a t e -------------
2889 // -- a0 : message_id as Smi 2889 // -- a0 : message_id as Smi
2890 // -- ra : return address 2890 // -- ra : return address
2891 // ----------------------------------- 2891 // -----------------------------------
2892 __ Push(a0); 2892 __ Push(a0);
2893 __ Move(cp, Smi::FromInt(0)); 2893 __ Move(cp, Smi::FromInt(0));
2894 __ TailCallRuntime(Runtime::kAbort); 2894 __ TailCallRuntime(Runtime::kAbort);
2895 } 2895 }
2896 2896
2897 // static
2898 void Builtins::Generate_ToNumber(MacroAssembler* masm) {
2899 // The ToNumber stub takes one argument in a0.
2900 Label not_smi;
2901 __ JumpIfNotSmi(a0, &not_smi);
2902 __ Ret(USE_DELAY_SLOT);
2903 __ mov(v0, a0);
2904 __ bind(&not_smi);
2905
2906 Label not_heap_number;
2907 __ GetObjectType(a0, a1, a1);
2908 // a0: receiver
2909 // a1: receiver instance type
2910 __ Branch(&not_heap_number, ne, a1, Operand(HEAP_NUMBER_TYPE));
2911 __ Ret(USE_DELAY_SLOT);
2912 __ mov(v0, a0);
2913 __ bind(&not_heap_number);
2914
2915 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(),
2916 RelocInfo::CODE_TARGET);
2917 }
2918
2919 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 2897 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
2920 // State setup as expected by MacroAssembler::InvokePrologue. 2898 // State setup as expected by MacroAssembler::InvokePrologue.
2921 // ----------- S t a t e ------------- 2899 // ----------- S t a t e -------------
2922 // -- a0: actual arguments count 2900 // -- a0: actual arguments count
2923 // -- a1: function (passed through to callee) 2901 // -- a1: function (passed through to callee)
2924 // -- a2: expected arguments count 2902 // -- a2: expected arguments count
2925 // -- a3: new target (passed through to callee) 2903 // -- a3: new target (passed through to callee)
2926 // ----------------------------------- 2904 // -----------------------------------
2927 2905
2928 Label invoke, dont_adapt_arguments, stack_overflow; 2906 Label invoke, dont_adapt_arguments, stack_overflow;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3047 __ break_(0xCC); 3025 __ break_(0xCC);
3048 } 3026 }
3049 } 3027 }
3050 3028
3051 #undef __ 3029 #undef __
3052 3030
3053 } // namespace internal 3031 } // namespace internal
3054 } // namespace v8 3032 } // namespace v8
3055 3033
3056 #endif // V8_TARGET_ARCH_MIPS64 3034 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698