-
Notifications
You must be signed in to change notification settings - Fork 13
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
WasmFX reference interpreter and testsuite #47
Conversation
Merge typed-func-refs proposal
This patch extends the interpreter with a minimal exception handling facility. It is minimal in the sense that it supports only a single exception which can be thrown and caught.
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
The opcodes for try/catch/throw are taken from the provisional exception-handling proposal.
Co-authored-by: Andreas Rossberg <[email protected]>
Co-authored-by: Andreas Rossberg <[email protected]>
Extends test suite too.
Co-authored-by: Andreas Rossberg <[email protected]>
Minimal exception handling extension
Implement events
Add cont type and instructions
Merge with WebAssembly/spec and WebAssembly/gc
Merge with wasm-3.0+exn
I don’t plan on merging this PR at the moment
Francis McCabe
SWE
…On Fri, Apr 12, 2024 at 6:51 AM Daniel Hillerström ***@***.***> wrote:
This patch adds the implementation of the WebAssembly reference
interpreter extended with support for the WasmFX instruction set. It also
adds the WasmFX testsuite.
Please merge this after #46
<#46>.
------------------------------
You can view, comment on, or merge this pull request online at:
#47
Commit Summary
- 9ef4a9b
<9ef4a9b>
Merge pull request #2 from effect-handlers/merge-funcref
- 41d0c6e
<41d0c6e>
Minimal exception handling extension
- f81d04a
<f81d04a>
Update interpreter/syntax/free.ml
- 1572421
<1572421>
Update interpreter/text/arrange.ml
- 7fe3e89
<7fe3e89>
Update interpreter/text/parser.mly
- f293c24
<f293c24>
Update interpreter/exec/eval.ml
- ad622f3
<ad622f3>
Update interpreter/exec/eval.ml
- 449e176
<449e176>
Update interpreter/binary/encode.ml
- 8e0a378
<8e0a378>
Update interpreter/exec/eval.ml
- 147024b
<147024b>
Declare DO as a token.
- bd8a611
<bd8a611>
Add lexical rules for try/catch/do/throw.
- b0fcf75
<b0fcf75>
Add a few test cases.
- 62fc2d9
<62fc2d9>
Implement binary encoding and decoding.
- 4d2b207
<4d2b207>
Update interpreter/script/run.ml
- bc83c41
<bc83c41>
Update interpreter/script/run.ml
- 5d4602a
<5d4602a>
Address @rossberg's comments.
- 1b59e24
<1b59e24>
Adds missing success reduction for `catch`.
- 68e69ec
<68e69ec>
Update interpreter/script/js.ml
- ce612e8
<ce612e8>
Implement events
- ac039db
<ac039db>
Add cont type and instructions; validation, en/decoding
- 2d7252d
<2d7252d>
Merge pull request #1 from effect-handlers/tiny-exn
- 3eebbfe
<3eebbfe>
Merge pull request #4 from effect-handlers/mini-exn
- c1e7772
<c1e7772>
Merge branch 'master' of github.com:effect-handlers/wasm-spec into
tiny-exn
- a6ab02b
<a6ab02b>
Merge pull request #5 from effect-handlers/cont
- fdb69cc
<fdb69cc>
Merge branch 'mini-exn' of github.com:effect-handlers/wasm-spec into
tiny-exn
- fb297a0
<fb297a0>
Typos
- 7704c23
<7704c23>
Merge branch 'master' into cont
- c9f369b
<c9f369b>
First semantics
- 7f092d0
<7f092d0>
Simplify
- 5e510ee
<5e510ee>
Text, simple test
- a44c070
<a44c070>
Missing rule
- e10edf6
<e10edf6>
Minor grammar tweak
- e235dac
<e235dac>
Test exns
- 1b478ef
<1b478ef>
Scheduler example
- 8349bee
<8349bee>
Generator example; make threads more interesting
- 34ebc19
<34ebc19>
Avoid code duplication
- 3939828
<3939828>
Eps
- 92fd88f
<92fd88f>
Renames; fixes; add guard instruction
- 6f1aed8
<6f1aed8>
Actually invoke test
- c3a3a3d
<c3a3a3d>
Unify Guarded admin instr with Handle
- be2c1c0
<be2c1c0>
Test empty handler
- dfb8dad
<dfb8dad>
Comment
- 6b0b593
<6b0b593>
Implement reduction and text format (#6)
- f775ff5
<f775ff5>
Implement single-shot semantics
- 707dec0
<707dec0>
Implement single-shot semantics (#7)
- a5cacd2
<a5cacd2>
Merge remote-tracking branch 'funcref/master' into single-shot
- 13aa280
<13aa280>
Merge remote-tracking branch 'funcref/master'
- 332f4f1
<332f4f1>
Merge remote-tracking branch 'origin/master'
- 8109132
<8109132>
Merge remote-tracking branch 'funcref/master'
- 261d1a8
<261d1a8>
Merge remote-tracking branch 'tailcall/master'
- ee429ef
<ee429ef>
Add cont.bind; check handler types
- 03a1e4c
<03a1e4c>
Nit
- eef1931
<eef1931>
Fix
- 650e0f0
<650e0f0>
Add cont.bind; check handler types (#10)
- ed01787
<ed01787>
Merge remote-tracking branch 'upstream/master'
- c33e8bd
<c33e8bd>
Merge remote-tracking branch 'funcref/master'
- f3ce3d2
<f3ce3d2>
Merge remote-tracking branch 'tailcall/master'
- 3d81921
<3d81921>
fix cont.bind to bind arguments in the correct order (fixes #12)
- 611a37e
<611a37e>
Fix composiiton order
- 43b741d
<43b741d>
Merge branch 'cont.bind'
- 60d2c28
<60d2c28>
Examples (#8)
- ce9860d
<ce9860d>
Add overview of formal rules (#11)
- a6c90c8
<a6c90c8>
Added mvar implementation
- e991efe
<e991efe>
Added comments
- 5cb386e
<5cb386e>
Merge pull request #15 from ani003/mvar
- 6b6f0e3
<6b6f0e3>
Explainer document (#14)
- 6a62ed1
<6a62ed1>
Revert "MVar implementation" (#17)
- 069848a
<069848a>
update README
- 57c5955
<57c5955>
Type-indexed tags. (#18)
- f317d0b
<f317d0b>
Refactor `cont.wast` to not use `let` & `func.bind` (#24)
- eb9932a
<eb9932a>
Merge
- f4a1f12
<f4a1f12>
Fix compilation errors after merge.
- 9f861ea
<9f861ea>
Merge pull request #25 from dhil/wasmfx-funcref-merge
- c9e60d8
<c9e60d8>
Update `resume_throw` (#26)
- 5331635
<5331635>
Fix all examples apart from delimited control (#27)
- 2877ce4
<2877ce4>
Change opcode for cont (#28)
- 7ad4f4b
<7ad4f4b>
Add type annotations to continuation instructions (#29)
- d24a9bd
<d24a9bd>
Update examples to conform with the recent changes to the syntax
(control-lwt.wast still needs to be refactored to use cont.bind+new syntax)
(#30)
- b7e4ed5
<b7e4ed5>
Add a simple and more involved generator example (#31)
- dd4e5a1
<dd4e5a1>
Merge with WebAssembly/spec
- 08de56b
<08de56b>
Disable JS testsuite
- 74a3ed3
<74a3ed3>
Merge pull request #1 from dhil/wasmfx-main-sync
- 0cfa5a5
<0cfa5a5>
Merge branch 'main' of github.com:WebAssembly/spec into wasmfx
- 42228fb
<42228fb>
Merge pull request #6 from dhil/wasmfx
- af789d0
<af789d0>
Merge with WebAssembly/function-references
- 1b8e62a
<1b8e62a>
Merge branch 'main' of github.com:WebAssembly/function-references into
funcref-merge
- fe51e7d
<fe51e7d>
Fix CI interpreter
- 7fb5764
<7fb5764>
Merge pull request #7 from dhil/funcref-merge
- aa62cdd
<aa62cdd>
Merge with WebAssembly/spec
- ab3bf77
<ab3bf77>
Merge pull request #8 from dhil/wasmfx-main
- 2250826
<2250826>
Merge with upstream
- 4f8d8c7
<4f8d8c7>
Merge pull request #9 from dhil/wasmfx-merge
- 7188e24
<7188e24>
Merge branch 'main' of github.com:WebAssembly/gc into wasmfx-merge
- d7aa1d1
<d7aa1d1>
Expand tag types
- 5e0e3f8
<5e0e3f8>
Fix try-catch assertion error.
- 8ce5b1f
<8ce5b1f>
Fix remaining bugs after merge with the GC proposal.
- 697ac89
<697ac89>
Fix nit
- 52ec720
<52ec720>
Address comments
- 47367c9
<47367c9>
More tests
- c81ef89
<c81ef89>
Test for resume_throw too
- 4eb38ce
<4eb38ce>
Add NoContHT
- 92c223d
<92c223d>
Add contref, nullcontref, etc to the wat/wast formats
- 9072739
<9072739>
Update opcodes again
- d13dc88
<d13dc88>
Fix opcode
- a8ffd1f
<a8ffd1f>
Merge pull request #10 from dhil/wasmfx-merge
- 4a46a40
<4a46a40>
Merge with WebAssembly/main
- 5987142
<5987142>
Merge branch 'main' of github.com:WebAssembly/gc into wasmfx-merge
- aa87fc8
<aa87fc8>
Merge pull request #11 from dhil/wasmfx-merge
- dbc1d73
<dbc1d73>
Merge with upstream
- bb16de3
<bb16de3>
Merge branch 'main' of github.com:WebAssembly/function-references into
wasmfx-merge
- c27a005
<c27a005>
Merge with GC
- 4ce0657
<4ce0657>
Merge with spec, function-references, and gc
- ab570e6
<ab570e6>
Merge pull request #12 from dhil/wasmfx-merge
- c17b4a6
<c17b4a6>
Merge with WebAssembly/spec
- 72b3d35
<72b3d35>
Merge branch 'main' of github.com:WebAssembly/gc into wasmfx-merge
- d55bb61
<d55bb61>
Merge pull request #13 from dhil/wasmfx-merge
- 41bf3b9
<41bf3b9>
Update Overview.md (#15)
- 2168ade
<2168ade>
Merge branch 'main' of github.com:WebAssembly/function-references into
wasmfx-merge
- 50b8d7d
<50b8d7d>
Merge branch 'main' of github.com:WebAssembly/gc into wasmfx-merge
- b77ab8d
<b77ab8d>
Merge with WebAssembly/spec, WebAssembly/function-references, and
WebAssembly/gc
- 4310c76
<4310c76>
Merge pull request #16 from dhil/wasmfx-merge
- a9ec313
<a9ec313>
Resolve wasmfx/specfx#17 (#18)
- a9e6111
<a9e6111>
Merge branch 'main' of github.com:WebAssembly/spec into wasmfx-merge
- 848ebad
<848ebad>
Merge pull request #20 from dhil/wasmfx
- b585eb9
<b585eb9>
Merge pull request #21 from dhil/wasmfx-merge
- 00b7aca
<00b7aca>
Merge with WebAssembly/function-references
- 6c78ed3
<6c78ed3>
Merge pull request #22 from dhil/wasmfx-fr-merge
- 3e3abe7
<3e3abe7>
Merge with WebAssembly/gc
- e746b32
<e746b32>
Merge pull request #23 from dhil/wasmfx-gc-merge
- c8cbfd2
<c8cbfd2>
Merge with WebAssembly/main
- 4663060
<4663060>
Merge pull request #24 from dhil/wasmfx-merge
- d534658
<d534658>
Merge with WebAssembly/function-references
- 4fb7135
<4fb7135>
Merge with WebAssembly/gc
- 25a78b9
<25a78b9>
Merge pull request #25 from dhil/wasmfx-merge
- ee9cbe7
<ee9cbe7>
Update the instruction set descriptions in the Explainer document (#27)
- 88774bd
<88774bd>
[spec] minor formatting adjustment
- 2361fee
<2361fee>
Merge pull request #524 from takikawa/adjust-spacing-match
- 2992099
<2992099>
Merge branch 'main' of github.com:WebAssembly/spec into wasmfx-merge
- a33a6a0
<a33a6a0>
Merge branch 'main' of github.com:WebAssembly/gc into wasmfx-merge
- 0af205c
<0af205c>
Merge pull request #28 from dhil/wasmfx-merge
- 10286c8
<10286c8>
Merge branch 'wasm-3.0+exn' of github.com:WebAssembly/spec into
wasmfx-wasm3.0+exn
- e49a5b7
<e49a5b7>
Maybe fix bikeshed error; at least silencing it for now.
- 02de8d1
<02de8d1>
Disable W3C publish workflow
- b0a7c47
<b0a7c47>
Merge pull request #29 from dhil/wasmfx-wasm3.0+exn
- a324dba
<a324dba>
Fix control-lwt example (#30)
- 902e33d
<902e33d>
WasmFX documents&examples
- 217ed1b
<217ed1b>
Merge with wasmfx/specfx
File Changes
(40 files <https://github.com/WebAssembly/stack-switching/pull/47/files>)
- *M* .github/workflows/ci-interpreter.yml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-6223b7b653ae27690b03714cd152338247b595491d092309ea5392bc6e4354ec>
(2)
- *M* document/core/appendix/embedding.rst
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-71b60fa83701671097c2a211afaf17d58111a71bc4be815fb5c0155bdcc6fe45>
(4)
- *M* document/core/valid/instructions.rst
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-9332587047dc1f92f47da3ee3516da59fd28aa2427fa6c53a5a96578bd1c46fe>
(11)
- *M* document/js-api/index.bs
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-73846d0b7899a94fe050d3c0ba447da607bebedf80f8b5ed31cb4d164756f048>
(2)
- *M* interpreter/binary/decode.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-8f47cd6eea0ea8a77585445a804b57e3f6abd2accc3f25e6d1e96857e10f4129>
(59)
- *M* interpreter/binary/encode.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-97a574f8c55af6ca93321fa3a7f210f9d39a244b2fc2a70d96be17cfccec4ed3>
(42)
- *M* interpreter/exec/eval.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-b09a979eeefbe532c2d25635c4594b600e4c536cd945657a6f3373bdbbfe1957>
(231)
- *M* interpreter/exec/eval.mli
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-8f69eaab8cead4f717a2befd3f44dbf5ce9593fe35b78179d45c0ba452cbbcc3>
(3)
- *M* interpreter/runtime/tag.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-3d1881397a21f163acfa7782a14cfeeb778638a8874e15adf4e9ea80323a616b>
(6)
- *M* interpreter/script/js.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-4faceaffe48a8623c07ef3a3d5ed7269d36aa8fa60826341e4baae1eb0dd208d>
(14)
- *M* interpreter/script/run.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-ab284759f63f7d8fa3c77da7483d6ae6df248a64ee1e3732c1e372d97ea9b660>
(7)
- *M* interpreter/script/script.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-855d705ee5a1eb968bbb96bc40839fb4e7fb2f83c1570ec0ac802c3c79a922a5>
(3)
- *M* interpreter/syntax/ast.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-7815a9e7b7ec1f5767acb52ec40e924522056b4d861147e17cc7ec7d564f995a>
(32)
- *M* interpreter/syntax/free.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-75dbd751f2ca9aeb591ce634c2eabfe4a804d6689f7c68375fd890ddd86e212b>
(23)
- *M* interpreter/syntax/operators.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-501daa00803165c333d0a60838cfbca7f0c567a6de1dc92d779e6d69dc7bcae0>
(6)
- *M* interpreter/syntax/types.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-2c71744f4a25497ad85004311595d93b3bc52a1324131e76da2a3b8c5b9cb872>
(93)
- *M* interpreter/text/arrange.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-4efbd7be43b6d87f5d9fd520d9f17beaa769f33091df422bdca82e0a9236c2b5>
(41)
- *M* interpreter/text/lexer.mll
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-83836f093c6ba0dbdf8ba8797f7496fe8f8bc13adee22f3c67337de0018ce3ba>
(15)
- *M* interpreter/text/parser.mly
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-8db1f79b5574352d012d2d6c0ae76ad7ed25d4f352bb0de0b335c0f010dcd870>
(198)
- *M* interpreter/util/lib.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-f6062bba4c3c4f170814ae1e0838519c9bd8c24c91b4410c23c614e6b2a29b6f>
(12)
- *M* interpreter/util/lib.mli
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-ae16ce41987c8bb7f7946c853d995eac92780ce8ce750809dd97e600420d3be7>
(2)
- *M* interpreter/valid/match.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-70f8114b7498287a0dfda3658487eaa94d3c6d51e2fe2d022961a389fd8588d8>
(16)
- *M* interpreter/valid/valid.ml
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-0428d866a3b1cf7a48c6da6ddaa09671223f7b44af03f4447d09bf482963e2bc>
(146)
- *M* proposals/continuations/Explainer.md
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-a1f5f896e2877db0f6c02c3b1d4fdfd08693508909ff30114be1b81cde89b4f5>
(196)
- *M* proposals/continuations/Overview.md
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-c6ddfeb4ad27ffa279be149f7081986b96a9d3b7cef6be5c3d80bac25a780a56>
(54)
- *M* proposals/continuations/examples/actor-lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-6dfbb6d041c00e6ba6180ac309718488cecbca72bda556f004342da6a2ef0f11>
(80)
- *M* proposals/continuations/examples/actor.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-19fd88735c6b87942dc486b36606a1c7ae47c903691fa3a4b4d6f8532c2740f9>
(74)
- *M* proposals/continuations/examples/async-await.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-510541878b76495788f71364fee72d3ef672a68dd80f98ab92489f05e002a417>
(79)
- *M* proposals/continuations/examples/control-lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-7ce2f20c1c31a2ac9e95dc1d9f3cbaaec2d188c7771393e8a299ea7b26b3fe91>
(95)
- *M* proposals/continuations/examples/fun-actor-lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-1fd78df3bd3497bca01d24aaed9a1e144d629e1cadbb61d05f22e292471e478b>
(146)
- *M* proposals/continuations/examples/fun-lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-9d4271309f3aa69814c06ba22fab6632a666e98a13e378d01365ceaf239fb262>
(42)
- *M* proposals/continuations/examples/fun-pipes.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-99afb4b04c200c32fce3217637299730c0fe8b4f8004d36483b2f3e5f4ded1d7>
(8)
- *M* proposals/continuations/examples/fun-state.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-b7820a22926cc78e2fa3a67875f12d3fff06905290192cbea30a838117f9015e>
(6)
- *A* proposals/continuations/examples/generators.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-7720a70ab20bb804f2078f55f7b858634f0296390de5a75cfbdd259116197247>
(166)
- *M* proposals/continuations/examples/lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-ba9aa77db6ef18731c9763069a8a647661550ad069b3faafad57abe257ba8cf0>
(26)
- *M* proposals/continuations/examples/pipes.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-a828394cd085db9193f90e2694e0e5246b37b9301689c443acc4381143f9132f>
(8)
- *M* proposals/continuations/examples/static-lwt.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-75c9dbbb397c59922a286385db28f59ce4e50463c462ac1297efb77f0f60094a>
(10)
- *A* test/core/cont.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-2e83996e3142f597eac229c43fe9a03d567f184256ca361189e31554dcb177a5>
(640)
- *M* test/core/table.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-a393996d9552a5c9a3826742aac9cc6e137ab235c63e24fd82c6bab7f01aa0af>
(25)
- *M* test/core/tag.wast
<https://github.com/WebAssembly/stack-switching/pull/47/files#diff-91f7446b8b3d4c3d0bd32887625ad277259439f72eb419fed23255ebd07193d6>
(10)
Patch Links:
- https://github.com/WebAssembly/stack-switching/pull/47.patch
- https://github.com/WebAssembly/stack-switching/pull/47.diff
—
Reply to this email directly, view it on GitHub
<#47>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQAXUFK5UAEYNI6GKT3JVTY47RFBAVCNFSM6AAAAABGEF77N2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DAMRQGMZTAMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
What do we gain by not merging this? |
I am currently using the 'main' branch of the repo for my own experiments. It would be seriously conflicting to merge the wasfx interpreter at this point. (Note: I will also not be merging my changes into the main branch). |
I think your basis for rejection is weak. If you are worried about merge conflicts then I will gladly do the merge for you. Regardless, I think your current thinking is wrong: we absolutely should have both stack switching proposals readily accessible in this repository to enable us and others to play with them. |
I am referring here to the interpreter changes... However, if you would like to merge into a 'wasm-fx' branch of the repo, I can definitely agree with that. |
+1 from me for having WasmFX and bag-o-stacks simultaneously available for experimentation. |
Right. I think @dhil's point is that if there's another variation of stack-switching that somebody wants to implement in the reference interpreter (e.g. a bag-o-stacks variation) then it would probably be more convenient for people to experiment with if it was included alongside the WasmFX one so that it was easy to switch between the two. Given that the WasmFX reference interpreter has been publicly available and pretty stable for the last 2-3 years, and as far as I'm aware there has been no other alternative stack-switching implementation in the reference interpreter in that time, it seems reasonable to at least consider merging it into main. |
It is not possible to have both wasm fx & another proposal available simultaneously in one folder; unless we use different branches. |
It is possible. We could use a flag to switch between them, or if they use different instructions it should work for them to coexist. Of course, it's a little hard to judge how viable that would be without seeing what this hypothetical alternative implementation looks like. |
It is possible (in principle) to use switches. However, modulo a change in the way that wasm specs are worked on (which I happen to champion), the most common way seems to be to have separate repos, (in effect, a disjunction rather than a conjunction with multiple designs). |
@fgmccabe I think having separate branches is suboptimal as it reduces visibility and makes it needlessly complicated for the curious user to play with it (i.e. the user drop off rate is likely to be affected negatively). This repository is one of the top results for the search query "webassembly stack switching", and as such, I think it should be as easy as 1 2 3 for a curious user to get started. In this regard, I think binaryen does it right: clone, build, play. I am strongly advocating for an approach where we have both proposals implemented in I do not find either of your arguments against it convincing:
The implementations can coexist mostly without worrying about each other. The notable exception is the choice of opcodes. In this case, we can either organise the opcode space together, or we can use flags as suggested by @slindley. |
@fgmccabe @dhil Could you all not just do separate non- That way, you all can do your thing, and other interested people could also fork off the main interpreter and do their own experiments without having to worry about stepping on your toes (or vice versa) either. |
In the spirit of working together on a shared journey of discovery, I strongly support merging the WasmFX repo into this proposal repo. It is less confusing and fragmenting for the community but also more accurately reflects the current status of work in this space. In Wizard we've been working off the WasmFX repo, which isn't the case for any other proposal and certainly stands out. @fgmccabe Let's please discuss weighty and important PRs like this one; I feel closing this was premature. I'd like to feel that this subgroup is working together, even if we have some technical disagreements, and I think having the union of both proposals in the |
Apologies, did not mean to actually close the PR itself. |
@fgmccabe and I have discussed this offline. We've agreed to have separate @fgmccabe will add the For now we'll avoid merging stack-switching functionality for the reference interpreter into the To be clear, I agree with @dhil that having both implementations in the same branch would be convenient for experimentation. However, @rossberg has also argued (offline) that having them both in the |
This patch adds the implementation of the WebAssembly reference interpreter extended with support for the WasmFX instruction set. It also adds the WasmFX testsuite.
Please merge this after #46.