Closed Bug 712874 Opened 13 years ago Closed 11 years ago

Need ICs for native setters

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 904827

People

(Reporter: bzbarsky, Unassigned)

References

Details

Testcases like the one in bug 40988 are ending up in js_LookupProperty hell because we're going through the SetName stub on every .style.foo set, as far as I can tell.

Pretty sure this is a regression at least for microbenchmarks in that TM used to do this.  :(
Blocks: 40988
(In reply to Boris Zbarsky (:bz) from comment #0) 
> Pretty sure this is a regression at least for microbenchmarks in that TM
> used to do this.  :(

Yeah, but for the macro-benchmarks we just fell off trace ;-)
Sometimes.  There were plenty of CSS animation situations where things traced OK.

In any case, this is one of the remaining big pain points on the JS side for our DOM bindings.
Can we just do this in IonMonkey?
Timeframe?

In general, it seems like yes, if we have this happen early in IonMonkey development, not a year or two after it first lands...
We can definitely do this in IonMonkey. I'm not sure what kind of timeframe is needed but it could be done at any point. It'd help to know what exactly TM was doing for these setters (was it just calling a native?) and whether they need ICs versus just monomorphic inlining.
TM was just calling a native, iirc, but it was doing prototype-chain teleporting and whatnot so it didn't have to keep redoing lookups.  jorendorff would know better what it did.

As far as what timeframe is "needed"...  The earlier the better, like everything else.  For web page performance, this is probably just as important as ICs on setting plain vanilla JS properties.

This almost certainly needs an IC, because the DOM is not particularly monomorphic; different tag names have different shapes and different proto chains, though they tend to have a shared prototype somewhere up the chain that the setter lives on.
(In reply to On vacation Oct 12 - Oct 27 from comment #4)
> Timeframe?
> 
> In general, it seems like yes, if we have this happen early in IonMonkey
> development, not a year or two after it first lands...

=/
Was this taken care of by bug 904827?
Yes, I believe so.  And before that in the monomorphic-ish case by the fast-path efaust added for DOM stuff...
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.