-
Notifications
You must be signed in to change notification settings - Fork 104
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
Show deprecation on arithmetic word operations #2339
Conversation
this extracts, off #2309, the refactoring of `value`, without any user-visible changes. This should make reviewing #2309 easier, and also pave the way to deprecating the word type. Because this is based off #2309, it includes some changes to the prims. In particular, the `num_conv_t1_t2` family is now for trapping conversions, and `num_warp_t1_2` is for wrapping (currently: to Word, and between fixed types).
Builds on top of #2324, and is extracted from #2324. Because this should be backwards-compatible, there is still the +>> operator. Once `WordN` is removed, we only want and need the `>>` operator (taking the signedness from the type). Until then, ` * `>>` is unsigned on Nat and Word, and signed on Int. * `+>>` is always signed
Co-authored-by: Andreas Rossberg <[email protected]>
as it is slated for removal with WordN
Co-authored-by: Claudio Russo <[email protected]>
and some knock-on effects for `charToWord32`
Co-authored-by: Claudio Russo <[email protected]>
Co-authored-by: Claudio Russo <[email protected]>
This PR does not affect the produced WebAssembly code. |
| Prim (Word8|Word16|Word32|Word64), AddOp -> word_op_warn "+" | ||
| Prim (Word8|Word16|Word32|Word64), SubOp -> word_op_warn "-" | ||
| Prim (Word8|Word16|Word32|Word64), MulOp -> word_op_warn "*" | ||
| Prim (Word8|Word16|Word32|Word64), PowOp -> word_op_warn "**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do this and remove the open Type
| Prim (Word8|Word16|Word32|Word64), AddOp -> word_op_warn "+" | |
| Prim (Word8|Word16|Word32|Word64), SubOp -> word_op_warn "-" | |
| Prim (Word8|Word16|Word32|Word64), MulOp -> word_op_warn "*" | |
| Prim (Word8|Word16|Word32|Word64), PowOp -> word_op_warn "**" | |
| Prim T.(Word8|Word16|Word32|Word64), AddOp -> word_op_warn "+" | |
| Prim T.(Word8|Word16|Word32|Word64), SubOp -> word_op_warn "-" | |
| Prim T.(Word8|Word16|Word32|Word64), MulOp -> word_op_warn "*" | |
| Prim T.(Word8|Word16|Word32|Word64), PowOp -> word_op_warn "**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, that would exclue Prim
. And then you need extra parenthesis, which I like less than you do ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or put T.
before those as well -- still a net win. :)
Did you see the user’s guide changes or did we race there? |
Co-authored-by: Andreas Rossberg <[email protected]>
Ah, no, we raced indeed. LGTM as well. |
Co-authored-by: Claudio Russo <[email protected]>
Co-authored-by: Claudio Russo <[email protected]>
Co-authored-by: Claudio Russo <[email protected]>
next step in the plan of
#1824 (comment)
should be merged after #2326
Add a migration guide to the users guide.