| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 030e6f6265f87040bf9218549a803c636416a826..c9e280ddf7e089b73490a8be547f48e0af292aa0 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1214,8 +1214,8 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
|
| Iteration loop_statement(this, stmt);
|
| increment_loop_depth();
|
|
|
| - // var iterator = iterable[@@iterator]()
|
| - VisitForAccumulatorValue(stmt->assign_iterator());
|
| + // var iterable = subject
|
| + VisitForAccumulatorValue(stmt->assign_iterable());
|
|
|
| // As with for-in, skip the loop if the iterator is null or undefined.
|
| __ CompareRoot(eax, Heap::kUndefinedValueRootIndex);
|
| @@ -1223,15 +1223,8 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
|
| __ CompareRoot(eax, Heap::kNullValueRootIndex);
|
| __ j(equal, loop_statement.break_label());
|
|
|
| - // Convert the iterator to a JS object.
|
| - Label convert, done_convert;
|
| - __ JumpIfSmi(eax, &convert);
|
| - __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
|
| - __ j(above_equal, &done_convert);
|
| - __ bind(&convert);
|
| - __ push(eax);
|
| - __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
|
| - __ bind(&done_convert);
|
| + // var iterator = iterable[Symbol.iterator]();
|
| + VisitForEffect(stmt->assign_iterator());
|
|
|
| // Loop entry.
|
| __ bind(loop_statement.continue_label());
|
|
|