Closed Bug 1275965 Opened 3 years ago Closed 3 years ago

wasm: use fewer dollarsigns in generated identifiers

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: sunfish, Assigned: sunfish)

References

Details

Attachments

(1 file)

Currently, WasmTextToAST generates names for unnamed entities by using the pattern '$prefix$index'. Since wasm allows arbitrary byte sequences for identifiers, we'll eventually need to find a new way to generate names that we can guarantee won't collide with user names. One possibility is to use a different sigil, such as '%'.

For now, the priority is demonstrating the overall idea of the syntax, and it seems best to use something streamlined so that it doesn't distract.

The attached patch removes the second dollarsign for now, which makes the generated names a little less visually noisy. It also refactors the way the names are generated a little, to make it easier to experiment with other schemes.
Attachment #8756916 - Flags: review?(ydelendik)
Comment on attachment 8756916 [details] [diff] [review]
wasm-fewer-dollarsigns.patch

Review of attachment 8756916 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Thank you.
Attachment #8756916 - Flags: review?(ydelendik) → review+
https://hg.mozilla.org/mozilla-central/rev/37b6187d1bc3
https://hg.mozilla.org/mozilla-central/rev/8caa42aa9bf4
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.