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

Rename opcodes to match AST semantics #33

Merged
merged 18 commits into from
Sep 3, 2015
Merged

Rename opcodes to match AST semantics #33

merged 18 commits into from
Sep 3, 2015

Conversation

rossberg
Copy link
Member

@lukewagner, @kg, PTAL. Does not reverse S-expr opcode order yet.

@@ -175,7 +174,7 @@ expr:
( break ) ;; = (break 0)
( switch.<type> <expr> <case>* <expr> )
( call <var> <expr>* )
( dispatch <var> <expr> <expr>* )
( callindirect <var> <expr> <expr>* )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call_indirect

@lukewagner
Copy link
Member

Looks like a step in the right direction. I think the semantics of float-to-int conversion still needs more work to match.

@rossberg
Copy link
Member Author

Reversed opcode order and use snake_names everywhere. Also, made memory ops match AST semantics.

I tentatively used "/" to separate opcode index parameters, since using "[]" there does not fit the S-expression format all too well. Let me know what you think.

@rossberg
Copy link
Member Author

rossberg commented Sep 2, 2015

@lukewagner, @kg, do you think this part is good to land? The float truncation semantics should probably be addressed elsewhere (Dan has a WIP patch).

@lukewagner
Copy link
Member

For brackets vs. slash: ideally, the opcode names in the SExpr format would exactly match those in AstSemantics.md. Since we're not actually trying to feed our SExpr language to a real LISP, is it ok if we bend the SExpr rules a bit and allow [/] in the identifier names? Or is there a basic parsing ambiguity?

@titzer
Copy link
Contributor

titzer commented Sep 2, 2015

+1 to exact match

-1 to some of the names currently in AstSemantics
-1 to brackets

And there went my karma for today

On Wed, Sep 2, 2015 at 6:54 PM, Luke Wagner notifications@github.com
wrote:

For brackets vs. slash: ideally, the opcode names in the SExpr format
would exactly match those in AstSemantics.md. Since we're not actually
trying to feed our SExpr language to a real LISP, is it ok if we bend the
SExpr rules a bit and allow [/] in the identifier names? Or is there a
basic parsing ambiguity?


Reply to this email directly or view it on GitHub
#33 (comment).

@rossberg
Copy link
Member Author

rossberg commented Sep 3, 2015

Using [] wouldn't currently cause a problem with the parser, but would still be rather odd. Maybe that's just me, though.

I'll be off the grid soon, so I hope it's okay if I land the current patch as is and leave the final bikeshedding for later. Should be trivial to tweak separately.

I'll also leave further changes to memory access ops to a future patch, since we are still discussing the best approach. Up to signedness, this patch remains close to what's currently in AstSemantics.

rossberg added a commit that referenced this pull request Sep 3, 2015
Rename opcodes to match AST semantics
@rossberg rossberg merged commit d168abf into master Sep 3, 2015
@lukewagner
Copy link
Member

That makes sense; this patch already puts us a lot closer.

@sunfishcode sunfishcode deleted the rename-opcodes branch February 28, 2016 01:01
littledan pushed a commit to littledan/spec that referenced this pull request Mar 4, 2018
eqrion pushed a commit to eqrion/wasm-spec that referenced this pull request Jul 18, 2019
ErikMcClure pushed a commit to innative-sdk/spec that referenced this pull request Jun 15, 2020
[spec] Reinstantiate lost functype in soundness
rossberg added a commit to effect-handlers/wasm-spec that referenced this pull request Feb 15, 2021
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Mar 2, 2023
backes pushed a commit to backes/spec that referenced this pull request Jul 12, 2023
dhil added a commit to dhil/webassembly-spec that referenced this pull request May 8, 2024
rossberg pushed a commit that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants