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 ec4d6d4681e2225a7067bdc68957807e726062c0..d152f9e601bf4abc653faa308564025be174e3e8 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -3766,6 +3766,23 @@ void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into r0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ // Convert the object to an integer. |
+ Label done_convert; |
+ __ JumpIfSmi(r0, &done_convert); |
+ __ Push(r0); |
+ __ CallRuntime(Runtime::kToInteger, 1); |
+ __ bind(&done_convert); |
+ context()->Plug(r0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(args->length(), 1); |