Skip to content

Commit 5a34794

Browse files
committed
Rename 'error' to 'error-context'
1 parent 419ada2 commit 5a34794

File tree

6 files changed

+205
-192
lines changed

6 files changed

+205
-192
lines changed

design/mvp/Async.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ g: func(s: stream<T>) -> stuff;
233233
```
234234
`g(f(x))` works as you might hope, concurrently streaming `x` into `f` which
235235
concurrently streams its results into `g`. If `f` has an error, it can close
236-
its returned `stream<T>` with an [`error`](Explainer.md#error-type) value
237-
which `g` will receive along with the notification that its readable stream
238-
was closed.
236+
its returned `stream<T>` with an [`error-context`](Explainer.md#error-context-type)
237+
value which `g` will receive along with the notification that its readable
238+
stream was closed.
239239

240240
If a component instance *would* receive the readable end of a stream for which
241241
it already owns the writable end, the readable end disappears and the existing
@@ -516,7 +516,8 @@ For now, this remains a [TODO](#todo) and validation will reject `async`-lifted
516516

517517
Native async support is being proposed incrementally. The following features
518518
will be added in future chunks roughly in the order list to complete the full
519-
"async" story:
519+
"async" story, with a TBD cutoff between what's in [WASI Preview 3] and what
520+
comes after:
520521
* `nonblocking` function type attribute: allow a function to declare in its
521522
type that it will not transitively do anything blocking
522523
* define what `async` means for `start` functions (top-level await + background
@@ -529,6 +530,8 @@ will be added in future chunks roughly in the order list to complete the full
529530
* some way to say "no more elements are coming for a while"
530531
* `recursive` function type attribute: allow a function to be reentered
531532
recursively (instead of trapping) and link inner and outer activations
533+
* add `stringstream` specialization of `stream<char>` (just like `string` is
534+
a specialization of `list<char>`)
532535
* allow pipelining multiple `stream.read`/`write` calls
533536
* allow chaining multiple async calls together ("promise pipelining")
534537
* integrate with `shared`: define how to lift and lower functions `async` *and*
@@ -572,3 +575,5 @@ will be added in future chunks roughly in the order list to complete the full
572575
[stack-switching]: https://github.com/WebAssembly/stack-switching/
573576
[JSPI]: https://github.com/WebAssembly/js-promise-integration/
574577
[shared-everything-threads]: https://github.com/webAssembly/shared-everything-threads
578+
579+
[WASI Preview 3]: https://github.com/WebAssembly/WASI/tree/main/wasip2#looking-forward-to-preview-3

design/mvp/Binary.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ primvaltype ::= 0x7f => bool
190190
| 0x75 => f64
191191
| 0x74 => char
192192
| 0x73 => string
193-
| 0x64 => error
193+
| 0x64 => error-context
194194
defvaltype ::= pvt:<primvaltype> => pvt
195195
| 0x72 lt*:vec(<labelvaltype>) => (record (field lt)*) (if |lt*| > 0)
196196
| 0x71 case*:vec(<case>) => (variant case+) (if |case*| > 0)
@@ -308,9 +308,9 @@ canon ::= 0x00 0x00 f:<core:funcidx> opts:<opts> ft:<typeidx> => (canon lift
308308
| 0x19 t:<typeidx> async?:<async?> => (canon future.cancel-write async? (core func)) 🔀
309309
| 0x1a t:<typeidx> => (canon future.close-readable t (core func)) 🔀
310310
| 0x1b t:<typeidx> => (canon future.close-writable t (core func)) 🔀
311-
| 0x1c opts:<opts> => (canon error.new opts (core func)) 🔀
312-
| 0x1d opts:<opts> => (canon error.debug-message opts (core func)) 🔀
313-
| 0x1e => (canon error.drop (core func)) 🔀
311+
| 0x1c opts:<opts> => (canon error-context.new opts (core func)) 🔀
312+
| 0x1d opts:<opts> => (canon error-context.debug-message opts (core func)) 🔀
313+
| 0x1e => (canon error-context.drop (core func)) 🔀
314314
async? ::= 0x00 =>
315315
| 0x01 => async
316316
opts ::= opt*:vec(<canonopt>) => opt*

0 commit comments

Comments
 (0)