lirasm - Style cleanup and new tokenizer

RESOLVED FIXED

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: jorendorff, Assigned: jorendorff)

Tracking

Other Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
First, the classes in lirasm didn't end up quite the way I wanted, so this patch cleans that up a bit and corrects a few other random deviations from js/src style.

Second, a new tokenizer is added. Punctuation characters are now recognized as separate tokens even if they appear adjacent to other nonspace characters. So for example `runs=int 10` now parses as 4 tokens rather than 2. Comments, introduced with ; and continuing to the end of the line, are ignored.  (If another comment character would be more assembly-like, I'll be happy to change it.)
(Assignee)

Comment 1

9 years ago
Created attachment 389490 [details] [diff] [review]
v1
Assignee: general → jorendorff
Attachment #389490 - Flags: review?(graydon)
Comment on attachment 389490 [details] [diff] [review]
v1

Tokenizer looks ok, rest of the churn looks harmless. I don't see any stylistic uglies and I'm only mildly keeping track of the functionality of this thing since it's changing so fast, so not generally worried. Go for it.

I wonder if you could chose a more revealing parameter name than 'implied' however. It doesn't really make its meaning clear.
Attachment #389490 - Flags: review?(graydon) → review+
(Assignee)

Comment 3

9 years ago
http://hg.mozilla.org/tracemonkey/rev/5e154cf125a7

and followup for the 'implied' parameter:
http://hg.mozilla.org/tracemonkey/rev/a1653d20bc3f
Whiteboard: fixed-in-tracemonkey

Comment 4

9 years ago
http://hg.mozilla.org/mozilla-central/rev/5e154cf125a7
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.