Closed Bug 1444202 Opened 2 years ago Closed 2 years ago

masm.extractObject and friends should be MOZ_MUST_USE

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

Details

Attachments

(1 file)

extractObject is an alternative to unboxObject that optimizes for 32-bit platforms when unboxing involves taking one of the register pairs. To do this it returns a register (which may be the scratch passed in .. or not). These family of functions should be MOZ_MUST_USE.

The current abusers work because they are either 64-bit only, or take an Address as an argument. We should just convert them all to masm.unboxObject and take away these traps.
This adds MOZ_MUST_USE to the various extract* functions. Violations are also fixed by converting to unbox* when it would be the same (such as for Address arguments). For the ARM back-end, I use the return value correctly since unbox* variants are not always available.
Attachment #8985691 - Flags: review?(jdemooij)
Comment on attachment 8985691 [details] [diff] [review]
0001-Bug-1444202-Add-MOZ_MUST_USE-to-masm.extractObject-a.patch

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

Thanks! We want to remove extractObject at some point so I'm glad we're removing some uses here.
Attachment #8985691 - Flags: review?(jdemooij) → review+
Keywords: checkin-needed
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8b97ba3dd284
Add MOZ_MUST_USE to masm.extractObject and friends. r=jandem
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/8b97ba3dd284
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.