diff --git a/es2panda/compiler/base/iterators.cpp b/es2panda/compiler/base/iterators.cpp index 47d653b8ee8b1aa983ecb5b73cb67f91726c5ee0..f88e502870c12ea562fd86ea605656a49571f3a4 100644 --- a/es2panda/compiler/base/iterators.cpp +++ b/es2panda/compiler/base/iterators.cpp @@ -80,7 +80,6 @@ void Iterator::Close(bool abruptCompletion) const if (type_ == IteratorType::SYNC) { RegScope rs(pg_); VReg exception = pg_->AllocReg(); - VReg doneResult = pg_->AllocReg(); VReg innerResult = pg_->AllocReg(); Label *noReturn = pg_->AllocLabel(); @@ -88,10 +87,6 @@ void Iterator::Close(bool abruptCompletion) const pg_->StoreAccumulator(node_, exception); } - pg_->StoreConst(node_, doneResult, Constant::JS_TRUE); - Complete(); - pg_->Condition(node_, lexer::TokenType::PUNCTUATOR_NOT_STRICT_EQUAL, doneResult, noReturn); - // close iterator pg_->LoadObjByName(node_, iterator_, "return"); pg_->StoreAccumulator(node_, method_);