diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 6 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 36e6776f7..c2c5d6e31 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -2160,6 +2160,7 @@ void test_typebuilder() { tempArrayType, BinaryenPackedTypeNotPacked(), true); + TypeBuilderSetOpen(builder, tempArrayIndex); // Create a recursive struct with a field of its own type const BinaryenIndex tempStructIndex = 1; @@ -2173,6 +2174,7 @@ void test_typebuilder() { bool fieldMutables[] = {true}; TypeBuilderSetStructType( builder, tempStructIndex, fieldTypes, fieldPackedTypes, fieldMutables, 1); + TypeBuilderSetOpen(builder, tempStructIndex); } // Create a recursive signature with parameter and result including its own @@ -2189,6 +2191,7 @@ void test_typebuilder() { tempSignatureIndex, TypeBuilderGetTempTupleType(builder, (BinaryenType*)¶mTypes, 2), tempSignatureType); + TypeBuilderSetOpen(builder, tempSignatureIndex); } // Create a subtype (with an additional immutable packed field) @@ -2209,11 +2212,10 @@ void test_typebuilder() { fieldPackedTypes, fieldMutables, 2); + TypeBuilderSetOpen(builder, tempSubStructIndex); } TypeBuilderSetSubType(builder, tempSubStructIndex, tempStructHeapType); - // TODO: Rtts (post-MVP?) - // Build the type hierarchy and dispose the builder BinaryenHeapType heapTypes[4]; BinaryenIndex errorIndex; diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index cde0e0279..d84e9c888 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -3166,9 +3166,9 @@ TypeBuilderErrorReasonForwardSupertypeReference: 2 TypeBuilderErrorReasonForwardChildReference: 3 module with recursive GC types: (module - (type $SomeArray (array (mut (ref null $SomeArray)))) - (type $SomeSignature (func (param (ref null $SomeSignature) (ref null $SomeArray)) (result (ref null $SomeSignature)))) - (type $SomeStruct (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) |