Open Bug 818912 Opened 12 years ago Updated 2 years ago

Consider an IC for constant DOM properties

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

Bug 747289 added infrastructure that knows when a DOM getter is constant.  That lets us get CSE and LICM for them, but unfortunately these can be very fiddly depending on what else is around the code.  LICM, especially, falls down if there's anything at all weird or unknown about the loop.

It might be a good idea to do something IC-like where we do the property get and cache the "this" value and the return value somewhere.  Then the next time we get to the get instruction, we check the "this" value, and if it's the same return our cached object.

See bug 747289 comment 27 for a more expanded explanation, maybe.
Blocks: 802157
For what it's worth, the main use case I wanted this for (.data on ImageData) is using the StoreInSlot mechanism now, which gives us the performance I wanted.

I'm tempted to mark this bug fixed or wontfix or worksforme or something as a result.
Assignee: general → nobody
Blocks: dom-requests
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.