summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-06-08 15:22:15 -0400
committerGitHub <noreply@github.com>2021-06-08 12:22:15 -0700
commit28f227fb90d18d8c1fc2c52b592d2934469aef8e (patch)
tree145f01aad94a4716d180aeface9f9121f141cb5f /src/wasm/wasm-validator.cpp
parent811f1614edef867228edaac08bdb5179325eac27 (diff)
downloadbinaryen-28f227fb90d18d8c1fc2c52b592d2934469aef8e.tar.gz
binaryen-28f227fb90d18d8c1fc2c52b592d2934469aef8e.tar.bz2
binaryen-28f227fb90d18d8c1fc2c52b592d2934469aef8e.zip
Initial nominal typing support (#3919)
In nominal mode, HeapType constructors besides the Signature constructor always produce fresh types distinct from any previously created types. The HeapType constructor that takes a Signature maintains its previous behavior of constructing a canonical representative of the given signature because it is used frequently throughout the code base and never in a situation that would benefit from creating a fresh type. It is left as future work to clean up this discrepancy between the Signature HeapType constructor and other HeapType constructors. TypeBuilder skips shape and global canonicalization in nominal mode and always creates a fresh type for each of its entries. For this to work without any canonicalization, the TypeBuilder allocates temporary types on the global Type store and does not support building basic HeapTypes in nominal mode. The new mode is not available in any of the Binaryen tools yet because it is still missing critical functionality like the ability to declare subtyping relations and correctly calculate LUBs. This functionality will be implemented in future PRs.
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
0 files changed, 0 insertions, 0 deletions