Closed
Bug 1287671
Opened 8 years ago
Closed 8 years ago
Simplify jscpucfg.h
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(2 files)
All the supported compilers have __BYTE_ORDER__, except MSVC, which is little-endian-only. So there's a whole bunch of e.g. if defined(JS_HAVE_*) related things that can go away.
Assignee | ||
Comment 1•8 years ago
|
||
All the supported compilers to build JS now support __BYTE_ORDER__, except MSVC, which only supports one kind of endianness. This allows to drastically simplify jscpucfg.h as a consequence. Apart from endianness, jscpucfg.h is defining JS_HAVE_LONG_LONG, which isn't used anywhere, defines a macro for the Watcom C/C++ compiler, and tries to figure out stack growth direction. The first is obviously unnecessary. The second is not useful now that building JS requires a C++11-capable compiler, which the Watcom C/C++ compiler isn't. The latter, however, is still relevant, but the check based on sys/isa_def.h is, afaict, only relevant on HP-UX on PA-RISC, which is already covered by the check for __hppa. Consequently, the various checks setting JS_HAVE_header_H defines can all be removed. Review commit: https://reviewboard.mozilla.org/r/65162/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/65162/
Attachment #8772327 -
Flags: review?(jorendorff)
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8772327 [details] Bug 1287671 - Simplify jscpucfg.h. Cancelling after talking with njn who made me realize there's MOZ_{BIG,LITTLE}_ENDIAN and we should just use that, killing most of jscpucfg.h.
Attachment #8772327 -
Flags: review?(jorendorff)
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8772327 [details] Bug 1287671 - Simplify jscpucfg.h. https://reviewboard.mozilla.org/r/65162/#review81618 This is good enough to land, but I'll give you bonus points if you remove the definitions of IS_{BIG,LITTLE}_ENDIAN and replace the handful of uses of them within js/src/ with MOZ_{BIG,LITTLE}_ENDIAN.
Attachment #8772327 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 5•8 years ago
|
||
Heh, I thought there were more than there actually are, I'll add a patch doing that.
Comment hidden (mozreview-request) |
Comment 7•8 years ago
|
||
mozreview-review |
Comment on attachment 8797376 [details] Bug 1287671 - Replace IS_{LITTLE|BIG}_ENDIAN with MOZ_{LITTLE|BIG}_ENDIAN in js/. https://reviewboard.mozilla.org/r/82976/#review81656
Attachment #8797376 -
Flags: review?(n.nethercote) → review+
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/50f9b4a613b0 Simplify jscpucfg.h. r=njn https://hg.mozilla.org/integration/autoland/rev/1c4f0a3784f1 Replace IS_{LITTLE|BIG}_ENDIAN with MOZ_{LITTLE|BIG}_ENDIAN in js/. r=njn
Comment 9•8 years ago
|
||
Backed out for jit-test bustages, i.e., https://treeherder.mozilla.org/logviewer.html#?job_id=4419482&repo=autoland#L1192 and https://treeherder.mozilla.org/logviewer.html#?job_id=4423143&repo=autoland#L5120
Flags: needinfo?(mh+mozilla)
Assignee | ||
Comment 10•8 years ago
|
||
Fun things are fun, when MOZ_LITTLE_ENDIAN is defined to 1, MOZ_BIG_ENDIAN is defined to 0, contrary to IS_BIG_ENDIAN, which was #undef'ed.
Flags: needinfo?(mh+mozilla)
Comment 11•8 years ago
|
||
Backout by ihsiao@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e548982279e2 Backed out changeset 1c4f0a3784f1 for jit-test bustages https://hg.mozilla.org/integration/autoland/rev/114ae8fb1a77 Backed out changeset 50f9b4a613b0
Comment hidden (mozreview-request) |
Comment 13•8 years ago
|
||
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a9bac26b17a4 Simplify jscpucfg.h. r=njn https://hg.mozilla.org/integration/autoland/rev/b232aaced78a Replace IS_{LITTLE|BIG}_ENDIAN with MOZ_{LITTLE|BIG}_ENDIAN in js/. r=njn
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a9bac26b17a4 https://hg.mozilla.org/mozilla-central/rev/b232aaced78a
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•