Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index a0852b0d2181c0771653ce238aa21aad9b337b39..6f0414d341630aa3b1b60c718b2455c4a687679f 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -3695,6 +3695,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 eax and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToLengthStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(eax); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |