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

Update the text syntax for tuple types #6246

Merged
merged 4 commits into from
Jan 26, 2024
Merged

Update the text syntax for tuple types #6246

merged 4 commits into from
Jan 26, 2024

Conversation

tlively
Copy link
Member

@tlively tlively commented Jan 25, 2024

Instead of e.g. (i32 i32), use (tuple i32 i32). Having a keyword to
introduce the s-expression is more consistent with the rest of the language.

@tlively tlively requested a review from kripken January 25, 2024 21:15
@tlively
Copy link
Member Author

tlively commented Jan 25, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % question

@@ -32,7 +32,7 @@
;; CHECK: (global $field2@Foo (mut anyref) (ref.null none))

;; CHECK: (global $referredField@Foo i32 (i32.const 42))
(global $referredField@Foo (i32) (i32.const 42))
(global $referredField@Foo i32 (i32.const 42))
Copy link
Member

Choose a reason for hiding this comment

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

Was this needed because before it was a tuple of size 1? But I thought we errored on that...

Copy link
Member Author

Choose a reason for hiding this comment

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

Syntactically it was a tuple of size one, which should not have been valid, but when we actually try to construct a tuple of size one the type we get back is just the element type, so this ended up Just Working before.

Copy link
Member

Choose a reason for hiding this comment

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

I see, thanks...

Instead of e.g. `(i32 i32)`, use `(tuple i32 i32)`. Having a keyword to
introduce the s-expression is more consistent with the rest of the language.
@tlively tlively merged commit 5d297dc into main Jan 26, 2024
28 checks passed
@tlively tlively deleted the tuple-syntax branch January 26, 2024 18:33
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
Instead of e.g. `(i32 i32)`, use `(tuple i32 i32)`. Having a keyword to
introduce the s-expression is more consistent with the rest of the language.
@gkdn gkdn mentioned this pull request Aug 31, 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.

2 participants