Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explainer for unified stack-switching proposal #74

Merged
merged 96 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
b565a83
Create Explainer.md
dhil Jul 25, 2024
76ce5b8
[explainer branch] Update Explainer.md (#63)
conrad-watt Jul 29, 2024
c107f25
`cont.bind` second type annotation
dhil Jul 29, 2024
2c283f0
Add handler list to `resume_throw`.
dhil Jul 29, 2024
9c76c26
Update Explainer.md
dhil Jul 29, 2024
83cbf8d
Opcodes
dhil Jul 29, 2024
ab3800f
Update Explainer.md
dhil Jul 29, 2024
49ba2a8
Update Explainer.md
dhil Jul 29, 2024
98228d0
Update Explainer.md
dhil Jul 29, 2024
8c875cb
Use tag results in symmetric switch (#64)
tlively Jul 30, 2024
0420e13
Barebones introduction
dhil Jul 30, 2024
83ef734
Update Explainer.md
dhil Jul 30, 2024
5675828
Update Explainer.md
dhil Jul 30, 2024
3a4055e
Update validation rule for `resume_throw`.
dhil Jul 30, 2024
474eca4
Yield-style generator code
dhil Jul 30, 2024
96ae85e
Yield-style generator: pseudo C program
dhil Jul 30, 2024
0571376
Simplify
dhil Jul 30, 2024
ec19266
Update yield-style generator example
dhil Jul 30, 2024
3d4b388
Update Explainer.md
dhil Jul 30, 2024
809678d
Update Explainer.md
dhil Jul 30, 2024
f98cdb5
[explainer] Abbreviate away continuation function types
tlively Jul 30, 2024
3dbb14c
Merge pull request #68 from WebAssembly/explainer-simplfy-cont-funcs
conrad-watt Jul 31, 2024
3eedd9f
Note that handler search accounts for event kind (#66)
tlively Jul 31, 2024
0560585
[explainer] Use type expansion rather than equality (#69)
tlively Jul 31, 2024
59bf46c
[explainer] Fix constraints and refactor handlers (#65)
tlively Aug 1, 2024
3d5c904
Update Explainer.md
dhil Aug 2, 2024
b984c14
Update Explainer.md
dhil Aug 2, 2024
bdb5d27
On memory management
dhil Aug 2, 2024
75db73b
Update Explainer.md
dhil Aug 2, 2024
1b6770e
Update Explainer.md
dhil Aug 2, 2024
4aa31cf
Update Explainer.md
dhil Aug 2, 2024
43f1bf6
Update Explainer.md
dhil Aug 2, 2024
8889bbf
Motivation (WIP)
dhil Aug 2, 2024
53debbc
Update Explainer.md
dhil Aug 2, 2024
4b8fadc
Update Explainer.md
dhil Aug 2, 2024
2b80385
Update Explainer.md
dhil Aug 2, 2024
08e362c
Update Explainer.md
dhil Aug 2, 2024
5fe4330
Update Explainer.md (#73)
fgmccabe Aug 13, 2024
57454be
initial pass through motivation text
slindley Aug 13, 2024
dbc3c23
Update Explainer.md
dhil Aug 15, 2024
11cf98b
Update Explainer.md
dhil Aug 15, 2024
20d89fd
Update Explainer.md
dhil Aug 15, 2024
fdc616a
Update Explainer.md
dhil Aug 15, 2024
21ad6dc
another go at motivation, including discussion of direct switching
slindley Aug 15, 2024
cc63139
more tinkering with the motivation / continuations text
slindley Aug 15, 2024
b7e9a9e
Update Explainer.md
dhil Aug 16, 2024
4fb4d5c
Update Explainer.md
dhil Aug 16, 2024
7850a73
Update Explainer.md
dhil Aug 16, 2024
344f973
Update Explainer.md
dhil Aug 16, 2024
5a88ae2
Update Explainer.md
dhil Aug 16, 2024
ac38c08
early examples
frank-emrich Aug 16, 2024
ff20351
tweak
slindley Aug 16, 2024
0b81e5a
Update Explainer.md
dhil Aug 19, 2024
fd90319
Update Explainer.md
dhil Aug 19, 2024
165a2da
quick pass through the instruction set section
slindley Aug 19, 2024
9ecf571
tweaks
slindley Aug 19, 2024
f3f705b
split up generator example code
frank-emrich Aug 20, 2024
db50cd9
minor tweaks
frank-emrich Aug 20, 2024
378cb53
Show non-switch version of task scheduler
frank-emrich Aug 20, 2024
8e3a794
trailing whitespace
frank-emrich Aug 20, 2024
ffa77b0
Reinstate barrier
dhil Aug 20, 2024
2e94d61
tweak task scheduling example description
frank-emrich Aug 20, 2024
2d5b08f
Update Explainer.md
dhil Aug 20, 2024
a656a6b
Update Explainer.md
dhil Aug 20, 2024
600947c
Update Explainer.md
dhil Aug 20, 2024
110fbb9
move $generator before $consumer
frank-emrich Aug 20, 2024
0755b14
add section on how to switch away instead of returning
frank-emrich Aug 20, 2024
8bef38c
tweaks
frank-emrich Aug 20, 2024
126cd7a
move various paragraphs to the "design considerations" section
slindley Aug 20, 2024
f2c8f42
rename $yield tag in generator to $gen
frank-emrich Aug 20, 2024
8bfb26f
factor out defintion of tag
frank-emrich Aug 20, 2024
c08ab62
formatting
frank-emrich Aug 20, 2024
60142e1
tweaks
frank-emrich Aug 20, 2024
3109c35
formatting
frank-emrich Aug 20, 2024
114b7e6
pass through the introductory examples section
slindley Aug 21, 2024
6aa0e3b
hyphens
slindley Aug 21, 2024
21a5273
capitals
slindley Aug 21, 2024
b545cfc
tweak
slindley Aug 21, 2024
44c573b
add missing ` `
frank-emrich Aug 22, 2024
9a0f0fd
Update Explainer.md
dhil Aug 22, 2024
f716fdf
Update Explainer.md
dhil Aug 22, 2024
b33afdb
Update Explainer.md
dhil Aug 22, 2024
fb1795d
tweaks
slindley Aug 22, 2024
709672b
reword paragraph about returning continuations
slindley Aug 22, 2024
7ad6765
more tinkering with text on continuations returning
slindley Aug 22, 2024
92fef78
Update Explainer.md
dhil Aug 23, 2024
867ceba
Update proposals/stack-switching/Explainer.md
slindley Aug 23, 2024
012ddc0
remove comments
slindley Aug 23, 2024
13a598e
delete some mess
slindley Aug 23, 2024
fc11753
Update proposals/stack-switching/Explainer.md
dhil Aug 24, 2024
fffe968
Update Explainer.md
dhil Aug 24, 2024
8f0cce2
add/mention second cont type on switch instrs in a few more places
frank-emrich Aug 26, 2024
8eb2625
bug in examples: $resume_next vs $schedule_next
frank-emrich Aug 26, 2024
3216024
fix types of task functions in $scheduler2
frank-emrich Aug 26, 2024
e21df50
fix handler block in $scheduler1
frank-emrich Aug 26, 2024
8dbd04f
remove spurious parameters from task functions in $scheduler1
frank-emrich Aug 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Explainer.md
  • Loading branch information
dhil committed Jul 29, 2024
commit 98228d084127a0e8ecca768424a66aede4588651
9 changes: 5 additions & 4 deletions proposals/stack-switching/Explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TODO

This proposal is based on the [function references proposal](https://github.com/WebAssembly/function-references) and [exception handling proposal](https://github.com/WebAssembly/exception-handling).

`cont <typeidx>` is a new form of defined type
`cont <typeidx>` is a new form of composite type
- `(cont $ft) ok` iff `$ft ok` and `$ft = [t1*] -> [t2*]`

We add two new continuation heap types and their subtyping hierachy:
Expand Down Expand Up @@ -58,11 +58,12 @@ We add two new continuation heap types and their subtyping hierachy:
- and `(C.types[$ct'] = cont $ft')*`
- and `([te2*] -> [t2*] <: C.types[$ft'])*`
- or `H = switch`
- and `te1* <: t2*`
- and `te2* = []`
- and `te1* <: t2*`


- `resume_throw <typeidx> <exnidx> (on <tagidx> <labelidx>|switch)*`
- Execute a given continuation, but force it to immediately handle the annotated exception.
- Execute a given continuation, but force it to immediately throw the annotated exception.
- Used to abort a continuation.
- `resume_throw $ct $e (on $t H)* : [te* (ref null? $ct)] -> [t2*]`
- iff `C.types[$ct] = cont $ft`
Expand All @@ -78,8 +79,8 @@ We add two new continuation heap types and their subtyping hierachy:
- and `(C.types[$ct'] = cont $ft')*`
- and `([te2*] -> [t2*] <: C.types[$ft'])*`
- or `H = switch`
- and `te1* <: t2*`
- and `te2* = []`
- and `te1* <: t2*`

- `switch <typeidx> <tagidx>`
- Switch to executing a given continuation directly, suspending the current execution.
Expand Down