| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 62c6073a2fe96c333f07192ac156ed8b88aaa048..2c4a8042c31c50d22d6264cb4d94a5108df10f8c 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -1239,16 +1239,6 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
|
| __ CompareRoot(rax, Heap::kNullValueRootIndex);
|
| __ j(equal, loop_statement.break_label());
|
|
|
| - // Convert the iterator to a JS object.
|
| - Label convert, done_convert;
|
| - __ JumpIfSmi(rax, &convert);
|
| - __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rcx);
|
| - __ j(above_equal, &done_convert);
|
| - __ bind(&convert);
|
| - __ push(rax);
|
| - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
|
| - __ bind(&done_convert);
|
| -
|
| // Loop entry.
|
| __ bind(loop_statement.continue_label());
|
|
|
| @@ -1263,14 +1253,15 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
|
| &result_not_done);
|
| __ bind(&result_not_done);
|
|
|
| + PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
|
| +
|
| // each = result.value
|
| VisitForEffect(stmt->assign_each());
|
|
|
| // Generate code for the body of the loop.
|
| Visit(stmt->body());
|
|
|
| - // Check stack before looping.
|
| - PrepareForBailoutForId(stmt->BackEdgeId(), NO_REGISTERS);
|
| + // Loop.
|
| EmitBackEdgeBookkeeping(stmt, loop_statement.continue_label());
|
| __ jmp(loop_statement.continue_label());
|
|
|
|
|