Closed Bug 901100 Opened 7 years ago Closed 7 years ago

Generate set ICs for non-shadowing DOM proxies

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: bzbarsky, Assigned: efaust)

References

Details

Attachments

(1 file)

This comes up for "style.whatever = something" calls.  We should just call the setter from the proto chain, instead of going through the proxy code, since the prop is on the proto chain and the proxy is non-shadowing.

There's a bit of microbenchmark in attachment 383408 [details].
Assignee: general → efaustbmo
Status: NEW → ASSIGNED
Depends on: 904827
As discussed with bz, this entails calling a setter if found on the prototype chain, else falling back to Proxy::set after the appropriate guards.

This includes a factor out of the setter code as well.
Attachment #795846 - Flags: review?(kvijayan)
Comment on attachment 795846 [details] [diff] [review]
Implement SetPropertyIC stubs for unshadowed DOM proxies

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

::: js/src/jit/IonCaches.cpp
@@ +2441,5 @@
> +            break;
> +        }
> +
> +        isSetter = true;
> +    } while(0);

The logic in this do-while loop is more appropriate in a separate checker procedure (e.g. IsCacheableSetDOMProxyUnshadowed).  When we call
|attachDOMProxyUnshadowed|, we should already know that it's an appropriate stub to be attached.
Attachment #795846 - Flags: review?(kvijayan) → review+
https://hg.mozilla.org/mozilla-central/rev/3cd1d0ccb812
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.