Closed
Bug 503461
Opened 15 years ago
Closed 15 years ago
TM: inline FinalizeObject into jsgc and make sure Scope hold() and drop() are inline too
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
8.27 KB,
patch
|
dmandelin
:
review+
igor
:
review+
|
Details | Diff | Splinter Review |
Quite noticable speedup for the gc path.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: general → gal
Attachment #387816 -
Flags: review?(brendan)
Assignee | ||
Updated•15 years ago
|
Attachment #387816 -
Flags: review?(igor)
Assignee | ||
Updated•15 years ago
|
Attachment #387816 -
Flags: review?(brendan) → review?(dmandelin)
Updated•15 years ago
|
Attachment #387816 -
Flags: review?(dmandelin) → review+
Comment 2•15 years ago
|
||
Comment on attachment 387816 [details] [diff] [review] patch I'm not super familiar with these finalizers but from what I see you simply moved some functions from one file to another so they can be inlined at the point where they are called the most, so it looks good to me.
Assignee | ||
Comment 3•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/81af09df8033
Whiteboard: fixed-in-tracemonkey
Comment 4•15 years ago
|
||
Comment on attachment 387816 [details] [diff] [review] patch >+static void >+FinalizeObject(JSContext *cx, JSObject *obj) >+{ >+ /* Cope with stillborn objects that have no map. */ >+ if (!obj->map) >+ return; >+ >+ if (JS_UNLIKELY(cx->debugHooks->objectHook != NULL)) { >+ cx->debugHooks->objectHook(cx, obj, JS_FALSE, >+ cx->debugHooks->objectHookData); >+ } >+ >+ /* Finalize obj first, in case it needs map and slots. */ >+ STOBJ_GET_CLASS(obj)->finalize(cx, obj); For the default JS objects and arrays we are calling here the empty JS_FinalizeStub method. My guess is that avoiding calling this method via simple check can make the finalization faster. But this can go to a separated bug.
Attachment #387816 -
Flags: review?(igor) → review+
Comment 5•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/81af09df8033
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•