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 f38c01bbeaa0cc36275a9bf83c31c97d8388da1d..9315643c891d39de3eaa532cf18623ea9421ba45 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -3822,6 +3822,20 @@ void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToNumber(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()); |
+ |
+ ToNumberStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |