diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2021-07-01 01:56:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-30 18:56:23 -0700 |
commit | ca27f40a2f1070a16ee7c0efc18ff35d342d8027 (patch) | |
tree | ab0f2b1b731737bc409db21f677b97be16f67c0f /test/lit/nominal-func.wast | |
parent | 10ef52d62468aec5762742930630e882dc5e5c0b (diff) | |
download | binaryen-ca27f40a2f1070a16ee7c0efc18ff35d342d8027.tar.gz binaryen-ca27f40a2f1070a16ee7c0efc18ff35d342d8027.tar.bz2 binaryen-ca27f40a2f1070a16ee7c0efc18ff35d342d8027.zip |
Preserve Function HeapTypes (#3952)
When using nominal types, func.ref of two functions with identical signatures
but different HeapTypes will yield different types. To preserve these semantics,
Functions need to track their HeapTypes, not just their Signatures.
This PR replaces the Signature field in Function with a HeapType field and adds
new utility methods to make it almost as simple to update and query the function
HeapType as it was to update and query the Function Signature.
Diffstat (limited to 'test/lit/nominal-func.wast')
-rw-r--r-- | test/lit/nominal-func.wast | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/lit/nominal-func.wast b/test/lit/nominal-func.wast index 4aeef2eb7..b5f266db3 100644 --- a/test/lit/nominal-func.wast +++ b/test/lit/nominal-func.wast @@ -1,12 +1,9 @@ ;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited. ;; RUN: wasm-opt %s -all --nominal -S -o - | filecheck %s - -;; TODO: Preserve function heap types through round tripping as well. -;; RUNX: wasm-opt %s -all --nominal --roundtrip -S -o - | filecheck %s +;; RUN: wasm-opt %s -all --nominal --roundtrip -S -o - | filecheck %s (module ;; This will be the "canonical" function type rather than $foo_t - ;; CHECK: (type $bad_t (func)) (type $bad_t (func)) ;; CHECK: (type $foo_t (func)) |