Closed Bug 867362 Opened 9 years ago Closed 8 years ago

delete various dead definitions that the compiler can tell us about


(Core :: JavaScript Engine, defect)

Not set





(Reporter: froydnj, Assigned: froydnj)


(Blocks 1 open bug)



(4 files)

Noticed that MOZ_N_BYTE_TYPE in moznbytetype.m4 seemed superfluous since
we have StandardInteger.h nowadays.  Then I noticed that the rest of the
bits in moznbytetype.m4 were sparsely used and the things they were used
to define could be done better or not at all.  Upcoming patch series is
the result.
This change means that we no longer need the MOZ_ALIGN_OF_TYPE macro in
moznbytetype.m4.  And it's just nicer to have the compiler figure things
out for us rather than configury.
Attachment #743829 - Flags: review?(luke)
Nothing in the engine uses it.
Attachment #743830 - Flags: review?(luke)
JS_BYTES_PER_DOUBLE isn't used after getting rid of JS_BITS_PER_DOUBLE.
This change means that MOZ_SIZE_OF_TYPE from moznbytetype.m4 is no
longer used.
Attachment #743831 - Flags: review?(luke)
...and finally, one less piece of build machinery to carry around.
Attachment #743833 - Flags: review?(mh+mozilla)
Comment on attachment 743833 [details] [diff] [review]
part 4 - delete moznbytetype.m4

Argh, there's one last use of MOZ_SIZE_OF_TYPE that I forgot to address.  Will need to fix that before this builds.
Attachment #743833 - Flags: review?(mh+mozilla)
The last use of MOZ_SIZE_OF_TYPE is tied to JS_{BYTES,BITS}_PER_WORD, which is used in a number of places.  I think most of those places could profitably use templates and specialization to let the compiler figure things out, instead of the mass of #ifdeffery we have now.  The biggest use of JS_BITS_PER_WORD is for the layout of jsval and constants related to it; cleaning that up would be nice, except there's things like:

#if defined(__cplusplus) && !defined(__SUNPRO_CC) && !defined(__xlC__)

How much do we care about continuing to support Sun CC and XLC?  They're not tier-1, so can we just drop them on the floor?
Attachment #743829 - Flags: review?(luke) → review+
Attachment #743830 - Flags: review?(luke) → review+
Attachment #743831 - Flags: review?(luke) → review+
I don't actually know if Sun CC and XLC are actively being used to compile our codebase or whether the compiler bugs that required those original #ifdefs are still unfixed.  If hg annotate says that the #ifdefs are old, I'd be open to speculatively removing them and adding them back if we get complaints.  We break non-tier-1 platforms all the time with new code and they generally seem quite willing to submit fixes.
Flags: needinfo?(luke)
Blocks: 925167
Depends on: 781171, 925879
Closing this, since the remaining work has been scattered across bugs, and patch 4 has been moved into bug 781171.
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → mozilla23
Assignee: general → nfroyd
You need to log in before you can comment on or make changes to this bug.