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

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

Issue 2117273002: Revert of [intrinsic] Drop the %_ValueOf intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-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 // 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 2840 matching lines...) Expand 10 before | Expand all | Expand 10 after
2851 // Non-JS objects have class null. 2851 // Non-JS objects have class null.
2852 __ bind(&null); 2852 __ bind(&null);
2853 __ LoadRoot(v0, Heap::kNullValueRootIndex); 2853 __ LoadRoot(v0, Heap::kNullValueRootIndex);
2854 2854
2855 // All done. 2855 // All done.
2856 __ bind(&done); 2856 __ bind(&done);
2857 2857
2858 context()->Plug(v0); 2858 context()->Plug(v0);
2859 } 2859 }
2860 2860
2861
2862 void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
2863 ZoneList<Expression*>* args = expr->arguments();
2864 DCHECK(args->length() == 1);
2865
2866 VisitForAccumulatorValue(args->at(0)); // Load the object.
2867
2868 Label done;
2869 // If the object is a smi return the object.
2870 __ JumpIfSmi(v0, &done);
2871 // If the object is not a value type, return the object.
2872 __ GetObjectType(v0, a1, a1);
2873 __ Branch(&done, ne, a1, Operand(JS_VALUE_TYPE));
2874
2875 __ ld(v0, FieldMemOperand(v0, JSValue::kValueOffset));
2876
2877 __ bind(&done);
2878 context()->Plug(v0);
2879 }
2880
2861 2881
2862 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { 2882 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) {
2863 ZoneList<Expression*>* args = expr->arguments(); 2883 ZoneList<Expression*>* args = expr->arguments();
2864 DCHECK(args->length() == 1); 2884 DCHECK(args->length() == 1);
2865 2885
2866 VisitForAccumulatorValue(args->at(0)); 2886 VisitForAccumulatorValue(args->at(0));
2867 2887
2868 Label done; 2888 Label done;
2869 StringCharFromCodeGenerator generator(v0, a1); 2889 StringCharFromCodeGenerator generator(v0, a1);
2870 generator.GenerateFast(masm_); 2890 generator.GenerateFast(masm_);
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
3787 reinterpret_cast<uint64_t>( 3807 reinterpret_cast<uint64_t>(
3788 isolate->builtins()->OnStackReplacement()->entry())); 3808 isolate->builtins()->OnStackReplacement()->entry()));
3789 return ON_STACK_REPLACEMENT; 3809 return ON_STACK_REPLACEMENT;
3790 } 3810 }
3791 3811
3792 3812
3793 } // namespace internal 3813 } // namespace internal
3794 } // namespace v8 3814 } // namespace v8
3795 3815
3796 #endif // V8_TARGET_ARCH_MIPS64 3816 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698