# AstGen: fix elision of unnecessary \`dbg_stmt\` instructions · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/aba29f9789aff0c1ace2a1d0031818ec2c04070c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: aba29f9789aff0c1ace2a1d0031818ec2c04070c

Requested commit: aba29f9789aff0c1ace2a1d0031818ec2c04070c

Commit: aba29f9789aff0c1ace2a1d0031818ec2c04070c

Tree: 2ae6a6f39310d6abc61a0c5b707344a0cdb6c0dc

Author: mlugg

Committer: mlugg

## Message

```
AstGen: fix elision of unnecessary `dbg_stmt` instructions

AstGen has logic to elide leading `dbg_stmt` instructions when multiple
are emitted consecutively; however, it only applied in some cases. A
simple reshuffle here makes this logic apply universally, saving some
bytes in ZIR.

```

## Parents

- [2e27967a81d325047e6d82f8c0722a8a654d1ac7](https://git.cafe/gitcafe/zig/commit/2e27967a81d325047e6d82f8c0722a8a654d1ac7?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/aba29f9789aff0c1ace2a1d0031818ec2c04070c?format=markdown)
