diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-11-25 19:14:24 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-11-30 17:56:01 +0100 |
| commit | 4af5bbde53da7f6ac8acc630135e569885bd94c4 (patch) | |
| tree | 83c9bc7b3707f9f7447bea8d69bf00324c290c18 /src/codegen.zig | |
| parent | eb2caf939023bba16e473661d4f3cd1c19616e53 (diff) | |
| download | zig-4af5bbde53da7f6ac8acc630135e569885bd94c4.tar.gz zig-4af5bbde53da7f6ac8acc630135e569885bd94c4.zip | |
wasm: airStructFieldPtr - Support packed structs
Simplifies the airStructFieldPtr(index) functions to only obtain the
correct struct type and field index, which is then passed into the
structFieldPtr function. This function now calculates the byte-offset
of the field's address and returns a new `WValue` with this offset.
This means we only have to do this calculation in a single function,
and no longer have to duplicate any logic. This also handles both
regular (tagged) unions and packed unions.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
