We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be055a3 commit e2a0b6dCopy full SHA for e2a0b6d
boa_engine/src/bytecompiler/declaration/declaration_pattern.rs
@@ -190,8 +190,15 @@ impl ByteCompiler<'_, '_> {
190
191
let exit = self.jump();
192
self.patch_handler(handler_index);
193
+ let generator_return_handle = self.in_generator.then(|| self.push_handler());
194
self.emit_opcode(Opcode::Exception);
195
self.emit_opcode(Opcode::PushTrue);
196
+ if let Some(generator_return_handle) = generator_return_handle {
197
+ let is_not_generator_exit = self.jump();
198
+ self.patch_handler(generator_return_handle);
199
+ self.emit_opcode(Opcode::PushFalse);
200
+ self.patch_jump(is_not_generator_exit);
201
+ }
202
self.patch_jump(exit);
203
204
self.current_stack_value_count += 2;
0 commit comments