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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/contexts.h ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after
3971 DCHECK_EQ(args->length(), 1); 3971 DCHECK_EQ(args->length(), 1);
3972 // Load the argument into r0 and call the stub. 3972 // Load the argument into r0 and call the stub.
3973 VisitForAccumulatorValue(args->at(0)); 3973 VisitForAccumulatorValue(args->at(0));
3974 3974
3975 NumberToStringStub stub(isolate()); 3975 NumberToStringStub stub(isolate());
3976 __ CallStub(&stub); 3976 __ CallStub(&stub);
3977 context()->Plug(r0); 3977 context()->Plug(r0);
3978 } 3978 }
3979 3979
3980 3980
3981 void FullCodeGenerator::EmitToString(CallRuntime* expr) {
3982 ZoneList<Expression*>* args = expr->arguments();
3983 DCHECK_EQ(1, args->length());
3984
3985 // Load the argument into r0 and convert it.
3986 VisitForAccumulatorValue(args->at(0));
3987
3988 ToStringStub stub(isolate());
3989 __ CallStub(&stub);
3990 context()->Plug(r0);
3991 }
3992
3993
3994 void FullCodeGenerator::EmitToName(CallRuntime* expr) {
3995 ZoneList<Expression*>* args = expr->arguments();
3996 DCHECK_EQ(1, args->length());
3997
3998 // Load the argument into r0 and convert it.
3999 VisitForAccumulatorValue(args->at(0));
4000
4001 Label convert, done_convert;
4002 __ JumpIfSmi(r0, &convert);
4003 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE);
4004 __ CompareObjectType(r0, r1, r1, LAST_NAME_TYPE);
4005 __ b(ls, &done_convert);
4006 __ bind(&convert);
4007 ToStringStub stub(isolate());
4008 __ CallStub(&stub);
4009 __ bind(&done_convert);
4010 context()->Plug(r0);
4011 }
4012
4013
3981 void FullCodeGenerator::EmitToObject(CallRuntime* expr) { 4014 void FullCodeGenerator::EmitToObject(CallRuntime* expr) {
3982 ZoneList<Expression*>* args = expr->arguments(); 4015 ZoneList<Expression*>* args = expr->arguments();
3983 DCHECK_EQ(1, args->length()); 4016 DCHECK_EQ(1, args->length());
3984 4017
3985 // Load the argument into r0 and convert it. 4018 // Load the argument into r0 and convert it.
3986 VisitForAccumulatorValue(args->at(0)); 4019 VisitForAccumulatorValue(args->at(0));
3987 4020
3988 ToObjectStub stub(isolate()); 4021 ToObjectStub stub(isolate());
3989 __ CallStub(&stub); 4022 __ CallStub(&stub);
3990 context()->Plug(r0); 4023 context()->Plug(r0);
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
5376 DCHECK(interrupt_address == 5409 DCHECK(interrupt_address ==
5377 isolate->builtins()->OsrAfterStackCheck()->entry()); 5410 isolate->builtins()->OsrAfterStackCheck()->entry());
5378 return OSR_AFTER_STACK_CHECK; 5411 return OSR_AFTER_STACK_CHECK;
5379 } 5412 }
5380 5413
5381 5414
5382 } // namespace internal 5415 } // namespace internal
5383 } // namespace v8 5416 } // namespace v8
5384 5417
5385 #endif // V8_TARGET_ARCH_ARM 5418 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698