Closed
Bug 525527
Opened 15 years ago
Closed 15 years ago
TM: avoid uint16 in JSXML (slow and can interfere with conservative stack scanning)
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
870 bytes,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: general → gal
Assignee | ||
Updated•15 years ago
|
Attachment #409383 -
Flags: review?(igor)
Comment 2•15 years ago
|
||
Comment on attachment 409383 [details] [diff] [review] patch >diff --git a/js/src/jsxml.h b/js/src/jsxml.h >--- a/js/src/jsxml.h >+++ b/js/src/jsxml.h >@@ -107,19 +107,18 @@ struct JSXML { > #ifdef DEBUG_notme > JSCList links; > uint32 serial; > #endif > JSObject *object; > void *domnode; /* DOM node if mapped info item */ > JSXML *parent; > JSObject *name; >- uint16 xml_class; /* discriminates u, below */ >- uint16 xml_flags; /* flags, see below */ >- uint32 align; >+ uint32 xml_class; /* discriminates u, below */ >+ uint32 xml_flags; /* flags, see below */ Nit: comment here that all fields must be at least 4 bytes in size and that for code simplicity we tolerate wasteful uint32 usage for xml_flags and xml_class. Also refer to this bug for reasons.
Attachment #409383 -
Flags: review?(igor) → review+
Assignee | ||
Comment 3•15 years ago
|
||
No space is wasted here. I eliminated the alignment field. So this patch is strictly faster without wasting a single bit. I am not convinced the 16-bit fields are actually a problem. This patch is mostly preventive. We don't comment JSObject either. I think I will add a comment to the conservative scanning code instead.
Assignee | ||
Comment 4•15 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/444068768c1e
Whiteboard: fixed-in-tracemonkey
Comment 5•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/444068768c1e
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
•