diff options
author | Thomas Lively <tlively@google.com> | 2024-09-05 13:42:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-05 20:42:05 +0000 |
commit | a64037480b83373953292469c1fa1f80ec80e13c (patch) | |
tree | 1a9f9d976ce873e14803d979e0164ee4b1b1fda6 /test/example | |
parent | fbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84 (diff) | |
download | binaryen-a64037480b83373953292469c1fa1f80ec80e13c.tar.gz binaryen-a64037480b83373953292469c1fa1f80ec80e13c.tar.bz2 binaryen-a64037480b83373953292469c1fa1f80ec80e13c.zip |
Fix supertype counts when collecting heap types (#6905)
We previous incremented the use count for a declared supertype only if
it was also a type we had never seen before. Fix the count by treating
the supertype the same as any other type used in a type definition.
Update tests accordingly, including by manually moving input types
around to better match the output.
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index f1271f547..657999a55 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -3037,9 +3037,9 @@ TypeBuilderErrorReasonForwardSupertypeReference: 2 TypeBuilderErrorReasonForwardChildReference: 3 module with recursive GC types: (module + (type $SomeStruct (sub (struct (field $SomeField (mut (ref null $SomeStruct)))))) (type $SomeArray (sub (array (mut (ref null $SomeArray))))) (type $SomeSignature (sub (func (param (ref null $SomeSignature) (ref null $SomeArray)) (result (ref null $SomeSignature))))) - (type $SomeStruct (sub (struct (field $SomeField (mut (ref null $SomeStruct)))))) (type $3 (func)) (type $SomeSubStruct (sub $SomeStruct (struct (field $SomeField (mut (ref null $SomeStruct))) (field $SomePackedField i8)))) (func $test (type $3) |