4 ;; test flattening of multiple segments
5 (data (i32.const 10) "waka ")
6 (data (i32.const 15) "waka") ;; skip a byte here
7 (data (i32.const 20) "waka waka waka")
9 (elem (i32.const 0) $call-indirect)
10 (export "test1" $test1)
11 (export "test2" $test2)
12 (export "test3" $test3)
14 (drop (i32.const 0)) ;; no work at all, really
15 (call $safe-to-call) ;; safe to call
16 (call_indirect (type $v) (i32.const 0)) ;; safe to call
19 (drop (i32.load (i32.const 12))) ;; a safe load
20 (drop (i32.load16 (i32.const 12)))
21 (drop (i32.load8 (i32.const 12)))
24 (i32.store (i32.const 12) (i32.const 115)) ;; a safe store, should alter memory
25 (i32.store16 (i32.const 20) (i32.const 31353))
26 (i32.store8 (i32.const 23) (i32.const 120))
30 (i32.store8 (i32.const 10) (i32.const 110)) ;; safe write too (lowest possible)
31 (i32.store8 (i32.const 33) (i32.const 109)) ;; safe write too (highest possible)
34 (i32.store8 (i32.const 40) (i32.const 67))