Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize WAT codeblock syntax names #445

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion design/mvp/Async.md
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ this approach is that a non-`shared` component-level function could be safely
lowered with `async shared`. In the case that the lifted function being lowered
was also `async shared`, the entire call could happen on the non-main thread
without a context switch. But if the lifting side was non-`shared`, then the
Component Model could automatically handle the synchronization of enqueing a
Component Model could automatically handle the synchronization of enqueuing a
call to the export (as in the backpressure case mentioned above), returning a
subtask for the async caller to wait on as usual. Thus, the sync+async
composition story described above could naturally be extended to a
Expand Down
4 changes: 2 additions & 2 deletions design/mvp/Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ Notes:
- [`core:utf8`]
* `&` operator is used to denote bitwise AND operation, which performs AND on every bit of two numbers in their binary form
* `isnan` is a function, which takes a floating point number as a parameter and returns `true` iff it represents a NaN as defined in [IEEE 754 standard]
* `||B||` is the length of the byte sequence generated from the production `B` in a derivation as defined in [Core convention auxilary notation]
* `||B||` is the length of the byte sequence generated from the production `B` in a derivation as defined in [Core convention auxiliary notation]

## Name Section

Expand Down Expand Up @@ -518,4 +518,4 @@ named once.
[module-linking]: https://github.com/WebAssembly/module-linking/blob/main/proposals/module-linking/Explainer.md

[IEEE 754 standard]: https://ieeexplore.ieee.org/document/8766229
[Core convention auxilary notation]: https://webassembly.github.io/spec/core/binary/conventions.html#auxiliary-notation
[Core convention auxiliary notation]: https://webassembly.github.io/spec/core/binary/conventions.html#auxiliary-notation
60 changes: 30 additions & 30 deletions design/mvp/CanonicalABI.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ returned to it when it is notified that the `Subtask` has reached the
```
The maximum flattened core wasm values depends on whether this is a normal
synchronous call (in which return values are returned by core wasm) or a newer
async or sychronous-using-`always-task-return` call, in which case return
async or synchronous-using-`always-task-return` call, in which case return
values are passed as parameters to `canon task.return`.

Lastly, the `Task.exit` method is called when the task has signalled that it
Expand Down Expand Up @@ -887,7 +887,7 @@ A "waitable set" contains a collection of waitables that can be waited on or
polled for *any* element to make progress. Although the `WaitableSet` class
below represents `elems` as a `list` and implements `poll` with an O(n) search,
because a waitable can be associated with at most one set and can contain at
most one pending event, a real implemenation could instead store a list of
most one pending event, a real implementation could instead store a list of
waitables-with-pending-events as a linked list embedded directly in the
`Waitable` table element to avoid the separate allocation while providing O(1)
polling.
Expand Down Expand Up @@ -2703,7 +2703,7 @@ cover each of these `canon` cases.
### `canon lift`

For a canonical definition:
```wasm
```wat
(canon lift $callee:<funcidx> $opts:<canonopt>* (func $f (type $ft)))
```
validation specifies:
Expand Down Expand Up @@ -2789,7 +2789,7 @@ happens by core wasm calling `waitable-set.wait`.
task.exit()
return
```
In contrast, the aynchronous `callback` case does asynchronous waiting in
In contrast, the asynchronous `callback` case does asynchronous waiting in
the event loop, with core wasm (repeatedly) returning instructions for what
to do next:
```python
Expand Down Expand Up @@ -2866,7 +2866,7 @@ async def call_and_trap_on_throw(callee, task, args):
### `canon lower`

For a canonical definition:
```wasm
```wat
(canon lower $callee:<funcidx> $opts:<canonopt>* (core func $f))
```
where `$callee` has type `$ft`, validation specifies:
Expand Down Expand Up @@ -3016,7 +3016,7 @@ as post-MVP [adapter functions].
### `canon resource.new`

For a canonical definition:
```wasm
```wat
(canon resource.new $rt (core func $f))
```
validation specifies:
Expand All @@ -3039,7 +3039,7 @@ async def canon_resource_new(rt, task, rep):
### `canon resource.drop`

For a canonical definition:
```wasm
```wat
(canon resource.drop $rt $async? (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3093,7 +3093,7 @@ destructor is an encapsualted implementation detail of the resource type.
### `canon resource.rep`

For a canonical definition:
```wasm
```wat
(canon resource.rep $rt (core func $f))
```
validation specifies:
Expand All @@ -3116,7 +3116,7 @@ component instance defining a resource can access its representation.
### 🔀 `canon context.get`

For a canonical definition:
```wasm
```wat
(canon context.get $t $i (core func $f))
```
validation specifies:
Expand All @@ -3137,7 +3137,7 @@ async def canon_context_get(t, i, task):
### 🔀 `canon context.set`

For a canonical definition:
```wasm
```wat
(canon context.set $t $i (core func $f))
```
validation specifies:
Expand All @@ -3159,7 +3159,7 @@ async def canon_context_set(t, i, task, v):
### 🔀 `canon backpressure.set`

For a canonical definition:
```wasm
```wat
(canon backpressure.set (core func $f))
```
validation specifies:
Expand All @@ -3181,7 +3181,7 @@ consume resources.
### 🔀 `canon task.return`

For a canonical definition:
```wasm
```wat
(canon task.return (result $t)? $opts (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3212,7 +3212,7 @@ a thunk that is indirectly called by `task.return` after these guards.
### 🔀 `canon yield`

For a canonical definition:
```wasm
```wat
(canon yield $async? (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3240,7 +3240,7 @@ activations.
### 🔀 `canon waitable-set.new`

For a canonical definition:
```wasm
```wat
(canon waitable-set.new (core func $f))
```
validation specifies:
Expand All @@ -3258,7 +3258,7 @@ async def canon_waitable_set_new(task):
### 🔀 `canon waitable-set.wait`

For a canonical definition:
```wasm
```wat
(canon waitable-set.wait $async? (memory $mem) (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3302,7 +3302,7 @@ handle multiple overlapping callback activations.
### 🔀 `canon waitable-set.poll`

For a canonical definition:
```wasm
```wat
(canon waitable-set.poll $async? (memory $mem) (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3333,7 +3333,7 @@ activations.
### 🔀 `canon waitable-set.drop`

For a canonical definition:
```wasm
```wat
(canon waitable-set.drop (core func $f))
```
validation specifies:
Expand All @@ -3354,7 +3354,7 @@ async def canon_waitable_set_drop(task, i):
### 🔀 `canon waitable.join`

For a canonical definition:
```wasm
```wat
(canon waitable.join (core func $f))
```
validation specifies:
Expand All @@ -3380,7 +3380,7 @@ given waitable is already in one set, it will be transferred.
### 🔀 `canon subtask.drop`

For a canonical definition:
```wasm
```wat
(canon subtask.drop (core func $f))
```
validation specifies:
Expand All @@ -3402,7 +3402,7 @@ async def canon_subtask_drop(task, i):
### 🔀 `canon {stream,future}.new`

For canonical definitions:
```wasm
```wat
(canon stream.new $t (core func $f))
(canon future.new $t (core func $f))
```
Expand Down Expand Up @@ -3432,15 +3432,15 @@ the future built-ins below.
### 🔀 `canon {stream,future}.{read,write}`

For canonical definitions:
```wasm
```wat
(canon stream.read $t $opts (core func $f))
(canon stream.write $t $opts (core func $f))
```
validation specifies:
* `$f` is given type `(func (param i32 i32 i32) (result i32))`

For canonical definitions:
```wasm
```wat
(canon future.read $t $opts (core func $f))
(canon future.write $t $opts (core func $f))
```
Expand Down Expand Up @@ -3563,7 +3563,7 @@ same direction as values, as an optional last value of the stream or future.
### 🔀 `canon {stream,future}.cancel-{read,write}`

For canonical definitions:
```wasm
```wat
(canon stream.cancel-read $t $async? (core func $f))
(canon stream.cancel-write $t $async? (core func $f))
(canon future.cancel-read $t $async? (core func $f))
Expand Down Expand Up @@ -3629,15 +3629,15 @@ caller can assume that ownership of the buffer has been returned.
### 🔀 `canon {stream,future}.close-{readable,writable}`

For canonical definitions:
```wasm
```wat
(canon stream.close-readable $t (core func $f))
(canon future.close-readable $t (core func $f))
```
validation specifies:
* `$f` is given type `(func (param i32))`

and for canonical definitions:
```wasm
```wat
(canon stream.close-writable $t (core func $f))
(canon future.close-writable $t (core func $f))
```
Expand Down Expand Up @@ -3681,7 +3681,7 @@ direction as values as an optional last value of the stream or future.
### 🔀 `canon error-context.new`

For a canonical definition:
```wasm
```wat
(canon error-context.new $opts (core func $f))
```
validation specifies:
Expand Down Expand Up @@ -3720,7 +3720,7 @@ Canonical ABI and stands for an arbitrary host-defined function.)
### 🔀 `canon error-context.debug-message`

For a canonical definition:
```wasm
```wat
(canon error-context.debug-message $opts (core func $f))
```
validation specifies:
Expand All @@ -3745,7 +3745,7 @@ the pointer and length of the debug string (allocated via `opts.realloc`).
### 🔀 `canon error-context.drop`

For a canonical definition:
```wasm
```wat
(canon error-context.drop (core func $f))
```
validation specifies:
Expand All @@ -3764,7 +3764,7 @@ async def canon_error_context_drop(task, i):
### 🧵 `canon thread.spawn`

For a canonical definition:
```wasm
```wat
(canon thread.spawn (type $ft) (core func $st))
```
validation specifies:
Expand Down Expand Up @@ -3811,7 +3811,7 @@ def canon_thread_spawn(f, c):
### 🧵 `canon thread.available_parallelism`

For a canonical definition:
```wasm
```wat
(canon thread.available_parallelism (core func $f))
```
validation specifies:
Expand Down
Loading