# Sema: extract out zirTryPtr from zirTry · gitcafe/zig

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

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

Visibility: public

Requested revision: f4ac37f55da7258c25194e66e1cfe3270ca9d419

Requested commit: f4ac37f55da7258c25194e66e1cfe3270ca9d419

Commit: f4ac37f55da7258c25194e66e1cfe3270ca9d419

Tree: 950151f6d2db1620463fe2a3a44faa02b1dfe685

Author: Andrew Kelley

Committer: Jakub Konka

## Message

```
Sema: extract out zirTryPtr from zirTry

This function took is_ptr: bool and then branched on it three times.
Now, instead, each implementation does no branching and the logic is
easier to follow, both for maintainers and compilers.

I also fixed a bug with TryPtr not ensuring enough capacity in the extra
array.

```

## Parents

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

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