# wasm: airAggregateInit \- Support packed structs · gitcafe/zig

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

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

Visibility: public

Requested revision: a7ad1212cb1b127754c7e48ead8d80d66f0f6623

Requested commit: a7ad1212cb1b127754c7e48ead8d80d66f0f6623

Commit: a7ad1212cb1b127754c7e48ead8d80d66f0f6623

Tree: e86d27adc503658c983714140842e39e24ca2ac6

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: airAggregateInit - Support packed structs

This allows the Wasm backend to construct an instance of a packed
struct during runtime. We first allocate a local, and then
shift+or each field's value into the result local. We then finally
return this result local as value.

The commit also fixes a type-issue in `airElemVal` where we used
the element type instead of a pointer type to store the value's
address into.

```

## Parents

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

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