Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index ed599ca6f0981ca2ca5a7be7cdb356a391cd4329..dd5ab55b253e1915eb8a182e9f7aa5b54dacf17f 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -3778,6 +3778,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 v0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ // Convert the object to an integer. |
+ Label done_convert; |
+ __ JumpIfSmi(v0, &done_convert); |
+ __ Push(v0); |
+ __ CallRuntime(Runtime::kToInteger, 1); |
+ __ bind(&done_convert); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(args->length(), 1); |