Skip to content

Commit d4ae571

Browse files
committed
Elaborate on habitability of exact references (#14)
1 parent bbc823e commit d4ae571

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

proposals/custom-descriptors/Overview.md

+10
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,16 @@ as having "hidden" subtypes of `any` and `extern`,
301301
respectively.
302302
This preserves our ability to assign them more specific types in the future.
303303

304+
In fact, non-nullable exact references to most abstract heap types are uninhabited.
305+
The only exceptions are:
306+
307+
- `(ref exact i31)` and `(ref exact (shared i31))`, which are inhabited by i31 references.
308+
- `(ref exact exn)`, which is inhabited by exception references.
309+
- `(ref exact (shared waitqueue))`,
310+
which is inhabited by waitqueue references from the shared-everything threads proposal
311+
312+
Note that this will prevent us from ever introducing more specific subtypes of `i31`, `exn`, and `waitqueue`.
313+
304314
When allocating types with custom descriptors,
305315
`struct.new` and `struct.new_default` take exact references to the descriptors
306316
as their first operands.

0 commit comments

Comments
 (0)