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

Side by Side Diff: src/builtins/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.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_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 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 void Builtins::Generate_Abort(MacroAssembler* masm) { 2894 void Builtins::Generate_Abort(MacroAssembler* masm) {
2895 // ----------- S t a t e ------------- 2895 // ----------- S t a t e -------------
2896 // -- a0 : message_id as Smi 2896 // -- a0 : message_id as Smi
2897 // -- ra : return address 2897 // -- ra : return address
2898 // ----------------------------------- 2898 // -----------------------------------
2899 __ Push(a0); 2899 __ Push(a0);
2900 __ Move(cp, Smi::FromInt(0)); 2900 __ Move(cp, Smi::FromInt(0));
2901 __ TailCallRuntime(Runtime::kAbort); 2901 __ TailCallRuntime(Runtime::kAbort);
2902 } 2902 }
2903 2903
2904 // static
2905 void Builtins::Generate_ToNumber(MacroAssembler* masm) {
2906 // The ToNumber stub takes one argument in a0.
2907 Label not_smi;
2908 __ JumpIfNotSmi(a0, &not_smi);
2909 __ Ret(USE_DELAY_SLOT);
2910 __ mov(v0, a0);
2911 __ bind(&not_smi);
2912
2913 Label not_heap_number;
2914 __ GetObjectType(a0, a1, a1);
2915 // a0: receiver
2916 // a1: receiver instance type
2917 __ Branch(&not_heap_number, ne, a1, Operand(HEAP_NUMBER_TYPE));
2918 __ Ret(USE_DELAY_SLOT);
2919 __ mov(v0, a0);
2920 __ bind(&not_heap_number);
2921
2922 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(),
2923 RelocInfo::CODE_TARGET);
2924 }
2925
2926 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { 2904 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
2927 // State setup as expected by MacroAssembler::InvokePrologue. 2905 // State setup as expected by MacroAssembler::InvokePrologue.
2928 // ----------- S t a t e ------------- 2906 // ----------- S t a t e -------------
2929 // -- a0: actual arguments count 2907 // -- a0: actual arguments count
2930 // -- a1: function (passed through to callee) 2908 // -- a1: function (passed through to callee)
2931 // -- a2: expected arguments count 2909 // -- a2: expected arguments count
2932 // -- a3: new target (passed through to callee) 2910 // -- a3: new target (passed through to callee)
2933 // ----------------------------------- 2911 // -----------------------------------
2934 2912
2935 Label invoke, dont_adapt_arguments, stack_overflow; 2913 Label invoke, dont_adapt_arguments, stack_overflow;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
3052 __ break_(0xCC); 3030 __ break_(0xCC);
3053 } 3031 }
3054 } 3032 }
3055 3033
3056 #undef __ 3034 #undef __
3057 3035
3058 } // namespace internal 3036 } // namespace internal
3059 } // namespace v8 3037 } // namespace v8
3060 3038
3061 #endif // V8_TARGET_ARCH_MIPS 3039 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698