# astgen: eliminate rlWrapPtr and all its callsites · gitcafe/zig

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

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

Visibility: public

Requested revision: 30a824cb9e148adb0799a0a81721160c0d474b50

Requested commit: 30a824cb9e148adb0799a0a81721160c0d474b50

Commit: 30a824cb9e148adb0799a0a81721160c0d474b50

Tree: afdfb0a3e19fb956c66ade7b190b7ca4566ba7f7

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
astgen: eliminate rlWrapPtr and all its callsites

The following AST avoids unnecessary derefs now:
 * error set decl
 * field access
 * array access
 * for loops: replace ensure_indexable and deref on the len_ptr with a
   special purpose ZIR instruction called indexable_ptr_len.

Added an error note when for loop operand is the wrong type.

I also accidentally implemented `@field`.

```

## Parents

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

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