aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.zig
diff options
context:
space:
mode:
authorLuuk de Gram <luuk@degram.dev>2022-02-10 21:06:16 +0100
committerLuuk de Gram <luuk@degram.dev>2022-02-10 21:40:06 +0100
commit0e2fcab334083d3cbc786e891be6c97e9fd81595 (patch)
tree7a9042737d071235a7cb17fc68365982f7a835f6 /src/codegen.zig
parente139c41fd8955f873615b2c2434d162585c0e44c (diff)
downloadzig-0e2fcab334083d3cbc786e891be6c97e9fd81595.tar.gz
zig-0e2fcab334083d3cbc786e891be6c97e9fd81595.zip
wasm: Implement 'field_ptr' constants
This implements the `field_ptr` value for pointers. As the value only provides us with the index, we must calculate the offset from the container type using said index. (i.e. the offset from a struct field at index 2). Besides this, small miscellaneous fixes/updates were done to get remaining behavior tests passing: - We start the function table index at 1, so unresolved function pointers don't can be null-checked properly. - Implement genTypedValue for floats up to f64. - Fix zero-sized arguments by only creating `args` for non-zero-sized types. - lowerConstant now works for all decl_ref's. - lowerConstant properly lowers optional pointers, so `null` pointers are lowered to `0`.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions