Bug 15681 - Add a new JSGlobalObject class and make Interpreter (and Context) use it
Summary: Add a new JSGlobalObject class and make Interpreter (and Context) use it
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 20:29 PDT by Eric Seidel (no email)
Modified: 2007-10-24 23:49 PDT (History)
0 users

See Also:


Attachments
a first stab (using templates, ick) (63.86 KB, patch)
2007-10-24 21:45 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
full patch (minus changelog), 0.5% on SunSpider (89.97 KB, patch)
2007-10-24 22:33 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
full patch, 0.5% speedup on SunSpider (93.96 KB, patch)
2007-10-24 22:45 PDT, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-10-24 20:29:59 PDT
Add a new JSGlobalObject class and make Interpreter (and Context) use it

So I have a partial patch.  Not quite done because I ran into trouble with:
JSGlobalContextRef JSGlobalContextCreate(JSClassRef globalObjectClass)

which expects to be able to make a JSCallbackObject and pass that off as the global object.  I might have to make JSGlobalObject an interface instead of a class.  (That would also make things nicer for Window, which wants to inherit from DOMObject.)
Comment 1 Eric Seidel (no email) 2007-10-24 21:45:06 PDT
Created attachment 16851 [details]
a first stab (using templates, ick)
Comment 2 Eric Seidel (no email) 2007-10-24 22:33:08 PDT
Created attachment 16852 [details]
full patch (minus changelog), 0.5% on SunSpider
Comment 3 Eric Seidel (no email) 2007-10-24 22:45:25 PDT
Created attachment 16853 [details]
full patch, 0.5% speedup on SunSpider
Comment 4 Eric Seidel (no email) 2007-10-24 23:05:47 PDT
Actually, turns out this is 0.8% faster.
Comment 5 Maciej Stachowiak 2007-10-24 23:19:41 PDT
Comment on attachment 16853 [details]
full patch, 0.5% speedup on SunSpider

r=me
Comment 6 Maciej Stachowiak 2007-10-24 23:20:05 PDT
(assuming tests pass)
Comment 7 Eric Seidel (no email) 2007-10-24 23:49:17 PDT
Landed as r27022.