Skip to content

Commit 386269e

Browse files
authored
Remove null? annotations (WebAssembly#86)
* Revert "Allow cont ref to be non-null in switch (WebAssembly#85)" This reverts commit 92cbcc5. * Remove other unnecessary `null?` in instruction typing
1 parent 92cbcc5 commit 386269e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proposals/stack-switching/Explainer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -767,27 +767,27 @@ This abbreviation will be formalised with an auxiliary function or other means i
767767

768768
- `cont.new <typeidx>`
769769
- Create a new continuation from a given typed funcref.
770-
- `cont.new $ct : [(ref null? $ft)] -> [(ref $ct)]`
770+
- `cont.new $ct : [(ref null $ft)] -> [(ref $ct)]`
771771
- iff `C.types[$ct] ~~ cont [t1*] -> [t2*]`
772772

773773
- `cont.bind <typeidx> <typeidx>`
774774
- Partially apply a continuation.
775-
- `cont.bind $ct $ct' : [t3* (ref null? $ct)] -> [(ref $ct')]`
775+
- `cont.bind $ct $ct' : [t3* (ref null $ct)] -> [(ref $ct')]`
776776
- iff `C.types[$ct] ~~ cont [t3* t1*] -> [t2*]`
777777
- and `C.types[$ct'] ~~ cont [t1'*] -> [t2'*]`
778778
- and `[t1*] -> [t2*] <: [t1'*] -> [t2'*]`
779779

780780
- `resume <typeidx> hdl*`
781781
- Execute a given continuation.
782782
- If the executed continuation suspends with a control tag `$t`, the corresponding handler `(on $t H)` is executed.
783-
- `resume $ct hdl* : [t1* (ref null? $ct)] -> [t2*]`
783+
- `resume $ct hdl* : [t1* (ref null $ct)] -> [t2*]`
784784
- iff `C.types[$ct] ~~ cont [t1*] -> [t2*]`
785785
- and `(hdl : t2*)*`
786786

787787
- `resume_throw <typeidx> <exnidx> hdl*`
788788
- Execute a given continuation, but force it to immediately throw the annotated exception.
789789
- Used to abort a continuation.
790-
- `resume_throw $ct $e hdl* : [te* (ref null? $ct)] -> [t2*]`
790+
- `resume_throw $ct $e hdl* : [te* (ref null $ct)] -> [t2*]`
791791
- iff `C.types[$ct] ~~ cont [t1*] -> [t2*]`
792792
- and `C.tags[$e] : tag $ft`
793793
- and `C.types[$ft] ~~ func [te*] -> []`
@@ -815,7 +815,7 @@ This abbreviation will be formalised with an auxiliary function or other means i
815815
- `switch <typeidx> <tagidx>`
816816
- Switch to executing a given continuation directly, suspending the current execution.
817817
- The suspension and switch are performed from the perspective of a parent `(on $e switch)` handler, determined by the annotated control tag.
818-
- `switch $ct1 $e : [t1* (ref null? $ct1)] -> [t2*]`
818+
- `switch $ct1 $e : [t1* (ref null $ct1)] -> [t2*]`
819819
- iff `C.tags[$e] = tag $ft`
820820
- and `C.types[$ft] ~~ func [] -> [t*]`
821821
- and `C.types[$ct1] ~~ cont [t1* (ref null? $ct2)] -> [te1*]`

0 commit comments

Comments
 (0)