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 bf526280a6f29c633f0bcb7b03156ee881876eb6..a17552f014ea5f46e8122fbd0de76c2c483974c2 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -1085,8 +1085,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ GetObjectType(a0, a1, a1); |
__ Branch(&done_convert, ge, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
__ bind(&convert); |
- __ push(a0); |
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
__ mov(a0, v0); |
__ bind(&done_convert); |
PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
@@ -4028,6 +4028,20 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToObject(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()); |
+ |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |