JS_ROUNDUP(x, y) evaluates y three times
Categories
(Core :: JavaScript Engine, enhancement, P5)
Tracking
()
People
(Reporter: jonco, Assigned: anba)
Details
Attachments
(4 files)
JS_ROUNDUP is defined like this:
#define JS_HOWMANY(x, y) (((x) + (y)-1) / (y))
#define JS_ROUNDUP(x, y) (JS_HOWMANY(x, y) * (y))
Hopefully this is never passed an expression with side effects!
This could be replaced by an inline function.
Assignee | ||
Comment 1•6 years ago
|
||
Taking this bug to replace the jstypes macros and update some other macros.
Assignee | ||
Comment 2•6 years ago
|
||
And the two macros to convert to and from SmallChars.
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D51139
Assignee | ||
Comment 4•6 years ago
|
||
Both macros compute the same result, so we can replace ROUNDUP with JS_ROUNDUP.
Depends on D51140
Assignee | ||
Comment 5•6 years ago
|
||
JS_BIT and JS_BITMASK are only used in contexts where uint32_t is used, so these
two functions are now typed to accept and return uint32_t.
JS_HOWMANY and the three JS_ROUND functions are only used with size_t inputs,
so these four functions are now typed to accept and return size_t.
Depends on D51141
Comment 6•6 years ago
|
||
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. applying /tmp/tmpyyKH7w js/src/vm/TypedArrayObject.cpp Hunk #4 FAILED at 234. 1 out of 5 hunks FAILED -- saving rejects to file js/src/vm/TypedArrayObject.cpp.rej abort: patch command failed: exited with status 256
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0e0afb29911a
https://hg.mozilla.org/mozilla-central/rev/865b84a23e9e
https://hg.mozilla.org/mozilla-central/rev/93e5393aa92b
https://hg.mozilla.org/mozilla-central/rev/3a9b6b73cab7
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Description
•