Index: src/full-codegen/arm/full-codegen-arm.cc |
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc |
index ca25d6ea554d94811cb7146501b7c5713a513a9c..d63e5b1702fface0454b85ee12ffba856b391243 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -3978,6 +3978,39 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into r0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(r0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into r0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ Label convert, done_convert; |
+ __ JumpIfSmi(r0, &convert); |
+ STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
+ __ CompareObjectType(r0, r1, r1, LAST_NAME_TYPE); |
+ __ b(ls, &done_convert); |
+ __ bind(&convert); |
+ ToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
+ __ bind(&done_convert); |
+ context()->Plug(r0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |