Skip to content

Commit 0bab0ca

Browse files
authored
Move sharedness outside describes and descriptor clauses (#3)
As suggested by rossberg. This makes sense becuase sharedness "closes over" describes and descriptor clauses. In particular, the types described or describing a shared type must themselves be shared.
1 parent 351de2d commit 0bab0ca

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

proposals/custom-rtts/Overview.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -446,23 +446,27 @@ TODO
446446
### Describes and Desciptor Clauses
447447

448448
In the formal syntax,
449-
we insert optional descriptor and describes clauses between `comptype`
450-
(or `sharecomptype` from shared-everything-threads)
451-
and `subtype`:
449+
we insert optional descriptor and describes clauses between `comptype` and `subtype`.
450+
(Sharedness from the shared-everything-threads proposal goes outside these new clauses,
451+
and is included below only to clarify the interaction between proposals.)
452452

453453
```
454454
descriptorcomptype ::=
455-
| 0x4D x:typeidx ct:sharecomptype => (descriptor x ct)
456-
| ct:sharecomptype => ct
455+
| 0x4D x:typeidx ct:comptype => (descriptor x ct)
456+
| ct:comptype => ct
457457
458458
describescomptype ::=
459459
| 0x4C x:typeidx ct:descriptorcomptype => (describes x ct)
460460
| ct:descriptorcomptype => ct
461461
462+
sharecomptype ::=
463+
| 0x65 ct:describescomptype => (shared ct)
464+
| ct:describescomptype => ct
465+
462466
subtype ::=
463-
| 0x50 x*:vec(typeidx) ct:describescomptype => sub x* ct
464-
| 0x4F x*:vec(typeidx) ct:describescomptype => sub final x* ct
465-
| ct:describescomptype => sub final eps ct
467+
| 0x50 x*:vec(typeidx) ct:sharecomptype => sub x* ct
468+
| 0x4F x*:vec(typeidx) ct:sharecomptype => sub final x* ct
469+
| ct:sharecomptype => sub final eps ct
466470
```
467471

468472
> TODO: Update the text format in the examples above to reflect this

0 commit comments

Comments
 (0)