Skip to content

Commit b2d1ea8

Browse files
committed
s/<string>/<name>/ for better symmetry with <core:name>
1 parent 85c0d9f commit b2d1ea8

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

design/mvp/Binary.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ core:inlineexport ::= n:<core:name> si:<core:sortidx> => (e
7575
instance ::= ie:<instanceexpr> => (instance ie)
7676
instanceexpr ::= 0x00 c:<componentidx> arg*:vec(<instantiatearg>) => (instantiate c arg*)
7777
| 0x01 e*:vec(<inlineexport>) => e*
78-
instantiatearg ::= n:<string> si:<sortidx> => (with n si)
79-
string ::= s:<core:name> => s
78+
instantiatearg ::= n:<name> si:<sortidx> => (with n si)
79+
name ::= n:<core:name> => n
8080
sortidx ::= sort:<sort> idx:<u32> => (sort idx)
8181
sort ::= 0x00 cs:<core:sort> => core cs
8282
| 0x01 => func
@@ -99,7 +99,7 @@ Notes:
9999
* Validation of `core:instantiatearg` initially only allows the `instance`
100100
sort, but would be extended to accept other sorts as core wasm is extended.
101101
* Validation of `instantiate` requires each `<importname>` in `c` to match a
102-
`string` in a `with` argument (compared as strings) and for the types to
102+
`name` in a `with` argument (compared as strings) and for the types to
103103
match.
104104
* When validating `instantiate`, after each individual type-import is supplied
105105
via `with`, the actual type supplied is immediately substituted for all uses
@@ -114,7 +114,7 @@ Notes:
114114
(See [Alias Definitions](Explainer.md#alias-definitions) in the explainer.)
115115
```ebnf
116116
alias ::= s:<sort> t:<aliastarget> => (alias t (s))
117-
aliastarget ::= 0x00 i:<instanceidx> n:<string> => export i n
117+
aliastarget ::= 0x00 i:<instanceidx> n:<name> => export i n
118118
| 0x01 i:<core:instanceidx> n:<core:name> => core export i n
119119
| 0x02 ct:<u32> idx:<u32> => outer ct idx
120120
```

design/mvp/Explainer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@ instances, but with an expanded component-level definition of `sort`:
269269
instance ::= (instance <id>? <instanceexpr>)
270270
instanceexpr ::= (instantiate <componentidx> <instantiatearg>*)
271271
| <inlineexport>*
272-
instantiatearg ::= (with <string> <sortidx>)
273-
| (with <string> (instance <inlineexport>*))
274-
string ::= <core:name>
272+
instantiatearg ::= (with <name> <sortidx>)
273+
| (with <name> (instance <inlineexport>*))
274+
name ::= <core:name>
275275
sortidx ::= (<sort> <u32>)
276276
sort ::= core <core:sort>
277277
| func
@@ -290,7 +290,7 @@ future include `data`). Thus, component-level `sort` injects the full set
290290
of `core:sort`, so that they may be referenced (leaving it up to validation
291291
rules to throw out the core sorts that aren't allowed in various contexts).
292292

293-
The `string` production reuses the `core:name` quoted-string-literal syntax of
293+
The `name` production reuses the `core:name` quoted-string-literal syntax of
294294
Core WebAssembly (which appears in core module imports and exports and can
295295
contain any valid UTF-8 string).
296296

@@ -312,14 +312,14 @@ instance, the `core export` of a core module instance and a definition of an
312312
`outer` component (containing the current component):
313313
```ebnf
314314
alias ::= (alias <aliastarget> (<sort> <id>?))
315-
aliastarget ::= export <instanceidx> <string>
315+
aliastarget ::= export <instanceidx> <name>
316316
| core export <core:instanceidx> <core:name>
317317
| outer <u32> <u32>
318318
```
319319
If present, the `id` of the alias is bound to the new index added by the alias
320320
and can be used anywhere a normal `id` can be used.
321321

322-
In the case of `export` aliases, validation ensures `string` is an export in the
322+
In the case of `export` aliases, validation ensures `name` is an export in the
323323
target instance and has a matching sort.
324324

325325
In the case of `outer` aliases, the `u32` pair serves as a [de Bruijn
@@ -347,7 +347,7 @@ sortidx ::= (<sort> <u32>) ;; as above
347347
| <inlinealias>
348348
Xidx ::= <u32> ;; as above
349349
| <inlinealias>
350-
inlinealias ::= (<sort> <u32> <string>+)
350+
inlinealias ::= (<sort> <u32> <name>+)
351351
```
352352
If `<sort>` refers to a `<core:sort>`, then the `<u32>` of `inlinealias` is a
353353
`<core:instanceidx>`; otherwise it's an `<instanceidx>`. For example, the

0 commit comments

Comments
 (0)