Closed Bug 1010775 Opened 5 years ago Closed 5 years ago

Pass some small classes by value instead of const reference

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(8 files)

Classes like Register, Imm32 etc are sometimes passed by value and sometimes by const reference. It's very inconsistent, the code looks less cluttered if we pass by value and it's potentially more efficient.
I verified these patches compile on x86 and ARM (simulator build).

It's just a search-and-replace + some minor style tweaks after that.
Attachment #8423076 - Flags: review?(sunfish)
Attached patch Part 2 - Imm32Splinter Review
Attachment #8423078 - Flags: review?(sunfish)
Attached patch Part 3 - ImmWordSplinter Review
Attachment #8423079 - Flags: review?(sunfish)
Attached patch Part 4 - ImmPtrSplinter Review
Attachment #8423080 - Flags: review?(sunfish)
Bug 991153 will change the FloatRegister implementation on ARM, but it will still fit in one word.
Attachment #8423095 - Flags: review?(sunfish)
Comment on attachment 8423076 [details] [diff] [review]
Part 1 - Register

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

Splendid.
Attachment #8423076 - Flags: review?(sunfish) → review+
Attachment #8423078 - Flags: review?(sunfish) → review+
Attachment #8423079 - Flags: review?(sunfish) → review+
Attachment #8423080 - Flags: review?(sunfish) → review+
Attachment #8423081 - Flags: review?(sunfish) → review+
Attachment #8423088 - Flags: review?(sunfish) → review+
Attachment #8423091 - Flags: review?(sunfish) → review+
Attachment #8423095 - Flags: review?(sunfish) → review+
You need to log in before you can comment on or make changes to this bug.