Closed Bug 599245 Opened 14 years ago Closed 14 years ago

nanojit: clean up formatting in Nativei386.cpp

Categories

(Core Graveyard :: Nanojit, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin)

Attachments

(1 file)

I was trying to improve the codegen in Nativei386.cpp.  But my eyes started
bleeding when I read the code generating functions because their
formatting was so ugly.  The dripping blood made the keyboard slippery and
prevented me from making progress.

Therefore, I wrote this patch instead.  It:

- Adds lots of whitespace, esp. around binary operators and after commas.
  Also removes some inside parentheses.

- Removes lots of unnecessary parenthesization, much of which dates to when
  these functions were macros.

- Uses C++-style numeric casts (eg. "uint8_t(x)") more consistently.

- Renames the _is_XYZ_regs_ macros and changes them to functions.
  
- Removes a couple of dead functions.
Attachment #478190 - Flags: review?(stejohns)
Blocks: 599251
Comment on attachment 478190 [details] [diff] [review]
patch (against TM 54303:52c66b17843e)

Bleeding eyes are no fun.

(R+, basically a rubber stamp -- formatting changes look fine, didn't scour every line for possible inadvertent mistakes though)
Attachment #478190 - Flags: review?(stejohns) → review+
http://hg.mozilla.org/tracemonkey/rev/53354d177d97
Whiteboard: fixed-in-nanojit → fixed-in-nanojit, fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/53354d177d97
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
TR: http://hg.mozilla.org/tamarin-redux/rev/8dce087e03f1
Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey → fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: