From 3bf931fbb02299b8af10bb8623c5531a9fd3fab3 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Wed, 10 Aug 2022 01:11:44 +0900 Subject: [PATCH] Fix comprehension bytecode generation --- src/compile.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index 9354653..a18635f 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -2468,11 +2468,6 @@ impl Compiler { let loop_block = self.new_block(); let after_block = self.new_block(); - // Setup for loop: - self.emit(Instruction::SetupLoop { - break_target: after_block, - }); - if loop_labels.is_empty() { // Load iterator onto stack (passed as first argument): self.emit(Instruction::LoadFast(arg0)); @@ -2507,7 +2502,6 @@ impl Compiler { // End of for loop: self.switch_to_block(after_block); - self.emit(Instruction::PopBlock); } if return_none {