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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 2126453002: [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix noi18n build (narf) 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
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 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after
2853 __ bind(&null); 2853 __ bind(&null);
2854 __ LoadRoot(v0, Heap::kNullValueRootIndex); 2854 __ LoadRoot(v0, Heap::kNullValueRootIndex);
2855 2855
2856 // All done. 2856 // All done.
2857 __ bind(&done); 2857 __ bind(&done);
2858 2858
2859 context()->Plug(v0); 2859 context()->Plug(v0);
2860 } 2860 }
2861 2861
2862 2862
2863 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
2864 ZoneList<Expression*>* args = expr->arguments();
2865 DCHECK(args->length() == 1);
2866
2867 VisitForAccumulatorValue(args->at(0)); // Load the object.
2868
2869 Label done;
2870 // If the object is a smi return the object.
2871 __ JumpIfSmi(v0, &done);
2872 // If the object is not a value type, return the object.
2873 __ GetObjectType(v0, a1, a1);
2874 __ Branch(&done, ne, a1, Operand(JS_VALUE_TYPE));
2875
2876 __ lw(v0, FieldMemOperand(v0, JSValue::kValueOffset));
2877
2878 __ bind(&done);
2879 context()->Plug(v0);
2880 }
2881
2882
2883 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 2863 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2884 ZoneList<Expression*>* args = expr->arguments(); 2864 ZoneList<Expression*>* args = expr->arguments();
2885 DCHECK(args->length() == 1); 2865 DCHECK(args->length() == 1);
2886 2866
2887 VisitForAccumulatorValue(args->at(0)); 2867 VisitForAccumulatorValue(args->at(0));
2888 2868
2889 Label done; 2869 Label done;
2890 StringCharFromCodeGenerator generator(v0, a1); 2870 StringCharFromCodeGenerator generator(v0, a1);
2891 generator.GenerateFast(masm_); 2871 generator.GenerateFast(masm_);
2892 __ jmp(&done); 2872 __ jmp(&done);
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 reinterpret_cast<uint32_t>( 3780 reinterpret_cast<uint32_t>(
3801 isolate->builtins()->OnStackReplacement()->entry())); 3781 isolate->builtins()->OnStackReplacement()->entry()));
3802 return ON_STACK_REPLACEMENT; 3782 return ON_STACK_REPLACEMENT;
3803 } 3783 }
3804 3784
3805 3785
3806 } // namespace internal 3786 } // namespace internal
3807 } // namespace v8 3787 } // namespace v8
3808 3788
3809 #endif // V8_TARGET_ARCH_MIPS 3789 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698