mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-01 01:41:08 +00:00
We statically know which passive segments are actually used, so let's be sure to gc them!
33 lines
568 B
Plaintext
33 lines
568 B
Plaintext
(module
|
|
(import "" "" (table 0 1 anyfunc))
|
|
|
|
(func $foo
|
|
i32.const 0
|
|
i32.const 0
|
|
i32.const 0
|
|
table.init 1
|
|
)
|
|
|
|
(func $bar)
|
|
(func $bar2)
|
|
|
|
(elem passive $bar)
|
|
(elem passive $bar2)
|
|
|
|
(start $foo)
|
|
)
|
|
|
|
;; STDOUT (update this section with `BLESS_TESTS=1` while running tests)
|
|
;; (module
|
|
;; (type (;0;) (func))
|
|
;; (import "" "" (table (;0;) 0 1 anyfunc))
|
|
;; (func $foo (type 0)
|
|
;; i32.const 0
|
|
;; i32.const 0
|
|
;; i32.const 0
|
|
;; table.init 0)
|
|
;; (func $bar2 (type 0))
|
|
;; (start 0)
|
|
;; (elem (;0;) passive $bar2))
|
|
;; STDOUT
|