Last Comment Bug 746228 - pack JSPropertyDescriptor better on 64-bit hosts
: pack JSPropertyDescriptor better on 64-bit hosts
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla15
Assigned To: Nathan Froyd [:froydnj]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-17 10:45 PDT by Nathan Froyd [:froydnj]
Modified: 2012-04-24 18:04 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.06 KB, patch)
2012-04-17 10:47 PDT, Nathan Froyd [:froydnj]
luke: review+
Details | Diff | Splinter Review

Description Nathan Froyd [:froydnj] 2012-04-17 10:45:01 PDT
JSProperty descriptor is currently laid out like so:

    JSObject           *obj;
    unsigned              attrs;
    JSPropertyOp       getter;
    JSStrictPropertyOp setter;
    jsval              value;
    unsigned              shortid;

which on 64-bit platforms introduces eight bytes of padding: four after each unsigned member.

The fields should be reordered to eliminate said padding.  Patch coming up.
Comment 1 Nathan Froyd [:froydnj] 2012-04-17 10:47:28 PDT
Created attachment 615782 [details] [diff] [review]
patch
Comment 2 Luke Wagner [:luke] 2012-04-17 10:50:12 PDT
Comment on attachment 615782 [details] [diff] [review]
patch

Could you fix the alignment of attrs and shortid?  These are some style casualties from the recent removal of uintN.
Comment 3 Nathan Froyd [:froydnj] 2012-04-20 13:17:57 PDT
http://hg.mozilla.org/projects/birch/rev/636b1b09842e

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