Bug 21214 - speed up function calls by eliminating the need for a new ExecState each time
: speed up function calls by eliminating the need for a new ExecState each time
Status: RESOLVED DUPLICATE of bug 21295
: WebKit
JavaScriptCore
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-09-29 09:05 PST by
Modified: 2008-10-02 16:38 PST (History)


Attachments
work in progress (49.06 KB, patch)
2008-09-29 09:40 PST, Darin Adler
no flags Review Patch | Details | Formatted Diff | Diff
work in progress (64.87 KB, patch)
2008-09-29 09:41 PST, Darin Adler
no flags Review Patch | Details | Formatted Diff | Diff
patch that removes some unused ExecState cruft (9.98 KB, patch)
2008-09-29 17:38 PST, Darin Adler
no flags Review Patch | Details | Formatted Diff | Diff
patch that removes m_prev from ExecState (6.73 KB, patch)
2008-09-30 16:24 PST, Darin Adler
no flags Review Patch | Details | Formatted Diff | Diff
patch to remove some uses of dynamicGlobalObject (11.22 KB, patch)
2008-10-01 14:04 PST, Darin Adler
no flags Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-09-29 09:05:18 PST
Looks like I'm going to get rid of ExecState altogether and make the pointer we pass everywhere be a JSGlobalData pointer.
------- Comment #1 From 2008-09-29 09:40:33 PST -------
Created an attachment (id=23910) [details]
work in progress
------- Comment #2 From 2008-09-29 09:41:17 PST -------
Created an attachment (id=23911) [details]
work in progress
------- Comment #3 From 2008-09-29 17:38:24 PST -------
Created an attachment (id=23924) [details]
patch that removes some unused ExecState cruft
------- Comment #4 From 2008-09-29 18:14:56 PST -------
(From update of attachment 23924 [details])
Clearing review flag since this was landed.

http://trac.webkit.org/changeset/37088
------- Comment #5 From 2008-09-29 18:16:31 PST -------
Interesting.  If ExecState dies, the "ExceptionHolder" abstraction we built to replace ExecState* for NodeFitler, NodeIterator, TreeWalker, etc.  will have to be re-thought.
------- Comment #6 From 2008-09-30 16:24:15 PST -------
Created an attachment (id=23961) [details]
patch that removes m_prev from ExecState
------- Comment #7 From 2008-09-30 16:30:48 PST -------
(From update of attachment 23961 [details])
r=me

Please check SunSpider before landing.
------- Comment #8 From 2008-09-30 16:47:17 PST -------
(From update of attachment 23961 [details])
Clearing review flag since this is landed.

http://trac.webkit.org/changeset/37125
------- Comment #9 From 2008-10-01 14:04:01 PST -------
Created an attachment (id=23994) [details]
patch to remove some uses of dynamicGlobalObject
------- Comment #10 From 2008-10-01 15:12:39 PST -------
(From update of attachment 23994 [details])
None of these dynamic -> lexical change behavior?  It's not possible to override the object prototype I assume? (thus it's functionally equivalent to ask on either global object?)  The shell ones I would believe, since no one really cares about the shell, the Object.prototype I have less context for to make an informed decision.

Otherwise looks fine.
------- Comment #11 From 2008-10-01 18:29:14 PST -------
(In reply to comment #10)
> None of these dynamic -> lexical change behavior?  It's not possible to
> override the object prototype I assume? (thus it's functionally equivalent to
> ask on either global object?)  The shell ones I would believe, since no one
> really cares about the shell, the Object.prototype I have less context for to
> make an informed decision.

As Geoff explained to me, the general principle here is that the dynamic global object (bad name we should improve) is never the correct one for security purposes because it corresponds to the page where the current code started from, not the page that corresponds to the code being run.

There is a change in behavior, but not for the web browser. Only in obscure cases of use of the JavaScriptCore API. I'll think about whether I can make a test case to demonstrate the improvement.
------- Comment #12 From 2008-10-01 18:30:56 PST -------
(From update of attachment 23994 [details])
Clearing review flag since this was landed.

http://trac.webkit.org/changeset/37175
------- Comment #13 From 2008-10-02 16:38:51 PST -------

*** This bug has been marked as a duplicate of 21295 ***