Bug 158250

Summary: Dictionary property access should be fast
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, commit-queue, keith_miller, mark.lam, msaboff, oliver, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch keith_miller: review+

Description Geoffrey Garen 2016-05-31 21:47:27 PDT
Dictionary property access should be fast
Comment 1 Geoffrey Garen 2016-05-31 21:53:43 PDT
Created attachment 280212 [details]
Patch
Comment 2 Geoffrey Garen 2016-05-31 22:00:25 PDT
Created attachment 280213 [details]
Patch
Comment 3 Keith Miller 2016-06-01 09:36:24 PDT
Comment on attachment 280213 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280213&action=review

r=me with comments.

> Source/JavaScriptCore/runtime/JSObject.cpp:2004
> -    if (structure()->isDictionary()) {
> +    if (structure()->isUncacheableDictionary()) {

I think it would be useful to have a comment stating that JSObject::putDirectInternal will transition the structure on an attribute change. Also, do we have tests for this?

> Source/JavaScriptCore/runtime/JSObject.h:1228
> -    if (structure.isDictionary()) {
> +    if (structure.isUncacheableDictionary()) {

Ditto.
Comment 4 Geoffrey Garen 2016-06-01 12:28:28 PDT
> > Source/JavaScriptCore/runtime/JSObject.cpp:2004
> > -    if (structure()->isDictionary()) {
> > +    if (structure()->isUncacheableDictionary()) {
> 
> I think it would be useful to have a comment stating that
> JSObject::putDirectInternal will transition the structure on an attribute
> change. 

Okeedokee.

> Also, do we have tests for this?

I checked SVN history and it looks like the change to putDirect corresponded to some web standards test suites.
Comment 5 Geoffrey Garen 2016-06-01 12:31:15 PDT
Committed r201562: <http://trac.webkit.org/changeset/201562>