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 c4a4136f63703667a45deee33e5af61b869a8acd..074982e83e896414da94a9d49260d639330a9008 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -3507,6 +3507,19 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToLength(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into x0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToLengthStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(x0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |