Lines Matching refs:stream
7 ;; $C.transform takes and returns a stream<u8>
14 ;; https://github.com/WebAssembly/component-model/blob/add-tests/test/concurrency/partial-stream-co…
24 (import "" "stream.new" (func $stream.new (result i64)))
25 (import "" "stream.read" (func $stream.read (param i32 i32 i32) (result i32)))
26 (import "" "stream.write" (func $stream.write (param i32 i32 i32) (result i32)))
27 (import "" "stream.drop-readable" (func $stream.drop-readable (param i32)))
28 (import "" "stream.drop-writable" (func $stream.drop-writable (param i32)))
44 ;; check the incoming readable stream end
49 ;; create a new stream r/w pair $outsr/$outsw
50 (local.set $ret64 (call $stream.new))
59 (local.set $ret (call $stream.read (global.get $insr) (global.get $inbufp) (i32.const 12)))
63 ;; return the readable end of the outgoing stream to the caller
66 ;; wait for the stream.read/write to complete
89 (local.set $ret (call $stream.read (global.get $insr) (global.get $inbufp) (i32.const 4)))
94 (local.set $ret (call $stream.read (global.get $insr) (global.get $inbufp) (i32.const 2)))
99 (local.set $ret (call $stream.read (global.get $insr) (global.get $inbufp) (i32.const 8)))
107 (call $stream.drop-readable (global.get $insr))
108 (call $stream.drop-writable (global.get $outsw))
112 (type $ST (stream u8))
116 (canon stream.new $ST (core func $stream.new))
117 (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
118 (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
119 (canon stream.drop-readable $ST (core func $stream.drop-readable))
120 (canon stream.drop-writable $ST (core func $stream.drop-writable))
126 (export "stream.new" (func $stream.new))
127 (export "stream.read" (func $stream.read))
128 (export "stream.write" (func $stream.write))
129 (export "stream.drop-readable" (func $stream.drop-readable))
130 (export "stream.drop-writable" (func $stream.drop-writable))
132 (func (export "transform") (param "in" (stream u8)) (result (stream u8)) (canon lift
139 (import "transform" (func $transform (param "in" (stream u8)) (result (stream u8))))
148 (import "" "stream.new" (func $stream.new (result i64)))
149 (import "" "stream.read" (func $stream.read (param i32 i32 i32) (result i32)))
150 (import "" "stream.write" (func $stream.write (param i32 i32 i32) (result i32)))
151 (import "" "stream.drop-readable" (func $stream.drop-readable (param i32)))
152 (import "" "stream.drop-writable" (func $stream.drop-writable (param i32)))
161 ;; create a new stream r/w pair $insr/$insw
162 (local.set $ret64 (call $stream.new))
170 ;; call 'transform' which will return a readable stream $outsr eagerly
181 (local.set $ret (call $stream.write (local.get $insw) (i32.const 16) (i32.const 8)))
184 (local.set $ret (call $stream.write (local.get $insw) (i32.const 16) (i32.const 8)))
191 (local.set $ret (call $stream.write (local.get $insw) (i32.const 16) (i32.const 12)))
200 ;; confirm the write and the dropped stream
208 (call $stream.drop-writable (local.get $insw))
209 (call $stream.drop-readable (local.get $outsr))
215 (type $ST (stream u8))
219 (canon stream.new $ST (core func $stream.new))
220 (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
221 (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
222 (canon stream.drop-readable $ST (core func $stream.drop-readable))
223 (canon stream.drop-writable $ST (core func $stream.drop-writable))
230 (export "stream.new" (func $stream.new))
231 (export "stream.read" (func $stream.read))
232 (export "stream.write" (func $stream.write))
233 (export "stream.drop-readable" (func $stream.drop-readable))
234 (export "stream.drop-writable" (func $stream.drop-writable))