Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index ceb0926eb73116fdc3b4e9c6fc4e503a9cd9db55..020d385161e42a46e6b50d41c4f4ba697e580508 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -3814,6 +3814,20 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToLength(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into a0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ __ mov(a0, result_register()); |
+ |
+ ToLengthStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |