-
Notifications
You must be signed in to change notification settings - Fork 695
Bikeshedding: consistent naming conventions regarding signedness #317
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
Comments
On Fri, Aug 28, 2015 at 5:00 PM, rossberg-chromium <[email protected]
|
@titzer That interpretation could also apply to sign extension: you load a @rossberg-chromium I was looking at this earlier today (about to write the patch but wanting to wait to not conflict with your general renaming/refactoring) and I additionally had wanted to make these changes to bring
|
On Fri, Aug 28, 2015 at 6:18 PM, Luke Wagner [email protected]
|
sgtm |
On 28 August 2015 at 18:18, Luke Wagner [email protected] wrote:
I actually was about to suggest the opposite :) : rename LocalType to
Already done in the latest version of the PR.
Sounds reasonable. But probably want to do that in a separate patch.
Sounds good, too. The current PR already implements these checks in the |
On 29 August 2015 at 03:30, Andreas Rossberg [email protected] wrote:
I had another iteration on these ideas. Observation: if you add a regular .load8_s|u |
Re: signedness, we do make a semantic distinction between signed/unsigned and sign-agnostic. The extending loads could plausibly go either way, but I agree that signed/unsigned is a little nicer. +1 for _s/_u there. |
On Sat, Aug 29, 2015 at 5:26 PM, rossberg-chromium <[email protected]
|
I created PR WebAssembly/spec#39 that implements this. |
The concept.of a memory type anticipates a potential future need for a load that extends from float16, though it's not necessarily essential to have consistency there. |
@dan, not sure I understand. Why would e.g. a `float32.load16` not cover
that case within the above scheme?
|
Ah, so each type implies a kind of widening conversion. That makes sense. |
Main suggestion resolved and implemented, closing. |
While working on making the opcodes in the ml-proto line up with the AST semantics, I noticed that it currently uses several inconsistent conventions for expressing sign awareness:
_signed
and_unsigned
suffixes._sx
and_zx
suffixes.s
andu
prefixes.The ones under (2) and (3) have the exact same semantic meaning as several occurrences in (1), so there is no apparent reason for them to diverge.
Can naming stick to one convention? Say,
_s
and_u
suffixes, for brevity?The text was updated successfully, but these errors were encountered: