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 efe055d1d650b3b3b42a96e31d3382ff1f5cf103..178672ebca4e394a542b5423e97a57b83c1c935a 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -3797,6 +3797,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 r0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToLengthStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(r0); |
Jarin
2015/10/19 06:50:16
I see nearly the same code in EmitToString, EmitTo
Michael Starzinger
2015/10/19 08:21:08
Nah, PlugTOS targets top-of-stack, not the accumul
|
+} |
+ |
+ |
void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |