Lines Matching refs:stream
3 ;; stream.new
6 (import "" "stream.new" (func $stream-new (result i64)))
8 (type $stream-type (stream u8))
9 (core func $stream-new (canon stream.new $stream-type))
10 (core instance $i (instantiate $m (with "" (instance (export "stream.new" (func $stream-new))))))
13 ;; stream.read
18 (import "" "stream.read" (func $stream-read (param i32 i32 i32) (result i32)))
20 (type $stream-type (stream u8))
21 (core func $stream-read (canon stream.read $stream-type async (memory $libc "memory")))
22 …(core instance $i (instantiate $m (with "" (instance (export "stream.read" (func $stream-read))))))
25 ;; stream.read w/o memory
28 (import "" "stream.read" (func $stream-read (param i32 i32 i32) (result i32)))
30 (type $stream-type (stream))
31 (core func $stream-read (canon stream.read $stream-type async))
32 …(core instance $i (instantiate $m (with "" (instance (export "stream.read" (func $stream-read))))))
35 ;; stream.read; with realloc
43 (import "" "stream.read" (func $stream-read (param i32 i32 i32) (result i32)))
45 (type $stream-type (stream string))
46 …(core func $stream-read (canon stream.read $stream-type async (memory $libc "memory") (realloc (fu…
47 …(core instance $i (instantiate $m (with "" (instance (export "stream.read" (func $stream-read))))))
50 ;; stream.write
55 (import "" "stream.write" (func $stream-write (param i32 i32 i32) (result i32)))
57 (type $stream-type (stream u8))
58 (core func $stream-write (canon stream.write $stream-type async (memory $libc "memory")))
59 …(core instance $i (instantiate $m (with "" (instance (export "stream.write" (func $stream-write)))…
62 ;; stream.write w/o memory
65 (import "" "stream.write" (func $stream-write (param i32 i32 i32) (result i32)))
67 (type $stream-type (stream))
68 (core func $stream-write (canon stream.write $stream-type async))
69 …(core instance $i (instantiate $m (with "" (instance (export "stream.write" (func $stream-write)))…
72 ;; stream.cancel-read
75 (import "" "stream.cancel-read" (func $stream-cancel-read (param i32) (result i32)))
77 (type $stream-type (stream u8))
78 (core func $stream-cancel-read (canon stream.cancel-read $stream-type))
79 …(core instance $i (instantiate $m (with "" (instance (export "stream.cancel-read" (func $stream-ca…
82 ;; stream.cancel-write
85 (import "" "stream.cancel-write" (func $stream-cancel-write (param i32) (result i32)))
87 (type $stream-type (stream u8))
88 (core func $stream-cancel-write (canon stream.cancel-write $stream-type))
89 …(core instance $i (instantiate $m (with "" (instance (export "stream.cancel-write" (func $stream-c…
92 ;; stream.drop-readable
95 (import "" "stream.drop-readable" (func $stream-drop-readable (param i32)))
97 (type $stream-type (stream u8))
98 (core func $stream-drop-readable (canon stream.drop-readable $stream-type))
99 …(core instance $i (instantiate $m (with "" (instance (export "stream.drop-readable" (func $stream-…
102 ;; stream.drop-writable
105 (import "" "stream.drop-writable" (func $stream-drop-writable (param i32)))
107 (type $stream-type (stream u8))
108 (core func $stream-drop-writable (canon stream.drop-writable $stream-type))
109 …(core instance $i (instantiate $m (with "" (instance (export "stream.drop-writable" (func $stream-…
112 ;; Test which exercises an intra-component stream read/write to ensure that
118 (import "" "stream.new" (func $stream.new (result i64)))
119 (import "" "stream.read" (func $stream.read (param i32 i32 i32) (result i32)))
120 (import "" "stream.write" (func $stream.write (param i32 i32 i32) (result i32)))
129 (call $stream.read
137 (call $stream.read
147 (call $stream.write
155 (call $stream.write
165 (local.set $t64 (call $stream.new))
170 (type $s (stream u8))
171 (core func $stream.new (canon stream.new $s))
172 (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
173 (core func $stream.write (canon stream.write $s async (memory $libc "mem")))
176 (export "stream.new" (func $stream.new))
177 (export "stream.read" (func $stream.read))
178 (export "stream.write" (func $stream.write))
186 (assert_trap (invoke "read-twice") "cannot have concurrent operations active on a future/stream")
188 (assert_trap (invoke "write-twice") "cannot have concurrent operations active on a future/stream")