Closed Bug 1466464 Opened 7 years ago Closed 6 years ago

Rename grow_memory to memory.grow and current_memory to memory.size everywhere

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(2 files)

These renamings supplant the current "grow_memory" and "current_memory" encodings. Also means we need to fix test cases, and there may be other fallout for all I know.
The new names are "memory.grow" and "memory.size". https://github.com/WebAssembly/spec/blob/master/interpreter/text/lexer.mll#L318 It would probably behoove us to recognize the old opcodes for a while.
Summary: Recognize memory.grow and memory.current in text format → Recognize memory.grow and memory.size in text format
Minimal support for new syntax, and a minimal testing.
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Attachment #8988428 - Flags: review?(jseward)
Keywords: leave-open
As I wrote in the patch comment for comment 2, the plan here is: - land minimal support (that patch) and testing now - land a massive renaming in the engine and test cases when the dust has settled for ref types, binary->text removal, and other big things that are in flight, after the summer - remove support for the old syntax, eventually
Comment on attachment 8988428 [details] [diff] [review] bug1466464-memory_grow_and_size.patch Looks OK to me.
Attachment #8988428 - Flags: review?(jseward) → review+
Keywords: checkin-needed
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b6406d11016d Part 1: Recognize memory.grow and memory.size syntax. r=jseward
Keywords: checkin-needed
Assignee: lhansen → nobody
Status: ASSIGNED → NEW
Summary: Recognize memory.grow and memory.size in text format → Rename grow_memory to memory.grow and current_memory to memory.size everywhere
Blocks: 1527871
Assignee: nobody → lhansen
Status: NEW → ASSIGNED

Rename the uses of current_memory and grow_memory in wasm text content
as memory.size and memory.grow, since these are canonical.

Rename GrowMemory as MemoryGrow and CurrentMemory as MemorySize
everywhere in C++ source code, in honor of their new .wat names --
consistency is good. I chose "Memory" over "Mem" because I like the
longer name better, and I think we should rename uses of "Mem" as
"Memory" (but not in this patch).

Also handle some similar cases, like the growMemory_i32 and
currentMemory_i32 Instance methods.

Note a couple of changes in cranelift.

I did not remove support for the old .wat names yet, I figure we can
do that some other year, if ever.

Attachment #9043940 - Attachment description: Bug 1466464 - rename grow_memory and current_memory. r?bbouvier → Bug 1466464 - rename grow_memory and current_memory. r=bbouvier
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/412fb2a5ae54 rename grow_memory and current_memory. r=bbouvier
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67

Might impact documentation.

Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: