diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-02-10 21:06:16 +0100 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-02-10 21:40:06 +0100 |
| commit | 0e2fcab334083d3cbc786e891be6c97e9fd81595 (patch) | |
| tree | 7a9042737d071235a7cb17fc68365982f7a835f6 /src/stage1/errmsg.cpp | |
| parent | e139c41fd8955f873615b2c2434d162585c0e44c (diff) | |
| download | zig-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/stage1/errmsg.cpp')
0 files changed, 0 insertions, 0 deletions
