Closed
Bug 960109
Opened 10 years ago
Closed 10 years ago
shrink JSJitInfo slots to the minimum amount of space required.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: froydnj, Unassigned)
References
Details
(Whiteboard: [MemShrink])
Attachments
(1 file)
24.92 KB,
patch
|
efaust
:
review+
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
See: https://bugzilla.mozilla.org/show_bug.cgi?id=952777#c30 for the plan.
Reporter | ||
Comment 1•10 years ago
|
||
OK, last patch along these lines. The patch is big because of the renaming of the fields and adding accessor methods to satisfy static typing requirements. Ideally the new static_assert will cause people to think twice about blithely adding fields.
Attachment #8361668 -
Flags: review?(efaustbmo)
Attachment #8361668 -
Flags: review?(bzbarsky)
Comment 2•10 years ago
|
||
Comment on attachment 8361668 [details] [diff] [review] convert JSJitInfo fields to bitfields r=me assuming that file-level-in-a-header and class-level static_assert works (our internal static assert macros were only ok in functions or at file level in a .cpp).
Attachment #8361668 -
Flags: review?(bzbarsky) → review+
Comment 3•10 years ago
|
||
Comment on attachment 8361668 [details] [diff] [review] convert JSJitInfo fields to bitfields Review of attachment 8361668 [details] [diff] [review]: ----------------------------------------------------------------- This looks pretty good. We now have the disagreement between the use of static_assert() and JS_STATIC_ASSERT() in JSJitInfo::staticAsserts(). I don't know to what extent this matters, but perhaps it's worth a moment of thought. r=me ::: js/src/jsfriendapi.h @@ +1597,5 @@ > JS_STATIC_ASSERT(Any & Null); > } > }; > > +static_assert(sizeof(JSJitInfo) == (sizeof(void*) + 2 * sizeof(uint32_t)), Nice to see this here.
Attachment #8361668 -
Flags: review?(efaustbmo) → review+
Reporter | ||
Comment 4•10 years ago
|
||
(In reply to Eric Faust [:efaust] from comment #3) > This looks pretty good. We now have the disagreement between the use of > static_assert() and JS_STATIC_ASSERT() in JSJitInfo::staticAsserts(). I > don't know to what extent this matters, but perhaps it's worth a moment of > thought. r=me I can fix that in a followup. Waldo said on IRC that the reason mass conversion hasn't happened is that static_assert requires some sort of explanatory comment and writing explanatory comments takes some time and thought. But surely fixing up these six JS_STATIC_ASSERT calls should not be hard.
Reporter | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2a3b16b9246a
Flags: in-testsuite-
Comment 6•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2a3b16b9246a
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•