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

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

Issue 1319973007: [runtime] Add %ToString and %_ToString and remove the TO_STRING builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-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 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 3975 matching lines...) Expand 10 before | Expand all | Expand 10 after
3986 // Load the argument into a0 and call the stub. 3986 // Load the argument into a0 and call the stub.
3987 VisitForAccumulatorValue(args->at(0)); 3987 VisitForAccumulatorValue(args->at(0));
3988 __ mov(a0, result_register()); 3988 __ mov(a0, result_register());
3989 3989
3990 NumberToStringStub stub(isolate()); 3990 NumberToStringStub stub(isolate());
3991 __ CallStub(&stub); 3991 __ CallStub(&stub);
3992 context()->Plug(v0); 3992 context()->Plug(v0);
3993 } 3993 }
3994 3994
3995 3995
3996 void FullCodeGenerator::EmitToString(CallRuntime* expr) {
3997 ZoneList<Expression*>* args = expr->arguments();
3998 DCHECK_EQ(1, args->length());
3999
4000 // Load the argument into a0 and convert it.
4001 VisitForAccumulatorValue(args->at(0));
4002 __ mov(a0, result_register());
4003
4004 ToStringStub stub(isolate());
4005 __ CallStub(&stub);
4006 context()->Plug(v0);
4007 }
4008
4009
4010 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
4011 ZoneList<Expression*>* args = expr->arguments();
4012 DCHECK_EQ(1, args->length());
4013
4014 // Load the argument into v0 and convert it.
4015 VisitForAccumulatorValue(args->at(0));
4016
4017 Label convert, done_convert;
4018 __ JumpIfSmi(v0, &convert);
4019 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
4020 __ GetObjectType(v0, a1, a1);
4021 __ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE));
4022 __ bind(&convert);
4023 ToStringStub stub(isolate());
4024 __ mov(a0, v0);
4025 __ CallStub(&stub);
4026 __ bind(&done_convert);
4027 context()->Plug(v0);
4028 }
4029
4030
3996 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { 4031 void FullCodeGenerator::EmitToObject(CallRuntime* expr) {
3997 ZoneList<Expression*>* args = expr->arguments(); 4032 ZoneList<Expression*>* args = expr->arguments();
3998 DCHECK_EQ(1, args->length()); 4033 DCHECK_EQ(1, args->length());
3999 4034
4000 // Load the argument into a0 and convert it. 4035 // Load the argument into a0 and convert it.
4001 VisitForAccumulatorValue(args->at(0)); 4036 VisitForAccumulatorValue(args->at(0));
4002 __ mov(a0, result_register()); 4037 __ mov(a0, result_register());
4003 4038
4004 ToObjectStub stub(isolate()); 4039 ToObjectStub stub(isolate());
4005 __ CallStub(&stub); 4040 __ CallStub(&stub);
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 reinterpret_cast<uint64_t>( 5384 reinterpret_cast<uint64_t>(
5350 isolate->builtins()->OsrAfterStackCheck()->entry())); 5385 isolate->builtins()->OsrAfterStackCheck()->entry()));
5351 return OSR_AFTER_STACK_CHECK; 5386 return OSR_AFTER_STACK_CHECK;
5352 } 5387 }
5353 5388
5354 5389
5355 } // namespace internal 5390 } // namespace internal
5356 } // namespace v8 5391 } // namespace v8
5357 5392
5358 #endif // V8_TARGET_ARCH_MIPS64 5393 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698