mirror of https://github.com/boa-dev/boa.git
Browse Source
`Node::DoWhileLoop` ast node had a buggy bytecode generation where `self.patch_jump(exit)` was called after emitting `LoopEnd` opcode. This would patch the loop exit to the instruction following the do while code, which would panic in cases where do while was enclosed in a block statement. This Pull Request fixes #1929. It changes the following: - Patch jump before emitting `Opcode::LoopEnd` - Add test which has do while statement inside a block statement to demonstrate that the change fixes the panic.pull/1971/head
pd
3 years ago
2 changed files with 16 additions and 2 deletions
Loading…
Reference in new issue