Closed Bug 1081593 Opened 11 years ago Closed 11 years ago

Remove unnecessary ternary operations

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 36

People

(Reporter: ckitching, Assigned: ckitching)

Details

Attachments

(1 file, 1 obsolete file)

Sometimes, we have ternary expressions where one of the output branches is a constant. In a number of cases, it seems to aid readability if we rephrase using && or ||. ... See patch. (This also produces a very, *very* binary size (and pre-JIT performance) improvement)
Attached patch Clean up some ternary operators (obsolete) — Splinter Review
Attachment #8503701 - Flags: review?(rnewman)
Attachment #8503702 - Flags: review?(rnewman)
(In reply to Chris Kitching [:ckitching] from comment #0) > (This also produces a very, *very* binary size (and pre-JIT performance) > improvement) Should read "(This also produces a very, *very* tiny binary size (and pre-JIT performance) improvement)" .. A rather important word in context.
Attachment #8503701 - Attachment is obsolete: true
Attachment #8503701 - Flags: review?(rnewman)
Comment on attachment 8503702 [details] [diff] [review] Clean up some ternary operators Review of attachment 8503702 [details] [diff] [review]: ----------------------------------------------------------------- Upstream plz.
Attachment #8503702 - Flags: review?(rnewman) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: