summaryrefslogtreecommitdiff
path: root/test/example
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-09-05 13:42:05 -0700
committerGitHub <noreply@github.com>2024-09-05 20:42:05 +0000
commita64037480b83373953292469c1fa1f80ec80e13c (patch)
tree1a9f9d976ce873e14803d979e0164ee4b1b1fda6 /test/example
parentfbbdc64a5bf69d47bab5a33b6ec148e9b79a6a84 (diff)
downloadbinaryen-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.txt2
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)