diff options
Diffstat (limited to 'test/passes')
-rw-r--r-- | test/passes/Oz_fuzz-exec_all-features.txt | 215 | ||||
-rw-r--r-- | test/passes/Oz_fuzz-exec_all-features.wast | 210 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_all-features.txt | 18 | ||||
-rw-r--r-- | test/passes/remove-unused-brs_all-features.wast | 18 | ||||
-rw-r--r-- | test/passes/vacuum_all-features.wast | 4 |
5 files changed, 97 insertions, 368 deletions
diff --git a/test/passes/Oz_fuzz-exec_all-features.txt b/test/passes/Oz_fuzz-exec_all-features.txt index 14ef78a8c..410bf37c1 100644 --- a/test/passes/Oz_fuzz-exec_all-features.txt +++ b/test/passes/Oz_fuzz-exec_all-features.txt @@ -9,18 +9,8 @@ [LoggingExternalInterface logging 128] [LoggingExternalInterface logging -128] [LoggingExternalInterface logging 42] -[fuzz-exec] calling rtts -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] [fuzz-exec] calling br_on_cast [LoggingExternalInterface logging 3] -[trap unreachable] [fuzz-exec] calling br_on_failed_cast-1 [LoggingExternalInterface logging 1] [fuzz-exec] calling br_on_failed_cast-2 @@ -44,12 +34,10 @@ [fuzz-exec] calling ref-as-func-of-data [trap not a func] [fuzz-exec] calling ref-as-func-of-func -[fuzz-exec] calling rtt-and-cast-on-func +[fuzz-exec] calling cast-on-func [LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 2] [LoggingExternalInterface logging 1337] -[LoggingExternalInterface logging 3] +[LoggingExternalInterface logging 1] [trap cast error] [fuzz-exec] calling array-alloc-failure [host limit allocation failure] @@ -63,10 +51,6 @@ [LoggingExternalInterface logging 99] [LoggingExternalInterface logging 0] [LoggingExternalInterface logging 10] -[fuzz-exec] calling rtt_Fresh -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] [fuzz-exec] calling array.init [LoggingExternalInterface logging 2] [LoggingExternalInterface logging 42] @@ -79,7 +63,7 @@ [LoggingExternalInterface logging 0] [LoggingExternalInterface logging 1] [LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 0] +[LoggingExternalInterface logging 1] [fuzz-exec] calling static-br_on_cast [LoggingExternalInterface logging 3] [fuzz-exec] calling static-br_on_cast_fail @@ -87,41 +71,38 @@ (module (type $void_func (func)) (type $bytes (array (mut i8))) - (type $extendedstruct (struct (field (mut i32)) (field f64))) (type $struct (struct (field (mut i32)))) (type $i32_=>_none (func (param i32))) + (type $extendedstruct (struct (field (mut i32)) (field f64))) (type $anyref_=>_none (func (param anyref))) (type $int_func (func (result i32))) (import "fuzzing-support" "log-i32" (func $log (param i32))) - (global $rtt (mut (rtt $extendedstruct)) (rtt.canon $extendedstruct)) (export "structs" (func $0)) (export "arrays" (func $1)) - (export "rtts" (func $2)) - (export "br_on_cast" (func $3)) - (export "br_on_failed_cast-1" (func $4)) - (export "br_on_failed_cast-2" (func $5)) - (export "cast-null-anyref-to-gc" (func $6)) - (export "br_on_data" (func $8)) - (export "br_on_non_data-null" (func $9)) - (export "br_on_non_data-data" (func $10)) - (export "br_on_non_data-other" (func $9)) - (export "br-on_non_null" (func $9)) - (export "br-on_non_null-2" (func $13)) - (export "ref-as-data-of-func" (func $14)) - (export "ref-as-data-of-data" (func $9)) - (export "ref-as-func-of-data" (func $14)) - (export "ref-as-func-of-func" (func $9)) - (export "rtt-and-cast-on-func" (func $19)) - (export "array-alloc-failure" (func $9)) - (export "init-array-packed" (func $21)) - (export "cast-func-to-struct" (func $14)) - (export "array-copy" (func $24)) - (export "rtt_Fresh" (func $25)) - (export "array.init" (func $26)) - (export "array.init-packed" (func $27)) - (export "static-casts" (func $28)) - (export "static-br_on_cast" (func $29)) - (export "static-br_on_cast_fail" (func $30)) + (export "br_on_cast" (func $2)) + (export "br_on_failed_cast-1" (func $3)) + (export "br_on_failed_cast-2" (func $4)) + (export "cast-null-anyref-to-gc" (func $5)) + (export "br_on_data" (func $7)) + (export "br_on_non_data-null" (func $8)) + (export "br_on_non_data-data" (func $9)) + (export "br_on_non_data-other" (func $8)) + (export "br-on_non_null" (func $8)) + (export "br-on_non_null-2" (func $12)) + (export "ref-as-data-of-func" (func $13)) + (export "ref-as-data-of-data" (func $8)) + (export "ref-as-func-of-data" (func $13)) + (export "ref-as-func-of-func" (func $8)) + (export "cast-on-func" (func $18)) + (export "array-alloc-failure" (func $8)) + (export "init-array-packed" (func $20)) + (export "cast-func-to-struct" (func $13)) + (export "array-copy" (func $23)) + (export "array.init" (func $24)) + (export "array.init-packed" (func $25)) + (export "static-casts" (func $26)) + (export "static-br_on_cast" (func $2)) + (export "static-br_on_cast_fail" (func $28)) (func $0 (; has Stack IR ;) (local $0 i32) (call $log @@ -144,10 +125,9 @@ (call $log (array.len $bytes (local.tee $0 - (array.new_with_rtt $bytes + (array.new $bytes (i32.const 42) (i32.const 50) - (rtt.canon $bytes) ) ) ) @@ -184,42 +164,13 @@ ) (func $2 (; has Stack IR ;) (call $log - (i32.const 1) - ) - (call $log - (i32.const 0) - ) - (call $log - (i32.const 0) - ) - (call $log - (i32.const 1) - ) - (call $log - (i32.const 0) - ) - (call $log - (i32.const 1) - ) - (call $log - (i32.const 0) - ) - (call $log - (i32.const 1) - ) - ) - (func $3 (; has Stack IR ;) - (call $log (i32.const 3) ) - (unreachable) ) - (func $4 (; has Stack IR ;) + (func $3 (; has Stack IR ;) (local $0 (ref null $struct)) (local.set $0 - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) (drop (block $any (result anyref) @@ -227,9 +178,8 @@ (i32.const 1) ) (drop - (br_on_cast_fail $any + (br_on_cast_static_fail $any $extendedstruct (local.get $0) - (rtt.canon $extendedstruct) ) ) (call $log @@ -239,7 +189,7 @@ ) ) ) - (func $5 (; has Stack IR ;) + (func $4 (; has Stack IR ;) (call $log (i32.const 1) ) @@ -247,12 +197,12 @@ (i32.const 999) ) ) - (func $6 (; has Stack IR ;) + (func $5 (; has Stack IR ;) (call $log (i32.const 0) ) ) - (func $8 (; has Stack IR ;) (param $0 anyref) + (func $7 (; has Stack IR ;) (param $0 anyref) (drop (block $data (result dataref) (drop @@ -263,21 +213,19 @@ (call $log (i32.const 1) ) - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) ) ) - (func $9 (; has Stack IR ;) + (func $8 (; has Stack IR ;) (nop) ) - (func $10 (; has Stack IR ;) + (func $9 (; has Stack IR ;) (call $log (i32.const 1) ) ) - (func $13 (; has Stack IR ;) + (func $12 (; has Stack IR ;) (drop (block (call $log @@ -287,47 +235,39 @@ ) ) ) - (func $14 (; has Stack IR ;) + (func $13 (; has Stack IR ;) (drop (unreachable) ) ) - (func $19 (; has Stack IR ;) + (func $18 (; has Stack IR ;) (call $log (i32.const 0) ) (call $log - (i32.const 1) - ) - (call $log - (i32.const 2) - ) - (call $log (i32.const 1337) ) (call $log - (i32.const 3) + (i32.const 1) ) (unreachable) ) - (func $21 (; has Stack IR ;) (result i32) + (func $20 (; has Stack IR ;) (result i32) (array.get_u $bytes - (array.new_with_rtt $bytes + (array.new $bytes (i32.const -43) (i32.const 50) - (rtt.canon $bytes) ) (i32.const 10) ) ) - (func $24 (; has Stack IR ;) + (func $23 (; has Stack IR ;) (local $0 (ref null $bytes)) (local $1 (ref null $bytes)) (array.set $bytes (local.tee $1 - (array.new_default_with_rtt $bytes + (array.new_default $bytes (i32.const 200) - (rtt.canon $bytes) ) ) (i32.const 42) @@ -336,10 +276,9 @@ (call $log (array.get_u $bytes (local.tee $0 - (array.new_with_rtt $bytes + (array.new $bytes (i32.const 10) (i32.const 100) - (rtt.canon $bytes) ) ) (i32.const 10) @@ -377,36 +316,14 @@ ) ) ) - (func $25 (; has Stack IR ;) - (call $log - (i32.const 1) - ) - (call $log - (i32.const 0) - ) - (global.set $rtt - (rtt.fresh_sub $extendedstruct - (rtt.canon $struct) - ) - ) - (call $log - (ref.test - (struct.new_default_with_rtt $extendedstruct - (global.get $rtt) - ) - (global.get $rtt) - ) - ) - ) - (func $26 (; has Stack IR ;) + (func $24 (; has Stack IR ;) (local $0 (ref null $bytes)) (call $log (array.len $bytes (local.tee $0 - (array.init $bytes + (array.init_static $bytes (i32.const 42) (i32.const 50) - (rtt.canon $bytes) ) ) ) @@ -424,18 +341,17 @@ ) ) ) - (func $27 (; has Stack IR ;) + (func $25 (; has Stack IR ;) (call $log (array.get_u $bytes - (array.init $bytes + (array.init_static $bytes (i32.const -11512) - (rtt.canon $bytes) ) (i32.const 0) ) ) ) - (func $28 (; has Stack IR ;) + (func $26 (; has Stack IR ;) (call $log (i32.const 1) ) @@ -455,12 +371,7 @@ (i32.const 1) ) ) - (func $29 (; has Stack IR ;) - (call $log - (i32.const 3) - ) - ) - (func $30 (; has Stack IR ;) + (func $28 (; has Stack IR ;) (call $log (i32.const -2) ) @@ -477,18 +388,8 @@ [LoggingExternalInterface logging 128] [LoggingExternalInterface logging -128] [LoggingExternalInterface logging 42] -[fuzz-exec] calling rtts -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] [fuzz-exec] calling br_on_cast [LoggingExternalInterface logging 3] -[trap unreachable] [fuzz-exec] calling br_on_failed_cast-1 [LoggingExternalInterface logging 1] [fuzz-exec] calling br_on_failed_cast-2 @@ -512,12 +413,10 @@ [fuzz-exec] calling ref-as-func-of-data [trap unreachable] [fuzz-exec] calling ref-as-func-of-func -[fuzz-exec] calling rtt-and-cast-on-func +[fuzz-exec] calling cast-on-func [LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 2] [LoggingExternalInterface logging 1337] -[LoggingExternalInterface logging 3] +[LoggingExternalInterface logging 1] [trap unreachable] [fuzz-exec] calling array-alloc-failure [fuzz-exec] calling init-array-packed @@ -530,10 +429,6 @@ [LoggingExternalInterface logging 99] [LoggingExternalInterface logging 0] [LoggingExternalInterface logging 10] -[fuzz-exec] calling rtt_Fresh -[LoggingExternalInterface logging 1] -[LoggingExternalInterface logging 0] -[LoggingExternalInterface logging 1] [fuzz-exec] calling array.init [LoggingExternalInterface logging 2] [LoggingExternalInterface logging 42] diff --git a/test/passes/Oz_fuzz-exec_all-features.wast b/test/passes/Oz_fuzz-exec_all-features.wast index 7ab9116dd..c8ad3700a 100644 --- a/test/passes/Oz_fuzz-exec_all-features.wast +++ b/test/passes/Oz_fuzz-exec_all-features.wast @@ -8,15 +8,11 @@ (import "fuzzing-support" "log-i32" (func $log (param i32))) - (global $rtt (mut (rtt $extendedstruct)) (rtt.canon $extendedstruct)) - (func "structs" (local $x (ref null $struct)) (local $y (ref null $struct)) (local.set $x - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) ;; The value is initialized to 0 ;; Note: We cannot optimize these to constants without either immutability or @@ -49,10 +45,9 @@ (func "arrays" (local $x (ref null $bytes)) (local.set $x - (array.new_with_rtt $bytes + (array.new $bytes (i32.const 42) ;; value to splat into the array (i32.const 50) ;; size - (rtt.canon $bytes) ) ) ;; The length should be 50 @@ -77,78 +72,11 @@ (array.get_s $bytes (local.get $x) (i32.const 20)) ) ) - (func "rtts" - (local $any anyref) - ;; Casting null returns null. - (call $log (ref.is_null - (ref.cast (ref.null $struct) (rtt.canon $struct)) - )) - ;; Testing null returns 0. - (call $log - (ref.test (ref.null $struct) (rtt.canon $struct)) - ) - ;; Testing something completely wrong (struct vs array) returns 0. - (call $log - (ref.test - (array.new_with_rtt $bytes - (i32.const 20) - (i32.const 10) - (rtt.canon $bytes) - ) - (rtt.canon $struct) - ) - ) - ;; Testing a thing with the same RTT returns 1. - (call $log - (ref.test - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) - (rtt.canon $struct) - ) - ) - ;; A bad downcast returns 0: we create a struct, which is not a extendedstruct. - (call $log - (ref.test - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) - (rtt.canon $extendedstruct) - ) - ) - ;; Create a extendedstruct with RTT y, and upcast statically to anyref. - (local.set $any - (struct.new_default_with_rtt $extendedstruct - (rtt.sub $extendedstruct (rtt.canon $struct)) - ) - ) - ;; Casting to y, the exact same RTT, works. - (call $log - (ref.test - (local.get $any) - (rtt.sub $extendedstruct (rtt.canon $struct)) - ) - ) - ;; Casting to z, another RTT of the same data type, fails. - (call $log - (ref.test - (local.get $any) - (rtt.canon $extendedstruct) - ) - ) - ;; Casting to x, the parent of y, works. - (call $log - (ref.test - (local.get $any) - (rtt.canon $struct) - ) - ) - ) (func "br_on_cast" (local $any anyref) ;; create a simple $struct, store it in an anyref (local.set $any - (struct.new_default_with_rtt $struct (rtt.canon $struct)) + (struct.new_default $struct) ) (drop (block $block (result ($ref $struct)) @@ -156,12 +84,11 @@ (block $extendedblock (result (ref $extendedstruct)) (drop ;; second, try to cast our simple $struct to what it is, which will work - (br_on_cast $block + (br_on_cast_static $block $struct ;; first, try to cast our simple $struct to an extended, which will fail - (br_on_cast $extendedblock - (local.get $any) (rtt.canon $extendedstruct) + (br_on_cast_static $extendedblock $extendedstruct + (local.get $any) ) - (rtt.canon $struct) ) ) (call $log (i32.const -1)) ;; we should never get here @@ -173,20 +100,12 @@ ) ) (call $log (i32.const 3)) ;; we should get here - (drop - (block $never (result (ref $extendedstruct)) - ;; an untaken br_on_cast, with unreachable rtt - so we cannot use the - ;; RTT in binaryen IR to find the cast type. - (br_on_cast $never (ref.null $struct) (unreachable)) - (unreachable) - ) - ) ) (func "br_on_failed_cast-1" (local $any anyref) ;; create a simple $struct, store it in an anyref (local.set $any - (struct.new_default_with_rtt $struct (rtt.canon $struct)) + (struct.new_default $struct) ) (drop (block $any (result (ref null any)) @@ -194,9 +113,8 @@ (drop ;; try to cast our simple $struct to an extended, which will fail, and ;; so we will branch, skipping the next logging. - (br_on_cast_fail $any + (br_on_cast_static_fail $any $extendedstruct (local.get $any) - (rtt.canon $extendedstruct) ) ) (call $log (i32.const 999)) ;; we should skip this @@ -208,7 +126,7 @@ (local $any anyref) ;; create an $extendedstruct, store it in an anyref (local.set $any - (struct.new_default_with_rtt $extendedstruct (rtt.canon $extendedstruct)) + (struct.new_default $extendedstruct) ) (drop (block $any (result (ref null any)) @@ -216,9 +134,8 @@ (drop ;; try to cast our simple $struct to an extended, which will succeed, and ;; so we will continue to the next logging. - (br_on_cast_fail $any + (br_on_cast_static_fail $any $extendedstruct (local.get $any) - (rtt.canon $extendedstruct) ) ) (call $log (i32.const 999)) @@ -231,16 +148,13 @@ ;; array or a struct, so our casting code should not assume it is. it is ok ;; to try to cast it, and the result should be 0. (call $log - (ref.test + (ref.test_static $struct (ref.null any) - (rtt.canon $struct) ) ) ) (func $get_data (result dataref) - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) (func "br_on_data" (param $x anyref) (local $y anyref) @@ -272,9 +186,7 @@ (local $x anyref) ;; set x to valid data (local.set $x - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) (drop (block $any (result anyref) @@ -336,9 +248,7 @@ (func "ref-as-data-of-data" (drop (ref.as_data - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) ) ) @@ -346,9 +256,7 @@ (drop ;; This should trap. (ref.as_func - (struct.new_default_with_rtt $struct - (rtt.canon $struct) - ) + (struct.new_default $struct) ) ) ) @@ -362,43 +270,33 @@ (func $a-void-func (call $log (i32.const 1337)) ) - (func "rtt-and-cast-on-func" + (func "cast-on-func" (call $log (i32.const 0)) - (drop - (rtt.canon $void_func) - ) - (call $log (i32.const 1)) - (drop - (rtt.canon $int_func) - ) - (call $log (i32.const 2)) ;; a valid cast (call_ref - (ref.cast (ref.func $a-void-func) (rtt.canon $void_func)) + (ref.cast_static $void_func (ref.func $a-void-func)) ) - (call $log (i32.const 3)) + (call $log (i32.const 1)) ;; an invalid cast (drop (call_ref - (ref.cast (ref.func $a-void-func) (rtt.canon $int_func)) + (ref.cast_static $int_func (ref.func $a-void-func)) )) ;; will never be reached - (call $log (i32.const 4)) + (call $log (i32.const 2)) ) (func "array-alloc-failure" (drop - (array.new_default_with_rtt $bytes + (array.new_default $bytes (i32.const -1) ;; un-allocatable size (4GB * sizeof(Literal)) - (rtt.canon $bytes) ) ) ) (func "init-array-packed" (result i32) (local $x (ref null $bytes)) (local.set $x - (array.new_with_rtt $bytes + (array.new $bytes (i32.const -43) ;; initialize the i8 values with a negative i32 (i32.const 50) - (rtt.canon $bytes) ) ) ;; read the value, which should be -43 & 255 ==> 213 @@ -413,9 +311,8 @@ (func "cast-func-to-struct" (drop ;; An impossible cast of a function to a struct, which should fail. - (ref.cast + (ref.cast_static $struct (ref.func $call-target) - (rtt.canon $struct) ) ) ) @@ -424,17 +321,15 @@ (local $y (ref null $bytes)) ;; Create an array of 10's, of size 100. (local.set $x - (array.new_with_rtt $bytes + (array.new $bytes (i32.const 10) (i32.const 100) - (rtt.canon $bytes) ) ) ;; Create an array of zeros of size 200, and also set one index there. (local.set $y - (array.new_default_with_rtt $bytes + (array.new_default $bytes (i32.const 200) - (rtt.canon $bytes) ) ) (array.set $bytes @@ -467,55 +362,12 @@ (array.get_u $bytes (local.get $x) (i32.const 12)) ) ) - (func "rtt_Fresh" - ;; Casting to the same sequence of rtt.subs works. - (call $log - (ref.test - (struct.new_default_with_rtt $extendedstruct - (rtt.sub $extendedstruct - (rtt.canon $struct) - ) - ) - (rtt.sub $extendedstruct - (rtt.canon $struct) - ) - ) - ) - ;; But not with fresh! - (call $log - (ref.test - (struct.new_default_with_rtt $extendedstruct - (rtt.sub $extendedstruct - (rtt.canon $struct) - ) - ) - (rtt.fresh_sub $extendedstruct - (rtt.canon $struct) - ) - ) - ) - ;; Casts with fresh succeed, if we use the same fresh rtt. - (global.set $rtt - (rtt.fresh_sub $extendedstruct - (rtt.canon $struct) - ) - ) - (call $log - (ref.test - (struct.new_default_with_rtt $extendedstruct - (global.get $rtt) - ) - (global.get $rtt) - ) - ) - ) (func "array.init" (local $x (ref null $bytes)) (local.set $x - (array.init $bytes + (array.init_static $bytes (i32.const 42) ;; first value (i32.const 50) ;; second value - (rtt.canon $bytes) ) ) ;; The length should be 2 @@ -534,9 +386,8 @@ (func "array.init-packed" (local $x (ref null $bytes)) (local.set $x - (array.init $bytes + (array.init_static $bytes (i32.const -11512) - (rtt.canon $bytes) ) ) ;; The value should be be -11512 & 255 => 8 @@ -574,9 +425,7 @@ (struct.new_default $struct) ) ) - ;; Casting to a supertype does not work because the canonical RTT for the - ;; subtype is not a sub-rtt of the canonical RTT of the supertype in - ;; structural mode. + ;; Casting to a supertype works. (call $log (ref.test_static $struct (struct.new_default $extendedstruct) @@ -641,9 +490,8 @@ ;; opts the unused value is removed so there is no trap, and a value is ;; returned, which should not confuse the fuzzer. (drop - (array.new_default_with_rtt $[mut:i8] + (array.new_default $[mut:i8] (i32.const -1) - (rtt.canon $[mut:i8]) ) ) (i32.const 0) diff --git a/test/passes/remove-unused-brs_all-features.txt b/test/passes/remove-unused-brs_all-features.txt index abfcc3e76..631c4ffe3 100644 --- a/test/passes/remove-unused-brs_all-features.txt +++ b/test/passes/remove-unused-brs_all-features.txt @@ -13,12 +13,10 @@ (func $foo (result (ref null $struct)) (if (result (ref null $struct)) (i32.const 1) - (struct.new_with_rtt $struct - (array.new_default_with_rtt $vector + (struct.new $struct + (array.new_default $vector (i32.const 1) - (rtt.canon $vector) ) - (rtt.canon $struct) ) (ref.null $struct) ) @@ -88,18 +86,16 @@ (block $data (result (ref $vector)) (drop (br $data - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 1) - (rtt.canon $vector) ) ) ) (call $log (i32.const 5) ) - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) ) @@ -160,9 +156,8 @@ (drop (block $func (result funcref) (drop - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) (ref.null func) @@ -181,9 +176,8 @@ (drop (block $i31 (result (ref null i31)) (drop - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) (ref.null i31) diff --git a/test/passes/remove-unused-brs_all-features.wast b/test/passes/remove-unused-brs_all-features.wast index 9614f7f5c..56a6ab98f 100644 --- a/test/passes/remove-unused-brs_all-features.wast +++ b/test/passes/remove-unused-brs_all-features.wast @@ -5,14 +5,12 @@ (func $foo (result (ref null $struct)) (if (result (ref null $struct)) (i32.const 1) - (struct.new_with_rtt $struct + (struct.new $struct ;; regression test for computing the cost of an array.new_default, which ;; lacks the optional field "init" - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 1) - (rtt.canon $vector) ) - (rtt.canon $struct) ) (ref.null $struct) ) @@ -81,16 +79,14 @@ ;; a non-null data reference means we always take the br (drop (br_on_data $data - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 1) - (rtt.canon $vector) ) ) ) (call $log (i32.const 5)) - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) ) @@ -147,9 +143,8 @@ (block $func (result (ref null func)) (drop (br_on_func $func - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) ) @@ -171,9 +166,8 @@ (block $i31 (result (ref null i31)) (drop (br_on_i31 $i31 - (array.new_default_with_rtt $vector + (array.new_default $vector (i32.const 2) - (rtt.canon $vector) ) ) ) diff --git a/test/passes/vacuum_all-features.wast b/test/passes/vacuum_all-features.wast index 8a6d52022..1dbb6e39b 100644 --- a/test/passes/vacuum_all-features.wast +++ b/test/passes/vacuum_all-features.wast @@ -805,9 +805,7 @@ ;; nullable reference type and we don't have a type to put in its place, so ;; don't try to replace it. (later operations will remove all the body of ;; this function; this test verifies we don't crash along the way) - (struct.new_default_with_rtt $A - (rtt.canon $A) - ) + (struct.new_default $A) ) ) ) |