Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 1465731ec43af1ddc747a83c20f4bb999b33ef07..412e1f5c6ce4ef49e9d5b8bf515a139b760ee2b4 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -1085,8 +1085,8 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) { |
__ JumpIfSmi(x0, &convert); |
__ JumpIfObjectType(x0, x10, x11, FIRST_SPEC_OBJECT_TYPE, &done_convert, ge); |
__ Bind(&convert); |
- __ Push(x0); |
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
__ Bind(&done_convert); |
PrepareForBailoutForId(stmt->ToObjectId(), TOS_REG); |
__ Push(x0); |
@@ -3726,6 +3726,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 x0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToObjectStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(x0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |