| Before: |
| (module |
| ) |
| Keeping: <none> |
| After: |
| (module |
| ) |
| Secondary: |
| (module |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (memory $mem (shared 3 42)) |
| (table $tab 3 42 funcref) |
| (global $glob (mut i32) (i32.const 7)) |
| (event $e (attr 0) (param i32)) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (memory $mem (shared 3 42)) |
| (table $tab 3 42 funcref) |
| (global $glob (mut i32) (i32.const 7)) |
| (event $e (attr 0) (param i32)) |
| (export "%memory" (memory $mem)) |
| (export "%table" (table $tab)) |
| (export "%global" (global $glob)) |
| (export "%event" (event $e)) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (import "primary" "%memory" (memory $mem (shared 3 42))) |
| (import "primary" "%table" (table $tab 3 42 funcref)) |
| (import "primary" "%global" (global $glob (mut i32))) |
| (import "primary" "%event" (event $e (attr 0) (param i32))) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (import "env" "mem" (memory $mem (shared 3 42))) |
| (import "env" "tab" (table $tab 3 42 funcref)) |
| (import "env" "glob" (global $glob (mut i32))) |
| (import "env" "e" (event $e (attr 0) (param i32))) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (import "env" "mem" (memory $mem (shared 3 42))) |
| (import "env" "tab" (table $tab 3 42 funcref)) |
| (import "env" "glob" (global $glob (mut i32))) |
| (import "env" "e" (event $e (attr 0) (param i32))) |
| (export "%memory" (memory $mem)) |
| (export "%table" (table $tab)) |
| (export "%global" (global $glob)) |
| (export "%event" (event $e)) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (import "primary" "%memory" (memory $mem (shared 3 42))) |
| (import "primary" "%table" (table $tab 3 42 funcref)) |
| (import "primary" "%global" (global $glob (mut i32))) |
| (import "primary" "%event" (event $e (attr 0) (param i32))) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (memory $mem (shared 3 42)) |
| (table $tab 3 42 funcref) |
| (global $glob (mut i32) (i32.const 7)) |
| (event $e (attr 0) (param i32)) |
| (export "mem" (memory $mem)) |
| (export "tab" (table $tab)) |
| (export "glob" (global $glob)) |
| (export "e" (event $e)) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (memory $mem (shared 3 42)) |
| (table $tab 3 42 funcref) |
| (global $glob (mut i32) (i32.const 7)) |
| (event $e (attr 0) (param i32)) |
| (export "mem" (memory $mem)) |
| (export "tab" (table $tab)) |
| (export "glob" (global $glob)) |
| (export "e" (event $e)) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_none (func (param i32))) |
| (import "primary" "mem" (memory $mem (shared 3 42))) |
| (import "primary" "tab" (table $tab 3 42 funcref)) |
| (import "primary" "glob" (global $glob (mut i32))) |
| (import "primary" "e" (event $e (attr 0) (param i32))) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Secondary: |
| (module |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (export "foo" (func $foo)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (export "foo" (func $foo)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Secondary: |
| (module |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (table $table 1 funcref) |
| (elem (i32.const 0) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (table $table 1 funcref) |
| (elem (i32.const 0) $foo) |
| (export "%table" (table $table)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Secondary: |
| (module |
| (import "primary" "%table" (table $table 1 funcref)) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (table $table 1 funcref) |
| (elem (global.get $base) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (table $table 1 funcref) |
| (elem (global.get $base) $foo) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Secondary: |
| (module |
| (import "primary" "%table" (table $table 1 funcref)) |
| (import "primary" "%global" (global $base i32)) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| ) |
| Secondary: |
| (module |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (i32.const 42) $foo) |
| (export "foo" (func $foo)) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (i32.const 42) $foo) |
| (export "foo" (func $foo)) |
| (export "%table" (table $table)) |
| ) |
| Secondary: |
| (module |
| (import "primary" "%table" (table $table 1000 funcref)) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $foo) |
| (export "foo" (func $foo)) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (import "env" "foo" (func $foo (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $foo) |
| (export "foo" (func $foo)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| ) |
| Secondary: |
| (module |
| (import "primary" "%table" (table $table 1000 funcref)) |
| (import "primary" "%global" (global $base i32)) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (export "foo" (func $foo)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "placeholder" "0" (func $placeholder_0 (param i32) (result i32))) |
| (table $0 1 funcref) |
| (elem (i32.const 0) $placeholder_0) |
| (export "foo" (func $foo)) |
| (export "%table" (table $0)) |
| (func $foo (param $0 i32) (result i32) |
| (call_indirect $0 (type $i32_=>_i32) |
| (local.get $0) |
| (i32.const 0) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $0 1 funcref)) |
| (elem (i32.const 0) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (table $table 1 funcref) |
| (elem (i32.const 0) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "placeholder" "0" (func $placeholder_0 (param i32) (result i32))) |
| (table $table 1 funcref) |
| (elem (i32.const 0) $placeholder_0) |
| (export "%table" (table $table)) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $table 1 funcref)) |
| (elem (i32.const 0) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (i32.const 42) $foo) |
| (export "foo" (func $foo)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "placeholder" "42" (func $placeholder_42 (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (i32.const 42) $placeholder_42) |
| (export "foo" (func $foo)) |
| (export "%table" (table $table)) |
| (func $foo (param $0 i32) (result i32) |
| (call_indirect $table (type $i32_=>_i32) |
| (local.get $0) |
| (i32.const 42) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $table 1000 funcref)) |
| (elem (i32.const 42) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $foo) |
| (export "foo" (func $foo)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (import "placeholder" "0" (func $placeholder_0 (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $placeholder_0) |
| (export "foo" (func $foo)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $foo (param $0 i32) (result i32) |
| (call_indirect $table (type $i32_=>_i32) |
| (local.get $0) |
| (global.get $base) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $table 1000 funcref)) |
| (elem (global.get $base) $foo) |
| (import "primary" "%global" (global $base i32)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "env" "base" (global $base i32)) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $null $foo) |
| (export "foo" (func $foo)) |
| (func $null |
| (nop) |
| ) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| Keeping: null |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (import "placeholder" "1" (func $placeholder_1 (param i32) (result i32))) |
| (table $table 1000 funcref) |
| (elem (global.get $base) $null $placeholder_1) |
| (export "foo" (func $foo)) |
| (export "%null" (func $null)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $null |
| (nop) |
| ) |
| (func $foo (param $0 i32) (result i32) |
| (call_indirect $table (type $i32_=>_i32) |
| (local.get $0) |
| (i32.add |
| (global.get $base) |
| (i32.const 1) |
| ) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $table 1000 funcref)) |
| (elem (global.get $base) $null $foo) |
| (import "primary" "%global" (global $base i32)) |
| (import "primary" "%null" (func $null)) |
| (func $foo (param $0 i32) (result i32) |
| (local.get $0) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (func $foo |
| (call $bar) |
| ) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Keeping: bar, foo |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (func $foo |
| (call $bar) |
| ) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (func $foo |
| (call $bar) |
| ) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Keeping: bar |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (export "%bar" (func $bar)) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%bar" (func $bar)) |
| (func $foo |
| (call $bar) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (func $foo |
| (call $bar) |
| ) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (table $0 1 funcref) |
| (elem (i32.const 0) $placeholder_0) |
| (export "%table" (table $0)) |
| (func $foo |
| (call_indirect $0 (type $none_=>_none) |
| (i32.const 0) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $0 1 funcref)) |
| (elem (i32.const 0) $bar) |
| (func $bar |
| (nop) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (func $foo |
| (call $bar) |
| ) |
| (func $bar |
| (nop) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (func $bar |
| (nop) |
| ) |
| (func $foo |
| (call $bar) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (export "%foo" (func $bar)) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (call $foo) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (table $0 1 funcref) |
| (elem (i32.const 0) $placeholder_0) |
| (export "%foo" (func $bar)) |
| (export "%foo_0" (func $foo)) |
| (export "%table" (table $0)) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (call_indirect $0 (type $none_=>_none) |
| (i32.const 0) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $0 1 funcref)) |
| (elem (i32.const 0) $bar) |
| (import "primary" "%foo_0" (func $foo)) |
| (func $bar |
| (call $foo) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (table $table 4 funcref) |
| (elem (i32.const 0) $foo $bar $baz $quux) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (nop) |
| ) |
| (func $baz |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Keeping: bar, quux |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (import "placeholder" "2" (func $placeholder_2)) |
| (table $table 4 funcref) |
| (elem (i32.const 0) $placeholder_0 $bar $placeholder_2 $quux) |
| (export "%table" (table $table)) |
| (func $bar |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $table 4 funcref)) |
| (elem (i32.const 0) $foo) |
| (elem (i32.const 2) $baz) |
| (func $baz |
| (nop) |
| ) |
| (func $foo |
| (nop) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (table $table 4 funcref) |
| (elem (global.get $base) $foo $bar $baz $quux) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (nop) |
| ) |
| (func $baz |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Keeping: bar, quux |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (import "placeholder" "2" (func $placeholder_2)) |
| (table $table 4 funcref) |
| (elem (global.get $base) $placeholder_0 $bar $placeholder_2 $quux) |
| (export "%bar" (func $bar)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $bar |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $table 4 funcref)) |
| (elem (global.get $base) $foo $bar $baz) |
| (import "primary" "%global" (global $base i32)) |
| (import "primary" "%bar" (func $bar)) |
| (func $baz |
| (nop) |
| ) |
| (func $foo |
| (nop) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (table $table 4 funcref) |
| (elem (i32.const 0) $foo $bar $baz $quux) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (nop) |
| ) |
| (func $baz |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Keeping: baz |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (import "placeholder" "1" (func $placeholder_1)) |
| (import "placeholder" "3" (func $placeholder_3)) |
| (table $table 4 funcref) |
| (elem (i32.const 0) $placeholder_0 $placeholder_1 $baz $placeholder_3) |
| (export "%table" (table $table)) |
| (func $baz |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $table 4 funcref)) |
| (elem (i32.const 0) $foo $bar) |
| (elem (i32.const 3) $quux) |
| (func $bar |
| (nop) |
| ) |
| (func $foo |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (table $table 4 funcref) |
| (elem (global.get $base) $foo $bar $baz $quux) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (nop) |
| ) |
| (func $baz |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| Keeping: baz |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (import "placeholder" "1" (func $placeholder_1)) |
| (import "placeholder" "3" (func $placeholder_3)) |
| (table $table 4 funcref) |
| (elem (global.get $base) $placeholder_0 $placeholder_1 $baz $placeholder_3) |
| (export "%baz" (func $baz)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $baz |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $table 4 funcref)) |
| (elem (global.get $base) $foo $bar $baz $quux) |
| (import "primary" "%global" (global $base i32)) |
| (import "primary" "%baz" (func $baz)) |
| (func $bar |
| (nop) |
| ) |
| (func $foo |
| (nop) |
| ) |
| (func $quux |
| (nop) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (table $table 2 funcref) |
| (elem (global.get $base) $foo $bar) |
| (func $foo |
| (nop) |
| ) |
| (func $bar |
| (call $foo) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "env" "base" (global $base i32)) |
| (import "placeholder" "1" (func $placeholder_1)) |
| (table $table 2 funcref) |
| (elem (global.get $base) $foo $placeholder_1) |
| (export "%foo" (func $foo)) |
| (export "%table" (table $table)) |
| (export "%global" (global $base)) |
| (func $foo |
| (nop) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $table 2 funcref)) |
| (elem (global.get $base) $foo $bar) |
| (import "primary" "%global" (global $base i32)) |
| (import "primary" "%foo" (func $foo)) |
| (func $bar |
| (call $foo) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (table $table 1 1 funcref) |
| (elem (i32.const 0) $foo) |
| (func $foo (param $0 i32) (result i32) |
| (call $bar |
| (i32.const 0) |
| ) |
| ) |
| (func $bar (param $0 i32) (result i32) |
| (call $foo |
| (i32.const 1) |
| ) |
| ) |
| ) |
| Keeping: foo |
| After: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "placeholder" "1" (func $placeholder_1 (param i32) (result i32))) |
| (table $table 2 2 funcref) |
| (elem (i32.const 0) $foo $placeholder_1) |
| (export "%foo" (func $foo)) |
| (export "%table" (table $table)) |
| (func $foo (param $0 i32) (result i32) |
| (call_indirect $table (type $i32_=>_i32) |
| (i32.const 0) |
| (i32.const 1) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $i32_=>_i32 (func (param i32) (result i32))) |
| (import "primary" "%table" (table $table 2 2 funcref)) |
| (elem (i32.const 1) $bar) |
| (import "primary" "%foo" (func $foo (param i32) (result i32))) |
| (func $bar (param $0 i32) (result i32) |
| (call $foo |
| (i32.const 1) |
| ) |
| ) |
| ) |
| |
| |
| Before: |
| (module |
| (type $none_=>_none (func)) |
| (export "foo1" (func $foo)) |
| (export "foo2" (func $foo)) |
| (func $foo |
| (nop) |
| ) |
| ) |
| Keeping: <none> |
| After: |
| (module |
| (type $none_=>_none (func)) |
| (import "placeholder" "0" (func $placeholder_0)) |
| (table $0 1 funcref) |
| (elem (i32.const 0) $placeholder_0) |
| (export "foo1" (func $foo)) |
| (export "foo2" (func $foo)) |
| (export "%table" (table $0)) |
| (func $foo |
| (call_indirect $0 (type $none_=>_none) |
| (i32.const 0) |
| ) |
| ) |
| ) |
| Secondary: |
| (module |
| (type $none_=>_none (func)) |
| (import "primary" "%table" (table $0 1 funcref)) |
| (elem (i32.const 0) $foo) |
| (func $foo |
| (nop) |
| ) |
| ) |
| |
| |