aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2023-05-25 17:52:39 +0200
committerLuuk de Gram <luuk@degram.dev>2023-05-31 18:04:32 +0200
commit3c72b4d25eb14bbdc03503c368a750b1ca1b7c28 (patch)
tree2caa5eccfc33ace3d70cca45d23b5996c58e90b6 /src/codegen.zig
parent7cfc44d86ff56fd760eaf0781cc3ba0650267af9 (diff)
downloadzig-3c72b4d25eb14bbdc03503c368a750b1ca1b7c28.tar.gz
zig-3c72b4d25eb14bbdc03503c368a750b1ca1b7c28.zip
wasm: support and optimize for all packed unions
For packed unions where its abi size is less than or equal to 8 bytes we store it directly and don't pass it by reference. This means that when retrieving the field, we will perform shifts and bitcasts to ensure the correct type is returned. For larger packed unions, we either allocate a new stack value based on the field type when the field type is also passed by reference, or load it directly into a local if it's not.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions