-
Notifications
You must be signed in to change notification settings - Fork 460
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
Text format revisions #884
Comments
I propose replacing slashes with underscores. For example, Related discussion for nontrapping float to int conversions here: WebAssembly/nontrapping-float-to-int-conversions#4. |
I'm fine with underscore for conversions. If we do that, I would propose switching around the
This makes it easier to consistently recognise e.g. all The other changes I would propose, for consistency with memory and upcoming table instructions (see bulk operations proposal):
(For the record, one could also consider |
OK, so then the full list would be like this, right?
Note: Edited to reflect @rossberg's comment below. |
It would be more consistent to have the In fact, I suggest establishing the following consistent naming scheme for numeric instruction mnemonics:
where Conversions are then instantiations of this scheme with
where |
OK, I've updated the comment above to match this. |
Since we're just chatting anyway: It irks me that |
Oh, and atomics:
|
@lars-t-hansen, I suppose you cannot interpret the type before the dot strictly as the result type of an operator. It's the type that the operator "is defined at" in some looser sense. |
I'm not sure why I wouldn't want to interpret the type strictly as the result type of the operator, though, since that pattern is used very broadly, just not in some cases where it's suddenly about the arguments and the result type is implied (in all cases I can think of the implied result type is i32). Of course there's a succinctness to the instructions that fall under that exception that would be lost if we applied the general pattern, but I don't know why that is an argument either. (I'm not just trolling, I actually think the current syntax for comparisons is confusing and counterintuitive. Even lt_f64 -- without any type-designating prefix -- would have been better than the current f64.lt.) |
I dunno, |
I think of the type before the dot as signifying what type the generic instruction is specialized on. Since all |
FWIW some possible breakage I think that may want to be considered when doing I believe is:
To be clear I'm not opposed to changing the instructions to be more consistent, but I wanted to be sure to point out some perhaps more subtle locations that "breakage" can arise in the non-traditional sense. They're all pretty minor and we're certainly more than willing to do the updates on the Rust side of things, but points that may want to be considered! Also @binji your comment with an exhaustive list of renames is super helpful! |
Right, we've already experienced some of the same issues when changing @lars-t-hansen is right about atomics too, these are odd now:
|
@binji, good point. I propose moving the _u/_s to the end for those as well (which arguably fits existing instructions). |
OK, updated my comment above to include these as well. |
Oh, that reminds me of one more thing that I'd like to suggest. In the light of the reference type and GC proposals it would be more consistent if we renamed |
OK, added that to the list. I think as a good first step, we should file bugs in the various trackers where the name change is relevant and link to this issue. |
Apologies for the bike-shedding, but I don't see a whole lot of consistency in the use of So far the most frequent use of I'd suggest that either In fact, while I am ranting, why does |
@binji it looks like we have generally settled on the list above. Is there any action we need to take to officially finalize it? |
I don't think so, we agreed to the change in the CG meeting, and the change to the spec has landed. I think at this point we should update the tools to use the new names. |
Automated renaming according to WebAssembly/spec#884 (comment).
Automated renaming according to WebAssembly/spec#884 (comment).
Automated renaming according to WebAssembly/spec#884 (comment).
Summary: An automated renaming of all the instructions listed at WebAssembly/spec#884 (comment) as well as some similarly-named identifiers. Reviewers: aheejin, dschuff, aardappel Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D56338 llvm-svn: 350609
This renames instructions according to WebAssembly/spec#884 (comment).
This renames instructions according to WebAssembly/spec#884 (comment).
Renames instructions as discussed in WebAssembly/spec#884 (comment).
Renames instructions as discussed in WebAssembly/spec#884 (comment). Closes WebAssembly#4 and fixes WebAssembly#6.
Renames instructions as discussed in WebAssembly/spec#884 (comment). Closes #4 and fixes #6.
These instructions were renamed in the October 2, WebAssembly CG meeting. The issue describing the change is here: WebAssembly/spec#884 Change-Id: Ia9e8733156b5ed5db7fc9ab1681c1a51b874dd71 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1620681 Reviewed-by: Clemens Hammacher <[email protected]> Commit-Queue: Ben Smith <[email protected]> Cr-Commit-Position: refs/heads/master@{#61711}
Renames instructions as discussed in WebAssembly/spec#884 (comment). Closes #4 and fixes #6.
This renaming was decided on in WebAssembly/spec#884.
* Update conversion op names This renaming was decided on in WebAssembly/spec#884.
Addresses [this comment](WebAssembly/spec#884 (comment)).
* Update conversion op names This renaming was decided on in WebAssembly/spec#884.
* Define non-trapping float-to-int conversions. This also introduces the concept of prefix bytes, and defines the "numeric" prefix byte, used for encodin the new conversion instructions. * Add feature markers. * Add the feature marker in more places. * Rename "numeric" to "misc". See WebAssembly/nontrapping-float-to-int-conversions#5. * Rename opcodes. See WebAssembly/spec#884 (comment).
At the Oct. 2 CG meeting, there was unanimous consent to consider making changes to the text format to improve the consistency of instruction names and remove special characters. Specifically, interest has been expressed in removing slashes from all type conversion (wrap, trunc, extend, convert, demote, promote, and reinterpret) instructions and unifying the formats of memory and global instructions.
To minimize ecosystem disruption, we will plan to make all changes we agree on at once and update as many tools as possible at roughly the same time. We would like to resolve this issue quickly to avoid holding up the standardization process.
What final changes do we want to make?
The text was updated successfully, but these errors were encountered: