diff --git a/interpreter/text/arrange.ml b/interpreter/text/arrange.ml index c165adaa34..599347b791 100644 --- a/interpreter/text/arrange.ml +++ b/interpreter/text/arrange.ml @@ -300,7 +300,7 @@ let segment head active passive seg = match seg.it with | Active {index; offset; init} -> Node (head, atom var index :: Node ("offset", const offset) :: active init) - | Passive {etype; data} -> Node (head ^ " passive", passive etype data) + | Passive {etype; data} -> Node (head, passive etype data) let active_elem el = match el.it with diff --git a/interpreter/text/lexer.mll b/interpreter/text/lexer.mll index 75fa292faa..60902e2681 100644 --- a/interpreter/text/lexer.mll +++ b/interpreter/text/lexer.mll @@ -339,7 +339,6 @@ rule token = parse | "memory" { MEMORY } | "elem" { ELEM } | "data" { DATA } - | "passive" { PASSIVE } | "offset" { OFFSET } | "import" { IMPORT } | "export" { EXPORT } diff --git a/interpreter/text/parser.mly b/interpreter/text/parser.mly index 6066c6ffa3..9aee29a034 100644 --- a/interpreter/text/parser.mly +++ b/interpreter/text/parser.mly @@ -167,7 +167,7 @@ let inline_type_explicit (c : context) x ft at = %token CONST UNARY BINARY TEST COMPARE CONVERT %token REF_NULL REF_FUNC %token FUNC START TYPE PARAM RESULT LOCAL GLOBAL -%token TABLE ELEM MEMORY DATA PASSIVE OFFSET IMPORT EXPORT TABLE +%token TABLE ELEM MEMORY DATA OFFSET IMPORT EXPORT TABLE %token MODULE BIN QUOTE %token SCRIPT REGISTER INVOKE GET %token ASSERT_MALFORMED ASSERT_INVALID ASSERT_SOFT_INVALID ASSERT_UNLINKABLE @@ -573,7 +573,6 @@ offset : elemref : | LPAR REF_NULL RPAR { let at = at () in fun c -> ref_null @@ at } | LPAR REF_FUNC var RPAR { let at = at () in fun c -> ref_func ($3 c func) @@ at } - | var { let at = at () in fun c -> ref_func ($1 c func) @@ at } passive_elemref_list : | /* empty */ { fun c -> [] } @@ -585,10 +584,10 @@ active_elemref_list : fun c lookup -> List.map f ($1 c lookup) } elem : - | LPAR ELEM bind_var_opt PASSIVE elem_type passive_elemref_list RPAR + | LPAR ELEM bind_var_opt elem_type passive_elemref_list RPAR { let at = at () in fun c -> ignore ($3 c anon_elem bind_elem); - fun () -> Passive {etype = $5; data = $6 c} @@ at } + fun () -> Passive {etype = $4; data = $5 c} @@ at } | LPAR ELEM bind_var var offset active_elemref_list RPAR { let at = at () in fun c -> ignore (bind_elem c $3); @@ -631,10 +630,10 @@ table_fields : [], [] } data : - | LPAR DATA bind_var_opt PASSIVE string_list RPAR + | LPAR DATA bind_var_opt string_list RPAR { let at = at () in fun c -> ignore ($3 c anon_data bind_data); - fun () -> Passive {etype = (); data = $5} @@ at } + fun () -> Passive {etype = (); data = $4} @@ at } | LPAR DATA bind_var var offset string_list RPAR { let at = at () in fun c -> ignore (bind_data c $3); diff --git a/test/core/bulk.wast b/test/core/bulk.wast index bb71f493d6..0b32679986 100644 --- a/test/core/bulk.wast +++ b/test/core/bulk.wast @@ -1,11 +1,11 @@ -;; Passive segment syntax +;; segment syntax (module (memory 1) - (data passive "foo")) + (data "foo")) (module (table 3 funcref) - (elem passive funcref (ref.func 0) (ref.null) (ref.func 1)) + (elem funcref (ref.func 0) (ref.null) (ref.func 1)) (func) (func)) @@ -120,7 +120,7 @@ ;; memory.init (module (memory 1) - (data passive "\aa\bb\cc\dd") + (data "\aa\bb\cc\dd") (func (export "init") (param i32 i32 i32) (memory.init 0 @@ -159,7 +159,7 @@ ;; data.drop (module (memory 1) - (data $p passive "") + (data $p "") (data $a 0 (i32.const 0) "") (func (export "drop_passive") (data.drop $p)) @@ -182,7 +182,7 @@ ;; table.init (module (table 3 funcref) - (elem passive funcref + (elem funcref (ref.func $zero) (ref.func $one) (ref.func $zero) (ref.func $one)) (func $zero (result i32) (i32.const 0)) @@ -227,7 +227,7 @@ (module (table 1 funcref) (func $f) - (elem $p passive funcref (ref.func $f)) + (elem $p funcref (ref.func $f)) (elem $a 0 (i32.const 0) $f) (func (export "drop_passive") (elem.drop $p)) diff --git a/test/core/memory_init.wast b/test/core/memory_init.wast index 59c9fe8606..4f1a0430e9 100644 --- a/test/core/memory_init.wast +++ b/test/core/memory_init.wast @@ -5,9 +5,9 @@ (module (memory (export "memory0") 1 1) (data (i32.const 2) "\03\01\04\01") - (data passive "\02\07\01\08") + (data "\02\07\01\08") (data (i32.const 12) "\07\05\02\03\06") - (data passive "\05\09\02\07\06") + (data "\05\09\02\07\06") (func (export "test") (nop)) (func (export "load8_u") (param i32) (result i32) @@ -49,9 +49,9 @@ (module (memory (export "memory0") 1 1) (data (i32.const 2) "\03\01\04\01") - (data passive "\02\07\01\08") + (data "\02\07\01\08") (data (i32.const 12) "\07\05\02\03\06") - (data passive "\05\09\02\07\06") + (data "\05\09\02\07\06") (func (export "test") (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))) (func (export "load8_u") (param i32) (result i32) @@ -93,9 +93,9 @@ (module (memory (export "memory0") 1 1) (data (i32.const 2) "\03\01\04\01") - (data passive "\02\07\01\08") + (data "\02\07\01\08") (data (i32.const 12) "\07\05\02\03\06") - (data passive "\05\09\02\07\06") + (data "\05\09\02\07\06") (func (export "test") (memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))) (func (export "load8_u") (param i32) (result i32) @@ -137,9 +137,9 @@ (module (memory (export "memory0") 1 1) (data (i32.const 2) "\03\01\04\01") - (data passive "\02\07\01\08") + (data "\02\07\01\08") (data (i32.const 12) "\07\05\02\03\06") - (data passive "\05\09\02\07\06") + (data "\05\09\02\07\06") (func (export "test") (memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)) (data.drop 1) @@ -194,14 +194,14 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (data.drop 4))) "unknown data segment") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (data.drop 0) (data.drop 0))) @@ -209,7 +209,7 @@ (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (data.drop 0) (memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1)))) @@ -231,14 +231,14 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1)))) "unknown data segment 1") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1)) (memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1)))) @@ -246,35 +246,35 @@ (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5)))) (assert_trap (invoke "test") "out of bounds") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3)))) (assert_trap (invoke "test") "out of bounds") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3)))) (assert_trap (invoke "test") "out of bounds") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0)))) (assert_trap (invoke "test") "out of bounds") (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 0x10000) (i32.const 2) (i32.const 0)))) (assert_trap (invoke "test") "out of bounds") @@ -282,7 +282,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1)))) "type mismatch") @@ -290,7 +290,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1)))) "type mismatch") @@ -298,7 +298,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1)))) "type mismatch") @@ -306,7 +306,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1)))) "type mismatch") @@ -314,7 +314,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1)))) "type mismatch") @@ -322,7 +322,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1)))) "type mismatch") @@ -330,7 +330,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1)))) "type mismatch") @@ -338,7 +338,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1)))) "type mismatch") @@ -346,7 +346,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1)))) "type mismatch") @@ -354,7 +354,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1)))) "type mismatch") @@ -362,7 +362,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1)))) "type mismatch") @@ -370,7 +370,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1)))) "type mismatch") @@ -378,7 +378,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1)))) "type mismatch") @@ -386,7 +386,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1)))) "type mismatch") @@ -394,7 +394,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1)))) "type mismatch") @@ -402,7 +402,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1)))) "type mismatch") @@ -410,7 +410,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1)))) "type mismatch") @@ -418,7 +418,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1)))) "type mismatch") @@ -426,7 +426,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1)))) "type mismatch") @@ -434,7 +434,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1)))) "type mismatch") @@ -442,7 +442,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1)))) "type mismatch") @@ -450,7 +450,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1)))) "type mismatch") @@ -458,7 +458,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1)))) "type mismatch") @@ -466,7 +466,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1)))) "type mismatch") @@ -474,7 +474,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1)))) "type mismatch") @@ -482,7 +482,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1)))) "type mismatch") @@ -490,7 +490,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1)))) "type mismatch") @@ -498,7 +498,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1)))) "type mismatch") @@ -506,7 +506,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1)))) "type mismatch") @@ -514,7 +514,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1)))) "type mismatch") @@ -522,7 +522,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1)))) "type mismatch") @@ -530,7 +530,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1)))) "type mismatch") @@ -538,7 +538,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1)))) "type mismatch") @@ -546,7 +546,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1)))) "type mismatch") @@ -554,7 +554,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1)))) "type mismatch") @@ -562,7 +562,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1)))) "type mismatch") @@ -570,7 +570,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1)))) "type mismatch") @@ -578,7 +578,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1)))) "type mismatch") @@ -586,7 +586,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1)))) "type mismatch") @@ -594,7 +594,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1)))) "type mismatch") @@ -602,7 +602,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1)))) "type mismatch") @@ -610,7 +610,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1)))) "type mismatch") @@ -618,7 +618,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1)))) "type mismatch") @@ -626,7 +626,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1)))) "type mismatch") @@ -634,7 +634,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1)))) "type mismatch") @@ -642,7 +642,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1)))) "type mismatch") @@ -650,7 +650,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1)))) "type mismatch") @@ -658,7 +658,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1)))) "type mismatch") @@ -666,7 +666,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1)))) "type mismatch") @@ -674,7 +674,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1)))) "type mismatch") @@ -682,7 +682,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1)))) "type mismatch") @@ -690,7 +690,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1)))) "type mismatch") @@ -698,7 +698,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1)))) "type mismatch") @@ -706,7 +706,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1)))) "type mismatch") @@ -714,7 +714,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1)))) "type mismatch") @@ -722,7 +722,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1)))) "type mismatch") @@ -730,7 +730,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1)))) "type mismatch") @@ -738,7 +738,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1)))) "type mismatch") @@ -746,7 +746,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1)))) "type mismatch") @@ -754,7 +754,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1)))) "type mismatch") @@ -762,7 +762,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1)))) "type mismatch") @@ -770,7 +770,7 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1)))) "type mismatch") @@ -778,14 +778,14 @@ (assert_invalid (module (memory 1) - (data passive "\37") + (data "\37") (func (export "test") (memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1)))) "type mismatch") (module (memory 1 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont @@ -812,7 +812,7 @@ (i32.const -1)) (module (memory 1 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont @@ -839,7 +839,7 @@ (i32.const -1)) (module (memory 1 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont @@ -866,7 +866,7 @@ (i32.const -1)) (module (memory 1 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont @@ -893,7 +893,7 @@ (i32.const -1)) (module (memory 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont @@ -920,7 +920,7 @@ (i32.const -1)) (module (memory 1 ) - (data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") + (data "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42") (func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32) (loop $cont diff --git a/test/core/table_copy.wast b/test/core/table_copy.wast index 51c4ae148b..69158060c5 100644 --- a/test/core/table_copy.wast +++ b/test/core/table_copy.wast @@ -1,7 +1,3 @@ -;; -;; Generated by ../meta/generate_table_copy.js -;; - (module (func (export "ef0") (result i32) (i32.const 0)) (func (export "ef1") (result i32) (i32.const 1)) @@ -20,9 +16,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -75,9 +73,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -130,9 +130,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -185,9 +187,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -240,9 +244,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -295,9 +301,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -350,9 +358,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -405,9 +415,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -454,9 +466,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -476,9 +490,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -498,9 +514,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -520,9 +538,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -542,9 +562,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -564,9 +586,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -586,9 +610,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) diff --git a/test/core/table_init.wast b/test/core/table_init.wast index 11012a317a..82dc63daa7 100644 --- a/test/core/table_init.wast +++ b/test/core/table_init.wast @@ -1,7 +1,3 @@ -;; -;; Generated by ../meta/generate_table_init.js -;; - (module (func (export "ef0") (result i32) (i32.const 0)) (func (export "ef1") (result i32) (i32.const 1)) @@ -20,9 +16,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -75,9 +73,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -130,9 +130,11 @@ (import "a" "ef4" (func (result i32))) ;; index 4 (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 5)) ;; index 5 (func (result i32) (i32.const 6)) (func (result i32) (i32.const 7)) @@ -197,7 +199,7 @@ (assert_invalid (module - (elem passive funcref 0) + (elem funcref (ref.func 0)) (func (result i32) (i32.const 0)) (func (export "test") (elem.drop 4))) @@ -205,7 +207,7 @@ (assert_invalid (module - (elem passive funcref 0) + (elem funcref (ref.func 0)) (func (result i32) (i32.const 0)) (func (export "test") (table.init 4 (i32.const 12) (i32.const 1) (i32.const 1)))) @@ -215,9 +217,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -236,9 +240,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -257,9 +263,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -278,9 +286,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -299,9 +309,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -320,9 +332,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -341,9 +355,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -362,9 +378,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -383,9 +401,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -404,9 +424,11 @@ (module (table 30 30 funcref) (elem (i32.const 2) 3 1 4 1) - (elem passive funcref 2 7 1 8) + (elem funcref + (ref.func 2) (ref.func 7) (ref.func 1) (ref.func 8)) (elem (i32.const 12) 7 5 2 3 6) - (elem passive funcref 5 9 2 7 6) + (elem funcref + (ref.func 5) (ref.func 9) (ref.func 2) (ref.func 7) (ref.func 6)) (func (result i32) (i32.const 0)) (func (result i32) (i32.const 1)) (func (result i32) (i32.const 2)) @@ -425,7 +447,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i32.const 1) (f32.const 1)))) @@ -434,7 +456,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i32.const 1) (i64.const 1)))) @@ -443,7 +465,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i32.const 1) (f64.const 1)))) @@ -452,7 +474,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f32.const 1) (i32.const 1)))) @@ -461,7 +483,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f32.const 1) (f32.const 1)))) @@ -470,7 +492,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f32.const 1) (i64.const 1)))) @@ -479,7 +501,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f32.const 1) (f64.const 1)))) @@ -488,7 +510,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i64.const 1) (i32.const 1)))) @@ -497,7 +519,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i64.const 1) (f32.const 1)))) @@ -506,7 +528,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i64.const 1) (i64.const 1)))) @@ -515,7 +537,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (i64.const 1) (f64.const 1)))) @@ -524,7 +546,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f64.const 1) (i32.const 1)))) @@ -533,7 +555,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f64.const 1) (f32.const 1)))) @@ -542,7 +564,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f64.const 1) (i64.const 1)))) @@ -551,7 +573,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i32.const 1) (f64.const 1) (f64.const 1)))) @@ -560,7 +582,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i32.const 1) (i32.const 1)))) @@ -569,7 +591,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i32.const 1) (f32.const 1)))) @@ -578,7 +600,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i32.const 1) (i64.const 1)))) @@ -587,7 +609,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i32.const 1) (f64.const 1)))) @@ -596,7 +618,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f32.const 1) (i32.const 1)))) @@ -605,7 +627,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f32.const 1) (f32.const 1)))) @@ -614,7 +636,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f32.const 1) (i64.const 1)))) @@ -623,7 +645,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f32.const 1) (f64.const 1)))) @@ -632,7 +654,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i64.const 1) (i32.const 1)))) @@ -641,7 +663,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i64.const 1) (f32.const 1)))) @@ -650,7 +672,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i64.const 1) (i64.const 1)))) @@ -659,7 +681,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (i64.const 1) (f64.const 1)))) @@ -668,7 +690,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f64.const 1) (i32.const 1)))) @@ -677,7 +699,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f64.const 1) (f32.const 1)))) @@ -686,7 +708,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f64.const 1) (i64.const 1)))) @@ -695,7 +717,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f32.const 1) (f64.const 1) (f64.const 1)))) @@ -704,7 +726,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i32.const 1) (i32.const 1)))) @@ -713,7 +735,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i32.const 1) (f32.const 1)))) @@ -722,7 +744,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i32.const 1) (i64.const 1)))) @@ -731,7 +753,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i32.const 1) (f64.const 1)))) @@ -740,7 +762,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f32.const 1) (i32.const 1)))) @@ -749,7 +771,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f32.const 1) (f32.const 1)))) @@ -758,7 +780,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f32.const 1) (i64.const 1)))) @@ -767,7 +789,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f32.const 1) (f64.const 1)))) @@ -776,7 +798,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i64.const 1) (i32.const 1)))) @@ -785,7 +807,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i64.const 1) (f32.const 1)))) @@ -794,7 +816,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i64.const 1) (i64.const 1)))) @@ -803,7 +825,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (i64.const 1) (f64.const 1)))) @@ -812,7 +834,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f64.const 1) (i32.const 1)))) @@ -821,7 +843,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f64.const 1) (f32.const 1)))) @@ -830,7 +852,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f64.const 1) (i64.const 1)))) @@ -839,7 +861,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (i64.const 1) (f64.const 1) (f64.const 1)))) @@ -848,7 +870,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i32.const 1) (i32.const 1)))) @@ -857,7 +879,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i32.const 1) (f32.const 1)))) @@ -866,7 +888,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i32.const 1) (i64.const 1)))) @@ -875,7 +897,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i32.const 1) (f64.const 1)))) @@ -884,7 +906,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f32.const 1) (i32.const 1)))) @@ -893,7 +915,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f32.const 1) (f32.const 1)))) @@ -902,7 +924,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f32.const 1) (i64.const 1)))) @@ -911,7 +933,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f32.const 1) (f64.const 1)))) @@ -920,7 +942,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i64.const 1) (i32.const 1)))) @@ -929,7 +951,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i64.const 1) (f32.const 1)))) @@ -938,7 +960,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i64.const 1) (i64.const 1)))) @@ -947,7 +969,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (i64.const 1) (f64.const 1)))) @@ -956,7 +978,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f64.const 1) (i32.const 1)))) @@ -965,7 +987,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f64.const 1) (f32.const 1)))) @@ -974,7 +996,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f64.const 1) (i64.const 1)))) @@ -983,7 +1005,7 @@ (assert_invalid (module (table 10 funcref) - (elem passive funcref $f0 $f0 $f0) + (elem funcref (ref.func $f0) (ref.func $f0) (ref.func $f0)) (func $f0) (func (export "test") (table.init 0 (f64.const 1) (f64.const 1) (f64.const 1)))) @@ -992,7 +1014,11 @@ (module (type (func (result i32))) (table 32 64 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2)) @@ -1050,7 +1076,11 @@ (module (type (func (result i32))) (table 32 64 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2)) @@ -1108,7 +1138,11 @@ (module (type (func (result i32))) (table 160 320 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2)) @@ -1294,7 +1328,11 @@ (module (type (func (result i32))) (table 160 320 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2)) @@ -1480,7 +1518,11 @@ (module (type (func (result i32))) (table 64 64 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2)) @@ -1570,7 +1612,11 @@ (module (type (func (result i32))) (table 16 16 funcref) - (elem passive funcref $f0 $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15) + (elem funcref + (ref.func $f0) (ref.func $f1) (ref.func $f2) (ref.func $f3) + (ref.func $f4) (ref.func $f5) (ref.func $f6) (ref.func $f7) + (ref.func $f8) (ref.func $f9) (ref.func $f10) (ref.func $f11) + (ref.func $f12) (ref.func $f13) (ref.func $f14) (ref.func $f15)) (func $f0 (export "f0") (result i32) (i32.const 0)) (func $f1 (export "f1") (result i32) (i32.const 1)) (func $f2 (export "f2") (result i32) (i32.const 2))