Index: src/full-codegen/ppc/full-codegen-ppc.cc |
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc |
index 904b0106c747d446ccbde2c3829048b0f514436f..5aadb0d3e3d39e378504a53dc1cfed5ad8e9dc73 100644 |
--- a/src/full-codegen/ppc/full-codegen-ppc.cc |
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc |
@@ -1046,8 +1046,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ CompareObjectType(r3, r4, r4, FIRST_SPEC_OBJECT_TYPE); |
__ bge(&done_convert); |
__ bind(&convert); |
- __ push(r3); |
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
__ bind(&done_convert); |
PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
__ push(r3); |
@@ -4029,6 +4029,18 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ // Load the argument into r3 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(r3); |
+} |
+ |
+ |
void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |