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 43d9aed55bc5d93182db7252e1bf4d914dfe1d3f..5320c45db138ee157064676984ae6627da529c81 100644 |
--- a/src/full-codegen/arm/full-codegen-arm.cc |
+++ b/src/full-codegen/arm/full-codegen-arm.cc |
@@ -1083,8 +1083,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ CompareObjectType(r0, r1, r1, FIRST_SPEC_OBJECT_TYPE); |
__ b(ge, &done_convert); |
__ bind(&convert); |
- __ push(r0); |
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
__ bind(&done_convert); |
PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
__ push(r0); |
@@ -4018,6 +4018,19 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into r0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(r0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |