summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-03-23 14:23:43 -0700
committerGitHub <noreply@github.com>2021-03-23 14:23:43 -0700
commitf2abcbc8d1659d3e6506b1d4128646b892ebc218 (patch)
tree30bb82cc27bc26df7cb32b889176605c54b9a0b3 /src/wasm-binary.h
parent5ef255154172504385a8218f9712a48d98a47689 (diff)
downloadbinaryen-f2abcbc8d1659d3e6506b1d4128646b892ebc218.tar.gz
binaryen-f2abcbc8d1659d3e6506b1d4128646b892ebc218.tar.bz2
binaryen-f2abcbc8d1659d3e6506b1d4128646b892ebc218.zip
[Wasm GC] Add support for non-nullable types, all except for locals (#3710)
After this PR we still do not support non-nullable locals. But we no longer turn all types into nullable upon load. In particular, we support non-nullable types on function parameters and struct fields, etc. This should be enough to experiment with optimizations in both binaryen and in VMs regarding non- nullability (since we expect that optimizing VMs can do well inside functions anyhow; it's non-nullability across calls and from data that the VM can't be expected to think about). Let is handled as before, by lowering it into gets and sets. In addition, we turn non-nullable locals into nullable ones, and add a ref.as_non_null on all their gets (to keep the type identical there). This is used not just for loading code with a let but also is needed after inlining. Most of the code changes here are removing FIXMEs for allowing non-nullable types. But there is also code to handle the issues mentioned above. Most of the test updates are removing extra nulls that we added before when we turned all types nullable. A few tests had actual issues, though, and also some new tests are added to cover the code changes here.
Diffstat (limited to 'src/wasm-binary.h')
0 files changed, 0 insertions, 0 deletions