You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: document/core/valid/conventions.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -306,7 +306,7 @@ In addition to field access written :math:`C.\K{field}` the following notation i
306
306
Convention
307
307
..........
308
308
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.
Copy file name to clipboardExpand all lines: proposals/gc/Overview.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -437,8 +437,8 @@ For now, we assume that all array types have a ([flexible](#flexible-aggregates)
437
437
Elements are accessed with generic load/store instructions that take a reference to an array:
438
438
```
439
439
(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))
442
442
)
443
443
)
444
444
```
@@ -717,7 +717,7 @@ Another alternative would be a three-point mutability lattice with readonly as a
717
717
718
718
The Wasm type system is intentionally simple.
719
719
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".
721
721
For example, that allows the use of type `anyref` to represent reference values whose type is not locally known.
722
722
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.
723
723
@@ -776,7 +776,7 @@ There are a number of reasons to make RTTs explicit:
776
776
777
777
* 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.
778
778
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).
0 commit comments