Bug 71134 - De-virtualize JSObject::defineGetter
Summary: De-virtualize JSObject::defineGetter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks: 70960
  Show dependency treegraph
 
Reported: 2011-10-28 12:36 PDT by Mark Hahnenberg
Modified: 2011-10-31 17:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch (28.26 KB, patch)
2011-10-28 13:34 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2011-10-28 12:36:37 PDT
We're de-virtualizing JSObject. defineGetter is a virtual method in JSObject.  Thus, we need to de-virtualize defineGetter.  We'll put it in the MethodTable.
Comment 1 Mark Hahnenberg 2011-10-28 13:34:49 PDT
Created attachment 112902 [details]
Patch
Comment 2 Darin Adler 2011-10-28 17:24:44 PDT
Comment on attachment 112902 [details]
Patch

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

> Source/WebKit/qt/Api/qwebframe.cpp:517
> -    window->defineGetter(exec, propertyName.get()->identifier(&exec->globalData()), ::toJS(function),
> +    window->methodTable()->defineGetter(window, exec, propertyName.get()->identifier(&exec->globalData()), ::toJS(function),
>                           JSC::ReadOnly | JSC::DontEnum | JSC::DontDelete);

Not to everyone on the project: Here is an example of why we don’t line up subsequent lines of multiline statements.
Comment 3 WebKit Review Bot 2011-10-31 15:24:37 PDT
Comment on attachment 112902 [details]
Patch

Clearing flags on attachment: 112902

Committed r98889: <http://trac.webkit.org/changeset/98889>
Comment 4 WebKit Review Bot 2011-10-31 15:24:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Csaba Osztrogonác 2011-10-31 16:05:28 PDT
It broke the interpreter build. Build log from Qt SH4 buildbot:

../../../Source/JavaScriptCore/interpreter/Interpreter.cpp:4992:115: error: too few arguments to function

Could you fix the build please?
Comment 6 Csaba Osztrogonác 2011-10-31 17:31:07 PDT
(In reply to comment #5)
> It broke the interpreter build. Build log from Qt SH4 buildbot:
> 
> ../../../Source/JavaScriptCore/interpreter/Interpreter.cpp:4992:115: error: too few arguments to function
> 
> Could you fix the build please?

Buildfix landed in http://trac.webkit.org/changeset/98916