summaryrefslogtreecommitdiff
path: root/test/passes
diff options
context:
space:
mode:
Diffstat (limited to 'test/passes')
-rw-r--r--test/passes/memory-packing_all-features.txt1578
-rw-r--r--test/passes/memory-packing_all-features.wast558
-rw-r--r--test/passes/memory-packing_all-features_zero-filled-memory.txt4
-rw-r--r--test/passes/memory-packing_all-features_zero-filled-memory.wast6
4 files changed, 0 insertions, 2146 deletions
diff --git a/test/passes/memory-packing_all-features.txt b/test/passes/memory-packing_all-features.txt
deleted file mode 100644
index a2d39083b..000000000
--- a/test/passes/memory-packing_all-features.txt
+++ /dev/null
@@ -1,1578 +0,0 @@
-(module
- (import "env" "memoryBase" (global $memoryBase i32))
- (memory $0 2048 2048)
-)
-(module
- (import "env" "memoryBase" (global $memoryBase i32))
- (memory $0 2048 2048)
-)
-(module
- (import "env" "memoryBase" (global $memoryBase i32))
- (memory $0 2048 2048)
- (data (global.get $memoryBase) "waka this cannot be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we don\'t know where it will go")
-)
-(module
- (type $none_=>_none (func))
- (memory $0 1 1)
- (data (i32.const 1024) "waka this CAN be optimized")
- (data (i32.const 1107) "we DO know where it will go")
- (data (i32.const 2057) "zeros before")
- (data (i32.const 3000) "zeros after")
- (data (i32.const 4000) "zeros\00in\00the\00middle")
- (data (i32.const 4035) "nice skip here")
- (data (i32.const 4066) "another\00but no")
- (func $nonzero-size-init-of-active-will-trap
- (block
- (drop
- (i32.const 42)
- )
- (drop
- (i32.const 0)
- )
- (drop
- (i32.const 13)
- )
- (unreachable)
- )
- (nop)
- )
- (func $nonzero-offset-init-of-active-will-trap
- (block
- (drop
- (i32.const 42)
- )
- (drop
- (i32.const 13)
- )
- (drop
- (i32.const 0)
- )
- (unreachable)
- )
- (nop)
- )
- (func $zero-offset-size-init-of-active-may-trap
- (if
- (i32.gt_u
- (i32.const 42)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (unreachable)
- )
- (nop)
- )
-)
-(module
- (type $none_=>_none (func))
- (global $__mem_segment_drop_state (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_0 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_1 (mut i32) (i32.const 0))
- (memory $0 2048 2048)
- (data "zeroes at start")
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start")
- (data "\00\00\00few zeroes at start")
- (data "zeroes at end")
- (data "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- (data "few zeroes at end\00\00\00")
- (data "zeroes")
- (data "in middle")
- (data "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle")
- (data "few zeroes\00\00\00in middle")
- (data "multiple")
- (data "spans")
- (data "of zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "no zeroes")
- (func $zeroes-at-start
- (block
- (if
- (global.get $__mem_segment_drop_state)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 0
- (i32.const 30)
- (i32.const 0)
- (i32.const 15)
- )
- )
- (block
- (global.set $__mem_segment_drop_state
- (i32.const 1)
- )
- (data.drop 0)
- )
- )
- (func $zeroes-at-start-not-split
- (memory.init 1
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 1
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 1
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 1
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 1)
- )
- (func $few-zeroes-at-start
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (i32.const 22)
- )
- (data.drop 2)
- )
- (func $zeroes-at-end
- (block
- (memory.init 3
- (i32.const 0)
- (i32.const 0)
- (i32.const 13)
- )
- (memory.fill
- (i32.const 13)
- (i32.const 0)
- (i32.const 30)
- )
- )
- (data.drop 3)
- )
- (func $zeroes-at-end-not-split
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (data.drop 4)
- )
- (func $few-zeroes-at-end
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 20)
- )
- (data.drop 5)
- )
- (func $zeroes-in-middle
- (block
- (memory.init 6
- (i32.const 0)
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.const 6)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 7
- (i32.const 36)
- (i32.const 0)
- (i32.const 9)
- )
- )
- (block
- (data.drop 6)
- (data.drop 7)
- )
- )
- (func $zeroes-in-middle-not-split
- (memory.init 8
- (i32.const 0)
- (i32.const 0)
- (i32.const 35)
- )
- (memory.init 8
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 8)
- )
- (func $few-zeroes-in-middle
- (memory.init 9
- (i32.const 0)
- (i32.const 0)
- (i32.const 22)
- )
- (data.drop 9)
- )
- (func $multiple-spans-of-zeroes
- (block
- (memory.init 10
- (i32.const 0)
- (i32.const 0)
- (i32.const 8)
- )
- (memory.fill
- (i32.const 8)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 11
- (i32.const 38)
- (i32.const 0)
- (i32.const 5)
- )
- (memory.fill
- (i32.const 43)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 12
- (i32.const 73)
- (i32.const 0)
- (i32.const 9)
- )
- )
- (block
- (data.drop 10)
- (data.drop 11)
- (data.drop 12)
- )
- )
- (func $even-more-zeroes
- (block
- (if
- (global.get $__mem_segment_drop_state_0)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 13
- (i32.const 30)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 34)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 14
- (i32.const 64)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 68)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 15
- (i32.const 98)
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.const 104)
- (i32.const 0)
- (i32.const 30)
- )
- )
- (block
- (global.set $__mem_segment_drop_state_0
- (i32.const 1)
- )
- (data.drop 13)
- (data.drop 14)
- (data.drop 15)
- )
- )
- (func $only-zeroes
- (block
- (if
- (global.get $__mem_segment_drop_state_1)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- )
- (global.set $__mem_segment_drop_state_1
- (i32.const 1)
- )
- )
- (func $no-zeroes
- (memory.init 16
- (i32.const 0)
- (i32.const 0)
- (i32.const 9)
- )
- (data.drop 16)
- )
- (func $empty
- (if
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (unreachable)
- )
- (nop)
- )
- (func $only-dropped
- (nop)
- (nop)
- )
- (func $only-dropped-zeroes
- (nop)
- (nop)
- )
-)
-(module
- (type $none_=>_none (func))
- (import "env" "param" (global $param i32))
- (global $__mem_segment_drop_state (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_0 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_1 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_2 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_3 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_4 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_5 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_6 (mut i32) (i32.const 0))
- (memory $0 2048 2048)
- (data "even")
- (data "more")
- (data "zeroes")
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (data "even")
- (data "more")
- (data "zeroes")
- (func $nonconst-dest
- (local $0 i32)
- (block
- (local.set $0
- (global.get $param)
- )
- (if
- (global.get $__mem_segment_drop_state)
- (unreachable)
- )
- (memory.fill
- (local.get $0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 0
- (i32.add
- (local.get $0)
- (i32.const 30)
- )
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.add
- (local.get $0)
- (i32.const 34)
- )
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 1
- (i32.add
- (local.get $0)
- (i32.const 64)
- )
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.add
- (local.get $0)
- (i32.const 68)
- )
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 2
- (i32.add
- (local.get $0)
- (i32.const 98)
- )
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.add
- (local.get $0)
- (i32.const 104)
- )
- (i32.const 0)
- (i32.const 30)
- )
- )
- (block
- (global.set $__mem_segment_drop_state
- (i32.const 1)
- )
- (data.drop 0)
- (data.drop 1)
- (data.drop 2)
- )
- )
- (func $nonconst-offset
- (memory.init 3
- (i32.const 0)
- (global.get $param)
- (i32.const 134)
- )
- (data.drop 3)
- )
- (func $nonconst-size
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (global.get $param)
- )
- (data.drop 4)
- )
- (func $partial-skip-start
- (block
- (if
- (global.get $__mem_segment_drop_state_0)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 20)
- )
- (memory.init 5
- (i32.const 20)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 24)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 6
- (i32.const 54)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 58)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 7
- (i32.const 88)
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.const 94)
- (i32.const 0)
- (i32.const 30)
- )
- )
- (block
- (global.set $__mem_segment_drop_state_0
- (i32.const 1)
- )
- (data.drop 5)
- (data.drop 6)
- (data.drop 7)
- )
- )
- (func $full-skip-start
- (block
- (memory.init 8
- (i32.const 0)
- (i32.const 2)
- (i32.const 2)
- )
- (memory.fill
- (i32.const 2)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 9
- (i32.const 32)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 36)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 10
- (i32.const 66)
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.const 72)
- (i32.const 0)
- (i32.const 30)
- )
- )
- (block
- (data.drop 8)
- (data.drop 9)
- (data.drop 10)
- )
- )
- (func $partial-skip-end
- (block
- (if
- (global.get $__mem_segment_drop_state_1)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 11
- (i32.const 30)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 34)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 12
- (i32.const 64)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 68)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 13
- (i32.const 98)
- (i32.const 0)
- (i32.const 6)
- )
- (memory.fill
- (i32.const 104)
- (i32.const 0)
- (i32.const 20)
- )
- )
- (block
- (global.set $__mem_segment_drop_state_1
- (i32.const 1)
- )
- (data.drop 11)
- (data.drop 12)
- (data.drop 13)
- )
- )
- (func $full-skip-end
- (block
- (if
- (global.get $__mem_segment_drop_state_2)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 14
- (i32.const 30)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 34)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 15
- (i32.const 64)
- (i32.const 0)
- (i32.const 4)
- )
- (memory.fill
- (i32.const 68)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 16
- (i32.const 98)
- (i32.const 0)
- (i32.const 4)
- )
- )
- (block
- (global.set $__mem_segment_drop_state_2
- (i32.const 1)
- )
- (data.drop 14)
- (data.drop 15)
- (data.drop 16)
- )
- )
- (func $slice-zeroes
- (block
- (if
- (global.get $__mem_segment_drop_state_3)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 10)
- )
- )
- (block
- (global.set $__mem_segment_drop_state_3
- (i32.const 1)
- )
- (data.drop 17)
- (data.drop 18)
- (data.drop 19)
- )
- )
- (func $slice-nonzeroes
- (memory.init 20
- (i32.const 0)
- (i32.const 1)
- (i32.const 2)
- )
- (block
- (data.drop 20)
- (data.drop 21)
- (data.drop 22)
- )
- )
- (func $zero-size
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_4)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state_4
- (i32.const 1)
- )
- (data.drop 23)
- (data.drop 24)
- (data.drop 25)
- )
- )
- (func $zero-size-undropped
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_5)
- )
- (unreachable)
- )
- )
- (func $out-of-bounds-offset
- (block
- (drop
- (i32.const 0)
- )
- (drop
- (i32.const 135)
- )
- (drop
- (i32.const 1)
- )
- (unreachable)
- )
- (nop)
- )
- (func $zero-size-out-of-bounds-offset
- (block
- (drop
- (i32.const 0)
- )
- (drop
- (i32.const 135)
- )
- (drop
- (i32.const 0)
- )
- (unreachable)
- )
- (nop)
- )
- (func $out-of-bounds-size
- (block
- (drop
- (i32.const 0)
- )
- (drop
- (i32.const 0)
- )
- (drop
- (i32.const 135)
- )
- (unreachable)
- )
- (nop)
- )
- (func $zero-size-at-bounds-offset
- (if
- (i32.or
- (i32.gt_u
- (i32.const 0)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_6)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state_6
- (i32.const 1)
- )
- (data.drop 29)
- (data.drop 30)
- (data.drop 31)
- )
- )
-)
-(module
- (type $none_=>_none (func))
- (global $__mem_segment_drop_state (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_0 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_1 (mut i32) (i32.const 0))
- (global $__mem_segment_drop_state_2 (mut i32) (i32.const 0))
- (memory $0 2048 2048)
- (data "hi")
- (data "even")
- (data "hi")
- (data "hi")
- (data "even")
- (data "hi")
- (data "even")
- (data "hi")
- (data "even")
- (data "hi")
- (func $zero-length-init-zeroes
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state
- (i32.const 1)
- )
- (data.drop 0)
- (data.drop 1)
- (data.drop 2)
- )
- )
- (func $zero-length-init-nonzeroes
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_0)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state_0
- (i32.const 1)
- )
- (data.drop 3)
- (data.drop 4)
- (data.drop 5)
- )
- )
- (func $zero-length-init-zeroes-2
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_1)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state_1
- (i32.const 1)
- )
- (data.drop 6)
- (data.drop 7)
- )
- )
- (func $zero-length-init-nonzeroes-2
- (if
- (i32.or
- (i32.gt_u
- (i32.const 13)
- (i32.shl
- (memory.size)
- (i32.const 16)
- )
- )
- (global.get $__mem_segment_drop_state_2)
- )
- (unreachable)
- )
- (block
- (global.set $__mem_segment_drop_state_2
- (i32.const 1)
- )
- (data.drop 8)
- (data.drop 9)
- )
- )
-)
-(module
- (type $none_=>_none (func))
- (memory $0 2048 2048)
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (data "a")
- (func $init-lots
- (block
- (memory.init 0
- (i32.const 0)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 1
- (i32.const 31)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 32)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 2
- (i32.const 62)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 63)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 3
- (i32.const 93)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 94)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 4
- (i32.const 124)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 125)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 5
- (i32.const 155)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 156)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 6
- (i32.const 186)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 187)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 7
- (i32.const 217)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 218)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 8
- (i32.const 248)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 249)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 9
- (i32.const 279)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 280)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 10
- (i32.const 310)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 311)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 11
- (i32.const 341)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 342)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 12
- (i32.const 372)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 373)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 13
- (i32.const 403)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 404)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 14
- (i32.const 434)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 435)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 15
- (i32.const 465)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 466)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 16
- (i32.const 496)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 497)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 17
- (i32.const 527)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 528)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 18
- (i32.const 558)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 559)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 19
- (i32.const 589)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 590)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 20
- (i32.const 620)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 621)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 21
- (i32.const 651)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 652)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 22
- (i32.const 682)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 683)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 23
- (i32.const 713)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 714)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 24
- (i32.const 744)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 745)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 25
- (i32.const 775)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 776)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 26
- (i32.const 806)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 807)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 27
- (i32.const 837)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 838)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 28
- (i32.const 868)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 869)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 29
- (i32.const 899)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 900)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 30
- (i32.const 930)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 931)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 31
- (i32.const 961)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 962)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 32
- (i32.const 992)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 993)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 33
- (i32.const 1023)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1024)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 34
- (i32.const 1054)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1055)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 35
- (i32.const 1085)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1086)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 36
- (i32.const 1116)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1117)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 37
- (i32.const 1147)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1148)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 38
- (i32.const 1178)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1179)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 39
- (i32.const 1209)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1210)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 40
- (i32.const 1240)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1241)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 41
- (i32.const 1271)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1272)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 42
- (i32.const 1302)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1303)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 43
- (i32.const 1333)
- (i32.const 0)
- (i32.const 1)
- )
- (memory.fill
- (i32.const 1334)
- (i32.const 0)
- (i32.const 11)
- )
- )
- (block
- (data.drop 0)
- (data.drop 1)
- (data.drop 2)
- (data.drop 3)
- (data.drop 4)
- (data.drop 5)
- (data.drop 6)
- (data.drop 7)
- (data.drop 8)
- (data.drop 9)
- (data.drop 10)
- (data.drop 11)
- (data.drop 12)
- (data.drop 13)
- (data.drop 14)
- (data.drop 15)
- (data.drop 16)
- (data.drop 17)
- (data.drop 18)
- (data.drop 19)
- (data.drop 20)
- (data.drop 21)
- (data.drop 22)
- (data.drop 23)
- (data.drop 24)
- (data.drop 25)
- (data.drop 26)
- (data.drop 27)
- (data.drop 28)
- (data.drop 29)
- (data.drop 30)
- (data.drop 31)
- (data.drop 32)
- (data.drop 33)
- (data.drop 34)
- (data.drop 35)
- (data.drop 36)
- (data.drop 37)
- (data.drop 38)
- (data.drop 39)
- (data.drop 40)
- (data.drop 41)
- (data.drop 42)
- (data.drop 43)
- (data.drop 44)
- (data.drop 45)
- (data.drop 46)
- (data.drop 47)
- (data.drop 48)
- (data.drop 49)
- (data.drop 50)
- (data.drop 51)
- (data.drop 52)
- (data.drop 53)
- (data.drop 54)
- (data.drop 55)
- (data.drop 56)
- (data.drop 57)
- (data.drop 58)
- (data.drop 59)
- (data.drop 60)
- (data.drop 61)
- (data.drop 62)
- (data.drop 63)
- (data.drop 64)
- )
- )
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1024) "\00")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1024) "\00")
- (data (i32.const 4096) "\00")
-)
-(module
- (import "env" "memoryBase" (global $memoryBase i32))
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (global.get $memoryBase) "\00")
-)
-(module
- (import "env" "memoryBase" (global $memoryBase i32))
- (memory $0 1 1)
- (data (i32.const 1024) "\00")
- (data (global.get $memoryBase) "x")
-)
-(module
- (type $none_=>_none (func))
- (global $__mem_segment_drop_state (mut i32) (i32.const 0))
- (memory $0 1 1)
- (data "skipped")
- (data "included")
- (export "func_54" (func $0))
- (func $0
- (if
- (global.get $__mem_segment_drop_state)
- (unreachable)
- )
- (memory.fill
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (memory.init 1
- (i32.const 30)
- (i32.const 0)
- (i32.const 8)
- )
- )
-)
-(module
- (import "env" "memory" (memory $0 1 1))
- (data (i32.const 1024) "x")
- (data (i32.const 2048) "\00")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
-)
diff --git a/test/passes/memory-packing_all-features.wast b/test/passes/memory-packing_all-features.wast
deleted file mode 100644
index 6869a85d6..000000000
--- a/test/passes/memory-packing_all-features.wast
+++ /dev/null
@@ -1,558 +0,0 @@
-(module
- (memory $0 2048 2048)
- (import "env" "memoryBase" (global $memoryBase i32))
- ;; nothing
-)
-
-(module
- (memory $0 2048 2048)
- (import "env" "memoryBase" (global $memoryBase i32))
- (data (i32.const 4066) "") ;; empty
-)
-
-(module
- (memory $0 2048 2048)
- (import "env" "memoryBase" (global $memoryBase i32))
-
- (data (global.get $memoryBase) "waka this cannot be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we don't know where it will go")
-)
-
-(module
- (memory 1 1)
-
- (data (i32.const 1024) "waka this CAN be optimized\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00we DO know where it will go")
-
- (data (i32.const 2000) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeros before")
-
- (data (i32.const 3000) "zeros after\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00")
-
- (data (i32.const 4000) "zeros\00in\00the\00middle\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00nice skip here\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00another\00but no")
-
- (func $nonzero-size-init-of-active-will-trap
- (memory.init 0
- (i32.const 42)
- (i32.const 0)
- (i32.const 13)
- )
- (data.drop 0)
- )
-
- (func $nonzero-offset-init-of-active-will-trap
- (memory.init 0
- (i32.const 42)
- (i32.const 13)
- (i32.const 0)
- )
- (data.drop 0)
- )
-
- (func $zero-offset-size-init-of-active-may-trap
- (memory.init 0
- (i32.const 42)
- (i32.const 0)
- (i32.const 0)
- )
- (data.drop 0)
- )
-)
-
-(module
- (memory $0 2048 2048)
-
- (data "not referenced, delete me") ;; 0
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start") ;; 1
-
- (func $zeroes-at-start
- (memory.init 1
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 1)
- )
-
- ;; the not-split tests have too many memory.init and data.drop instructions for splitting to be worth it
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes at start") ;; 2
-
- (func $zeroes-at-start-not-split
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 2)
- )
-
- (data "\00\00\00few zeroes at start") ;; 3
-
- (func $few-zeroes-at-start
- (memory.init 3
- (i32.const 0)
- (i32.const 0)
- (i32.const 22)
- )
- (data.drop 3)
- )
-
- (data "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 4
-
- (func $zeroes-at-end
- (memory.init 4
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (data.drop 4)
- )
-
- (data "zeroes at end\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 5
-
- (func $zeroes-at-end-not-split
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 43)
- )
- (data.drop 5)
- )
-
- (data "few zeroes at end\00\00\00") ;; 6
-
- (func $few-zeroes-at-end
- (memory.init 6
- (i32.const 0)
- (i32.const 0)
- (i32.const 20)
- )
- (data.drop 6)
- )
-
- (data "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle") ;; 7
-
- (func $zeroes-in-middle
- (memory.init 7
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 7)
- )
-
- (data "zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00in middle") ;; 8
-
- (func $zeroes-in-middle-not-split
- (memory.init 8
- (i32.const 0)
- (i32.const 0)
- (i32.const 35)
- )
- (memory.init 8
- (i32.const 0)
- (i32.const 0)
- (i32.const 45)
- )
- (data.drop 8)
- )
-
- (data "few zeroes\00\00\00in middle") ;; 9
-
- (func $few-zeroes-in-middle
- (memory.init 9
- (i32.const 0)
- (i32.const 0)
- (i32.const 22)
- )
- (data.drop 9)
- )
-
- (data "multiple\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00spans\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00of zeroes") ;; 10
-
- (func $multiple-spans-of-zeroes
- (memory.init 10
- (i32.const 0)
- (i32.const 0)
- (i32.const 82)
- )
- (data.drop 10)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 11
-
- (func $even-more-zeroes
- (memory.init 11
- (i32.const 0)
- (i32.const 0)
- (i32.const 134)
- )
- (data.drop 11)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 12
-
- (func $only-zeroes
- (memory.init 12
- (i32.const 0)
- (i32.const 0)
- (i32.const 30)
- )
- (data.drop 12)
- )
-
- (data "no zeroes") ;; 13
-
- (func $no-zeroes
- (memory.init 13
- (i32.const 0)
- (i32.const 0)
- (i32.const 9)
- )
- (data.drop 13)
- )
-
- (data "") ;; 14
-
- (func $empty
- (memory.init 14
- (i32.const 13)
- (i32.const 0)
- (i32.const 0)
- )
- (data.drop 14)
- )
-
- (data "only dropped") ;; 15
-
- (func $only-dropped
- (data.drop 15)
- (data.drop 15)
- )
-
- (data "\00\00\00\00\00") ;; 16
-
- (func $only-dropped-zeroes
- (data.drop 16)
- (data.drop 16)
- )
-
- (data "") ;; not referenced
-
- (data "\00\00\00\00\00") ;; not referenced
-)
-
-(module
- (memory $0 2048 2048)
- (import "env" "param" (global $param i32))
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 0
-
- (func $nonconst-dest
- (memory.init 0
- (global.get $param)
- (i32.const 0)
- (i32.const 134)
- )
- (data.drop 0)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 1
-
- (func $nonconst-offset
- (memory.init 1
- (i32.const 0)
- (global.get $param)
- (i32.const 134)
- )
- (data.drop 1)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 2
-
- (func $nonconst-size
- (memory.init 2
- (i32.const 0)
- (i32.const 0)
- (global.get $param)
- )
- (data.drop 2)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 3
-
- (func $partial-skip-start
- (memory.init 3
- (i32.const 0)
- (i32.const 10)
- (i32.const 124)
- )
- (data.drop 3)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 4
-
- (func $full-skip-start
- (memory.init 4
- (i32.const 0)
- (i32.const 32)
- (i32.const 102)
- )
- (data.drop 4)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 5
-
- (func $partial-skip-end
- (memory.init 5
- (i32.const 0)
- (i32.const 0)
- (i32.const 124)
- )
- (data.drop 5)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 6
-
- (func $full-skip-end
- (memory.init 6
- (i32.const 0)
- (i32.const 0)
- (i32.const 102)
- )
- (data.drop 6)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 7
-
- (func $slice-zeroes
- (memory.init 7
- (i32.const 0)
- (i32.const 35)
- (i32.const 10)
- )
- (data.drop 7)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 8
-
- (func $slice-nonzeroes
- (memory.init 8
- (i32.const 0)
- (i32.const 31)
- (i32.const 2)
- )
- (data.drop 8)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 9
-
- (func $zero-size
- (memory.init 9
- (i32.const 13)
- (i32.const 40)
- (i32.const 0)
- )
- (data.drop 9)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 10
-
- (func $zero-size-undropped
- (memory.init 10
- (i32.const 13)
- (i32.const 40)
- (i32.const 0)
- )
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 11
-
- (func $out-of-bounds-offset
- (memory.init 11
- (i32.const 0)
- (i32.const 135)
- (i32.const 1)
- )
- (data.drop 11)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 12
-
- (func $zero-size-out-of-bounds-offset
- (memory.init 12
- (i32.const 0)
- (i32.const 135)
- (i32.const 0)
- )
- (data.drop 12)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 13
-
- (func $out-of-bounds-size
- (memory.init 13
- (i32.const 0)
- (i32.const 0)
- (i32.const 135)
- )
- (data.drop 13)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00more\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00zeroes\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") ;; 14
-
- (func $zero-size-at-bounds-offset
- (memory.init 14
- (i32.const 0)
- (i32.const 134)
- (i32.const 0)
- )
- (data.drop 14)
- )
-)
-
-(module
- (memory $0 2048 2048)
- (data "hi\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hi") ;; 0
-
- (func $zero-length-init-zeroes
- (memory.init 0
- (i32.const 13)
- (i32.const 10)
- (i32.const 0)
- )
- (data.drop 0)
- )
-
- (data "hi\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hi") ;; 1
-
- (func $zero-length-init-nonzeroes
- (memory.init 1
- (i32.const 13)
- (i32.const 33)
- (i32.const 0)
- )
- (data.drop 1)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hi") ;; 2
-
- (func $zero-length-init-zeroes-2
- (memory.init 2
- (i32.const 13)
- (i32.const 10)
- (i32.const 0)
- )
- (data.drop 2)
- )
-
- (data "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00even\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00hi") ;; 3
-
- (func $zero-length-init-nonzeroes-2
- (memory.init 3
- (i32.const 13)
- (i32.const 31)
- (i32.const 0)
- )
- (data.drop 3)
- )
-)
-
-(module
- (memory $0 2048 2048)
- (data "a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00a") ;; 64 ranges of zeroes
-
- (func $init-lots
- (memory.init 0
- (i32.const 0)
- (i32.const 0)
- (i32.const 1345)
- )
- (data.drop 0)
- )
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1024) "\00") ;; this tramples the "x", and so must be kept.
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1025) "\00")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1023) "\00")
-)
-(module
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 1024) "\00") ;; when we see one bad thing, we give up
- (data (i32.const 4096) "\00")
-)
-(module
- (memory $0 1 1)
- (import "env" "memoryBase" (global $memoryBase i32))
- (data (i32.const 1024) "x")
- (data (global.get $memoryBase) "\00") ;; this could trample, or not
-)
-(module
- (memory $0 1 1)
- (import "env" "memoryBase" (global $memoryBase i32))
- (data (i32.const 1024) "\00") ;; this could trample, or not
- (data (global.get $memoryBase) "x")
-)
-(module
- (memory $0 1 1)
- (data "skipped\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00included")
- (export "func_54" (func $0))
- (func $0
- (memory.init 0
- (i32.const 0)
- (i32.const 7)
- (i32.const 38)
- )
- )
-)
-(module
- ;; we can't optimize on an imported memory without zeroFilledMemory being set.
- (import "env" "memory" (memory $0 1 1))
- (data (i32.const 1024) "x")
- (data (i32.const 2048) "\00")
-)
-(module
- ;; we can when not imported
- (memory $0 1 1)
- (data (i32.const 1024) "x")
- (data (i32.const 2048) "\00")
-)
diff --git a/test/passes/memory-packing_all-features_zero-filled-memory.txt b/test/passes/memory-packing_all-features_zero-filled-memory.txt
deleted file mode 100644
index 021a48b3d..000000000
--- a/test/passes/memory-packing_all-features_zero-filled-memory.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-(module
- (import "env" "memory" (memory $0 1 1))
- (data (i32.const 1024) "x")
-)
diff --git a/test/passes/memory-packing_all-features_zero-filled-memory.wast b/test/passes/memory-packing_all-features_zero-filled-memory.wast
deleted file mode 100644
index 34291cc7f..000000000
--- a/test/passes/memory-packing_all-features_zero-filled-memory.wast
+++ /dev/null
@@ -1,6 +0,0 @@
-(module
- ;; we can optimize on an imported memory with zeroFilledMemory being set.
- (import "env" "memory" (memory $0 1 1))
- (data (i32.const 1024) "x")
- (data (i32.const 1023) "\00")
-)