Closed Bug 1480018 Opened 7 years ago Closed 7 years ago

Use BaseObjectElementIndex/BaseObjectSlotIndex when accessing elements/slots instead of Base(Value)Index

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file, 1 obsolete file)

We have the BaseObjectElementIndex and BaseObjectSlotIndex helpers to explicitly document access to object elements and object slots, but in some cases we're instead directly using BaseIndex/BaseValueIndex.
Attached patch bug1480018.patch (obsolete) — Splinter Review
Replaces BaseIndex/BaseValueIndex with BaseObjectElementIndex/BaseObjectSlotIndex where possible. Drive-by changes: - Change some BaseIndex constructor callers to directly call the constructor instead of using |BaseIndex index = BaseIndex(...)|. - Delete the unused Address and BaseIndex default constructors.
Attachment #8996626 - Flags: review?(mgaudet)
Comment on attachment 8996626 [details] [diff] [review] bug1480018.patch Review of attachment 8996626 [details] [diff] [review]: ----------------------------------------------------------------- Looks like a good set of cleanup :) ::: js/src/jit/BaselineCompiler.cpp @@ -2727,5 @@ > { > EnvironmentCoordinate ec(pc); > Shape* shape = EnvironmentCoordinateToEnvironmentShape(script, pc); > > - Address addr; /me is gently surprised there isn't a compiler error about this.
Attachment #8996626 - Flags: review?(mgaudet) → review+
Attached patch bug1480018.patchSplinter Review
Updated to apply cleanly on inbound, carrying r+.
Attachment #8996626 - Attachment is obsolete: true
Attachment #8997136 - Flags: review+
Pushed by cbrindusan@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ef2291b03c19 Change some Base(Value)Index users to BaseObject(Element|Slot)Index. r=mgaudet
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: