Bug 130857 - Avoid fetching JSObject::structure() repeatedly in putDirectInternal.
Summary: Avoid fetching JSObject::structure() repeatedly in putDirectInternal.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on: 130887
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 13:45 PDT by Andreas Kling
Modified: 2014-03-27 22:34 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.83 KB, patch)
2014-03-27 13:45 PDT, Andreas Kling
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2014-03-27 13:45:16 PDT
Avoid fetching JSObject::structure() repeatedly in putDirectInternal.
Comment 1 Andreas Kling 2014-03-27 13:45:51 PDT
Created attachment 227974 [details]
Patch
Comment 2 Mark Hahnenberg 2014-03-27 15:20:33 PDT
Comment on attachment 227974 [details]
Patch

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

r=me

> Source/JavaScriptCore/runtime/JSObject.h:1346
> +    if (Structure* newStructure = Structure::addPropertyTransitionToExistingStructure(this->structure(), propertyName, attributes, specificFunction, offset)) {

s/this->structure()/structure/ right?
Comment 3 Andreas Kling 2014-03-27 15:39:49 PDT
Committed r166376: <http://trac.webkit.org/changeset/166376>
Comment 4 Filip Pizlo 2014-03-27 16:51:37 PDT
Comment on attachment 227974 [details]
Patch

This really should have asserted, in all of the places that you removed a load of the structure, that the structure didn't change.  That's very important since there are subtle ways in which things could *become* effectful and obviously this code could break if that happened.
Comment 5 Andreas Kling 2014-03-27 16:54:20 PDT
(In reply to comment #4)
> (From update of attachment 227974 [details])
> This really should have asserted, in all of the places that you removed a load of the structure, that the structure didn't change.  That's very important since there are subtle ways in which things could *become* effectful and obviously this code could break if that happened.

Sure, I'll slap that in there.
Comment 6 WebKit Commit Bot 2014-03-27 22:21:48 PDT
Re-opened since this is blocked by bug 130887
Comment 7 Andreas Kling 2014-03-27 22:33:39 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 227974 [details] [details])
> > This really should have asserted, in all of the places that you removed a load of the structure, that the structure didn't change.  That's very important since there are subtle ways in which things could *become* effectful and obviously this code could break if that happened.
> 
> Sure, I'll slap that in there.

Ended up rolling this out instead. I had misread the profile that lead to making this change.