Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 681b39d

Browse files
committed
Fix typos
1 parent 7b5bebc commit 681b39d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

document/core/appendix/index-instructions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def Instruction(name, opcode, type=None, validation=None, execution=None, operat
340340
Instruction(r'\ARRAYINITDATA~x~y', r'\hex{FB}~\hex{12}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_data', r'exec-array.init_data'),
341341
Instruction(r'\ARRAYINITELEM~x~y', r'\hex{FB}~\hex{13}', r'[(\REF~\NULL~x)~\I32~\I32~\I32] \to []', r'valid-array.init_elem', r'exec-array.init_elem'),
342342
Instruction(r'\REFTEST~(\REF~t)', r'\hex{FB}~\hex{14}', r"[(\REF~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'),
343-
Instruction(r'\REFTEST~(\REF~\NULL~t)', r'\hex{FB}~\hex{15}', r"[(REF~\NULL~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'),
343+
Instruction(r'\REFTEST~(\REF~\NULL~t)', r'\hex{FB}~\hex{15}', r"[(\REF~\NULL~t')] \to [\I32]", r'valid-ref.test', r'exec-ref.test'),
344344
Instruction(r'\REFCAST~(\REF~t)', r'\hex{FB}~\hex{16}', r"[(\REF~t')] \to [(\REF~t)]", r'valid-ref.cast', r'exec-ref.cast'),
345345
Instruction(r'\REFCAST~(\REF~\NULL~t)', r'\hex{FB}~\hex{17}', r"[(\REF~\NULL~t')] \to [(\REF~\NULL~t)]", r'valid-ref.cast', r'exec-ref.cast'),
346346
Instruction(r'\BRONCAST~t_1~t_2', r'\hex{FB}~\hex{18}', r'[t_1] \to [t_1\reftypediff t_2]', r'valid-br_on_cast', r'exec-br_on_cast'),

document/core/valid/conventions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ In addition to field access written :math:`C.\K{field}` the following notation i
306306
Convention
307307
..........
308308

309-
Any form of :ref:`type <syntax-type>` can be *closed* to bring it into :ref:`closed <type-closed>` form relative to a :ref:`context <context>` it is :ref:`valid <valid-type>` in by :ref:`substituting <notation-subst>` each :ref:`type index <syntax-typeidx>` :math:`x` occurring in it with the corresponding :ref:`defined type <syntax-deftype>` :math:`C.\CTYPES[x]`, after first closing the the types in :math:`C.\CTYPES` themselves.
309+
Any form of :ref:`type <syntax-type>` can be *closed* to bring it into :ref:`closed <type-closed>` form relative to a :ref:`context <context>` it is :ref:`valid <valid-type>` in by :ref:`substituting <notation-subst>` each :ref:`type index <syntax-typeidx>` :math:`x` occurring in it with the corresponding :ref:`defined type <syntax-deftype>` :math:`C.\CTYPES[x]`, after first closing the types in :math:`C.\CTYPES` themselves.
310310

311311
.. math::
312312
\begin{array}{@{}lcll@{}}

document/core/valid/matching.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ A :ref:`defined type <syntax-deftype>` :math:`\deftype_1` matches a type :math:`
456456
.. note::
457457
Note that there is no explicit definition of type _equivalence_,
458458
since it coincides with syntactic equality,
459-
as used in the premise of the fomer rule above.
459+
as used in the premise of the former rule above.
460460

461461

462462
.. index:: limits

proposals/gc/Overview.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ For now, we assume that all array types have a ([flexible](#flexible-aggregates)
437437
Elements are accessed with generic load/store instructions that take a reference to an array:
438438
```
439439
(func $f (param $v (ref $vector))
440-
(array.get $vector (local.get $v) (i32.const 1)
441-
(array.set $vector (local.get $v) (i32.const 2))
440+
(array.set $vector (local.get $v) (i32.const 1)
441+
(array.get $vector (local.get $v) (i32.const 2))
442442
)
443443
)
444444
```
@@ -717,7 +717,7 @@ Another alternative would be a three-point mutability lattice with readonly as a
717717

718718
The Wasm type system is intentionally simple.
719719
That implies that it cannot be expressive enough to track all type information that is available in a source program.
720-
To allow producers to work around the inevitable limitations of the type system, down casts have to provided as an "escape hatch".
720+
To allow producers to work around the inevitable limitations of the type system, down casts have to be provided as an "escape hatch".
721721
For example, that allows the use of type `anyref` to represent reference values whose type is not locally known.
722722
When such a value is used in a context where the producer knows its real type, it can use a down cast to recover it.
723723

@@ -776,7 +776,7 @@ There are a number of reasons to make RTTs explicit:
776776

777777
* It allows more choice in producers' use of RTT information, including making it optional (post-MVP), in accordance with the pay-as-you-go principle: for example, structs that are not involved in any casts do not need to pay the overhead of carrying runtime type information (depending on specifics of the GC implementation strategy). Some languages may never need to introduce any RTTs at all.
778778

779-
* Most importantly, making RTTs explicit separates the concerns of casting from Wasm-level polymorphism, i.e., [type parameters](Post-MVP.md#type-parameters). Type parameters can thus be treated as purely a validation artifact with no bearing on runtime. This property, known as parametricity, drastically simplifies the implementation of such type parameterisation and avoids the substantial hidden costs of reified generics that would otherwise hvae to be paid for every single use of type parameters (short of non-trivial cross-procedural dataflow analysis in the engine).
779+
* Most importantly, making RTTs explicit separates the concerns of casting from Wasm-level polymorphism, i.e., [type parameters](Post-MVP.md#type-parameters). Type parameters can thus be treated as purely a validation artifact with no bearing on runtime. This property, known as parametricity, drastically simplifies the implementation of such type parameterisation and avoids the substantial hidden costs of reified generics that would otherwise have to be paid for every single use of type parameters (short of non-trivial cross-procedural dataflow analysis in the engine).
780780

781781

782782
## Future Extensions

0 commit comments

Comments
 (0)