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

Introduce explicit type for full AST #174

Merged
merged 4 commits into from
Nov 17, 2015
Merged

Introduce explicit type for full AST #174

merged 4 commits into from
Nov 17, 2015

Conversation

rossberg
Copy link
Member

Step 1 towards explicitly representing full operator syntax as given in AstSemantics.

This mainly renames some modules and introduces a new type for the full AST, currently copying the structure of the kernel one. It does not yet flatten it into individual opcodes -- I split that into a follow-up patch, since it involves massive changes to lexer and parser.

| Binary of Kernel.binop * expr * expr
| Select of Kernel.selop * expr * expr * expr
| Compare of Kernel.relop * expr * expr
| Convert of Kernel.cvt * expr
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to move memop, literal, unop, binop, etc. out of Kernel and into Ast, and have Kernel import then from Ast instead? Since the Ast module is the thing that has the 1-1 correspondence with the design repo, it would be nice to have all the fields described in the design repo here, in one place.

Copy link
Member Author

Choose a reason for hiding this comment

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

This dependency will disappear with the flattened AST in the follow-up patch anyway, so is it worth worrying about?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, this sounds fine then.

@sunfishcode
Copy link
Member

lgtm, as a first step with others to follow.

rossberg added a commit that referenced this pull request Nov 17, 2015
Introduce explicit type for full AST
@rossberg rossberg merged commit e3a857f into master Nov 17, 2015
@sunfishcode sunfishcode deleted the kernel branch February 28, 2016 01:01
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Oct 3, 2023
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.

2 participants