Skip to content

Commit 4bafd01

Browse files
committed
Fix typos found in WebAssembly#276
1 parent 145752a commit 4bafd01

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

design/mvp/CanonicalABI.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,10 +1482,10 @@ validation specifies:
14821482
* `$f` is given type `$ft`
14831483
* a `memory` is present if required by lifting and is a subtype of `(memory 1)`
14841484
* a `realloc` is present if required by lifting and has type `(func (param i32 i32 i32 i32) (result i32))`
1485-
* if a `post-return` is present, it has type `(func (param flatten_functype($ft)['results']))`
1485+
* if a `post-return` is present, it has type `(func (param flatten_functype($ft).results))`
14861486

14871487
When instantiating component instance `$inst`:
1488-
* Define `$f` to be the closure `lambda call, args: canon_lift($opts, $inst, $callee, $ft, args)`
1488+
* Define `$f` to be the closure `lambda args: canon_lift($opts, $inst, $callee, $ft, args)`
14891489

14901490
Thus, `$f` captures `$opts`, `$inst`, `$callee` and `$ft` in a closure which
14911491
can be subsequently exported or passed into a child instance (via `with`). If
@@ -1550,7 +1550,7 @@ where `$callee` has type `$ft`, validation specifies:
15501550
* there is no `post-return` in `$opts`
15511551

15521552
When instantiating component instance `$inst`:
1553-
* Define `$f` to be the closure: `lambda call, args: canon_lower($opts, $inst, $callee, $ft, args)`
1553+
* Define `$f` to be the closure: `lambda args: canon_lower($opts, $inst, $callee, $ft, args)`
15541554

15551555
Thus, from the perspective of Core WebAssembly, `$f` is a [function instance]
15561556
containing a `hostfunc` that closes over `$opts`, `$inst`, `$callee` and `$ft`

design/mvp/Explainer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ defvaltype ::= bool
533533
| f32 | f64
534534
| char | string
535535
| (record (field "<label>" <valtype>)+)
536-
| (variant (case <id>? "<label>" <valtype>?)+)
536+
| (variant (case "<label>" <valtype>?)+)
537537
| (list <valtype>)
538538
| (tuple <valtype>+)
539539
| (flags "<label>"+)
@@ -663,7 +663,7 @@ of boolean fields uses a sequence of boolean-valued bytes.
663663

664664
Note that, at least initially, variants are required to have a non-empty list of
665665
cases. This could be relaxed in the future to allow an empty list of cases, with
666-
the empty `(variant)` effectively serving as a [empty type] and indicating
666+
the empty `(variant)` effectively serving as an [empty type] and indicating
667667
unreachability.
668668

669669
#### Definition types
@@ -688,9 +688,9 @@ canonical built-ins described [below](#canonical-built-ins). The `rep`
688688
immediate of a `resource` type specifies its *core representation type*, which
689689
is currently fixed to `i32`, but will be relaxed in the future (to at least
690690
include `i64`, but also potentially other types). When the last handle to a
691-
resource is dropped, the resource's `dtor` function will be called (if
692-
present), allowing the implementing component to perform clean-up like freeing
693-
linear memory allocations.
691+
resource is dropped, the resource's destructor function specified by the `dtor`
692+
immediate will be called (if present), allowing the implementing component to
693+
perform clean-up like freeing linear memory allocations.
694694

695695
The `instance` type constructor describes a list of named, typed definitions
696696
that can be imported or exported by a component. Informally, instance types
@@ -1113,7 +1113,7 @@ isolation than otherwise achievable with a shared global namespace.
11131113
### Canonical Definitions
11141114

11151115
From the perspective of Core WebAssembly running inside a component, the
1116-
Component Model is an [Embedding]. As such, the Component Model defines the
1116+
Component Model is an [embedder]. As such, the Component Model defines the
11171117
Core WebAssembly imports passed to [`module_instantiate`] and how Core
11181118
WebAssembly exports are called via [`func_invoke`]. This allows the Component
11191119
Model to specify how core modules are linked together (as shown above) but it
@@ -1928,7 +1928,7 @@ and will be added over the coming months to complete the MVP proposal:
19281928
[func-import-abbrev]: https://webassembly.github.io/spec/core/text/modules.html#text-func-abbrev
19291929
[`core:version`]: https://webassembly.github.io/spec/core/binary/modules.html#binary-version
19301930

1931-
[Embedding]: https://webassembly.github.io/spec/core/appendix/embedding.html
1931+
[Embedder]: https://webassembly.github.io/spec/core/appendix/embedding.html
19321932
[`module_instantiate`]: https://webassembly.github.io/spec/core/appendix/embedding.html#mathrm-module-instantiate-xref-exec-runtime-syntax-store-mathit-store-xref-syntax-modules-syntax-module-mathit-module-xref-exec-runtime-syntax-externval-mathit-externval-ast-xref-exec-runtime-syntax-store-mathit-store-xref-exec-runtime-syntax-moduleinst-mathit-moduleinst-xref-appendix-embedding-embed-error-mathit-error
19331933
[`func_invoke`]: https://webassembly.github.io/spec/core/appendix/embedding.html#mathrm-func-invoke-xref-exec-runtime-syntax-store-mathit-store-xref-exec-runtime-syntax-funcaddr-mathit-funcaddr-xref-exec-runtime-syntax-val-mathit-val-ast-xref-exec-runtime-syntax-store-mathit-store-xref-exec-runtime-syntax-val-mathit-val-ast-xref-appendix-embedding-embed-error-mathit-error
19341934
[`func_alloc`]: https://webassembly.github.io/spec/core/appendix/embedding.html#mathrm-func-alloc-xref-exec-runtime-syntax-store-mathit-store-xref-syntax-types-syntax-functype-mathit-functype-xref-exec-runtime-syntax-hostfunc-mathit-hostfunc-xref-exec-runtime-syntax-store-mathit-store-xref-exec-runtime-syntax-funcaddr-mathit-funcaddr

design/mvp/WIT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ world your-world {
207207
The plain name of an `import` or `export` statement is used as the plain name
208208
of the final component `import` or `export` definition.
209209

210-
In the component model imports to a component either use an plain or interface
210+
In the component model imports to a component either use a plain or interface
211211
name, and in WIT this is reflected in the syntax:
212212

213213
```wit
@@ -381,7 +381,7 @@ world invalid-union-world {
381381
382382
```
383383

384-
### A Note on SubTyping
384+
### A Note on Subtyping
385385

386386
In the future, when `optional` export is supported, the world author may explicitly mark exports as optional to make a component targeting an included World a subtype of the union World.
387387

@@ -1248,7 +1248,7 @@ variant option {
12481248
}
12491249
12501250
variant result {
1251-
ok(ok-ty)
1251+
ok(ok-ty),
12521252
err(err-ty),
12531253
}
12541254
```

0 commit comments

Comments
 (0)