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

Rename "index type" to "address type" across the spec #90

Merged
merged 5 commits into from
Oct 18, 2024

Conversation

bvisness
Copy link
Collaborator

Resolves #67.

Currently draft because I have not yet updated the spec interpreter, but the entire spec (core and JS) should be correct.

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

LGTM % comment

document/core/valid/types.rst Outdated Show resolved Hide resolved
It is very important that you have precisely the correct number of dots.
It would be too much work for the computer otherwise.
@bvisness bvisness marked this pull request as ready for review October 17, 2024 10:17
@bvisness
Copy link
Collaborator Author

Re-requested review now that the spec interpreter has also been updated.

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

LGTM, with perhaps one request: in the interpreter, shorten the type name to addr_type to more closely match the spec's naming.

@bvisness bvisness merged commit 4056ff9 into WebAssembly:main Oct 18, 2024
9 checks passed
@bvisness bvisness mentioned this pull request Oct 18, 2024
@bvisness bvisness deleted the address-type-2 branch October 21, 2024 09:40
hubot pushed a commit to v8/v8 that referenced this pull request Oct 21, 2024
This was discussed in WebAssembly/memory64#67
and changed in WebAssembly/memory64#90.

This is a pure mechanical renaming of "IndexType" -> "AddressType" and
"index_type" -> "address_type".

[email protected]

Bug: 41480462
Change-Id: Ifb6843ca47d9a48d7aac3d7f64d0f7c7ce4ecec5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5941627
Commit-Queue: Clemens Backes <[email protected]>
Reviewed-by: Eva Herencsárová <[email protected]>
Cr-Commit-Position: refs/heads/main@{#96704}
undefined set(IndexValue index, optional any value);
readonly attribute IndexValue length;
AddressValue grow(AddressValue delta, optional any value);
any get(AddressValue index);
Copy link
Member

Choose a reason for hiding this comment

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

Should the parameter name have been updated to address, for get and set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, right you are. I'll make a follow-up PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well, actually, this is arguably fine since the current spec uses "index" (predating memory64) and it's quite clear in context that this is referring to the index of an element. We can rename if we want, but I'm actually somewhat inclined to keep it as is. I'll open an issue just for any final bikeshedding.

backes added a commit to backes/wasm-spec-memory64 that referenced this pull request Oct 23, 2024
"index" was renamed to "address". Without this change, all JS tests
generated from the core tests will fail.
backes added a commit that referenced this pull request Oct 25, 2024
"index" was renamed to "address". Without this change, all JS tests
generated from the core tests will fail.
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.

Rename Index Type to something else, perhaps Offset Type
3 participants