Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 55ac3f5f9185b52e23d46e75460d66546e2aa0db..0dc3ffd30bcd540896a86f3b1e5bed4aa332aa97 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -3689,6 +3689,38 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into x0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(x0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into x0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ Label convert, done_convert; |
+ __ JumpIfSmi(x0, &convert); |
+ STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
+ __ JumpIfObjectType(x0, x1, x1, LAST_NAME_TYPE, &done_convert, ls); |
+ __ Bind(&convert); |
+ ToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
+ __ Bind(&done_convert); |
+ context()->Plug(x0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |