ToInteger normalizes -0 to +0
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: yulia, Assigned: anba)
Details
Attachments
(3 files)
As discussed in: (https://github.com/tc39/ecma262/pull/1827
change ToInteger(-0) to return +0 instead of -0, because in all but one case, the result of ToInteger(-0) is either explicitly or implicitly changed from -0 to +0 anyway.
André -- if this is already done, please feel free to close this.
Assignee | ||
Comment 1•5 years ago
|
||
This isn't yet (completely) done. I already have a patch, but didn't yet found the time to request review for it.
Assignee | ||
Comment 2•5 years ago
|
||
Changes ToInteger to return +0 instead of -0 and updates two callers which were
already performing the -0 to +0 conversion. Also changes NumberIsInt32 to
NumberEqualsInt32 in atomics_isLockFree
, because we no longer need to care
about handling -0 in this function.
Assignee | ||
Comment 3•5 years ago
|
||
More or less undo bug 1383436 - part 4, now that ToInteger matches
ToIntegerPositiveZero.
Depends on D64027
Assignee | ||
Comment 4•5 years ago
|
||
Use C++11's trunc()
function instead of manually branching for negative values.
Depends on D64028
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/43a19073c67f
https://hg.mozilla.org/mozilla-central/rev/251650c4e157
https://hg.mozilla.org/mozilla-central/rev/bd1e456b48ac
Description
•