Add support for ToInteger when called with undefined and doubles
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(10 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•7 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 4•5 years ago
|
||
Avoid emitting object type test when already bailing out for any non-undefined type.
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D37284
Assignee | ||
Comment 6•5 years ago
|
||
ToIntegerPositiveZero has almost identical semantics as ToInteger with the sole
exception that negative zero is converted to positive zero.
The next patches will update callers to use this function instead of ToInteger
where possible and improve the inlining of this function.
Depends on D37285
Assignee | ||
Comment 7•5 years ago
|
||
All self-hosted functions calling ToInteger can be updated to use
ToIntegerPositiveZero, because there were either already explicit or implicit
coercions from negative to positive zero present, e.g. addition with +0
or a
call to Math.max(v, 0)
, or the distinction between negative and positive
zero isn't observable, e.g. when indexing into an object obj[index]
.
Depends on D37286
Assignee | ||
Comment 8•5 years ago
|
||
And remove ToInteger from the self-hosting global, because it's no longer used.
Depends on D37287
Assignee | ||
Comment 9•5 years ago
|
||
MNearbyInt and MMathFunction both support |undefined| input arguments, so only
disallow |undefined| when returning an Int32.
Depends on D37288
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D37289
Assignee | ||
Comment 11•5 years ago
|
||
The code is mostly based on the existing MToNumberInt32 class.
Depends on D37290
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D37291
Assignee | ||
Comment 13•5 years ago
|
||
This matches the spec better and relaxes the input argument constraints for both functions.
Depends on D37292
Assignee | ||
Comment 14•5 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d21a7490efc814ef7c28f5967006be99390ddf10
Comment 15•5 years ago
|
||
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1f8004b8bbb5
Part 1: Remove unnecessary object-type check in convertValueToInt. r=jandem
https://hg.mozilla.org/integration/autoland/rev/15ca7dc95546
Part 2: Update step comments in self-hosted functions calling ToInteger. r=jandem
https://hg.mozilla.org/integration/autoland/rev/aba15e0b2bed
Part 3: Add ToIntegerPositiveZero as a new variant of ToInteger. r=jandem
https://hg.mozilla.org/integration/autoland/rev/9fc3acf1e4c5
Part 4: Update self-hosted callers to use ToIntegerPositiveZero. r=jandem
https://hg.mozilla.org/integration/autoland/rev/43d790758a05
Part 5: Move inlining support from ToInteger to ToIntegerPositiveZero. r=jandem
https://hg.mozilla.org/integration/autoland/rev/edd4b486ee14
Part 6: Inline ToIntegerPositiveZero when returning Double values. r=jandem
https://hg.mozilla.org/integration/autoland/rev/e0aa46fb1ed1
Part 7: Fix branchTruncate{Double,Float}ToInt32 for x64 and avoid negative zero check for ARM64. r=jandem
https://hg.mozilla.org/integration/autoland/rev/a901d5cfc7d2
Part 8: Add MToIntegerInt32 to specialise ToInteger operations. r=jandem
https://hg.mozilla.org/integration/autoland/rev/36477b4e736a
Part 9: Use MToIntegerInt32 when inlining ToIntegerPositiveZero. r=jandem
https://hg.mozilla.org/integration/autoland/rev/d9d678e7422e
Part 10: Use MToIntegerInt32 when inlining charAt and charCodeAt. r=jandem
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1f8004b8bbb5
https://hg.mozilla.org/mozilla-central/rev/15ca7dc95546
https://hg.mozilla.org/mozilla-central/rev/aba15e0b2bed
https://hg.mozilla.org/mozilla-central/rev/9fc3acf1e4c5
https://hg.mozilla.org/mozilla-central/rev/43d790758a05
https://hg.mozilla.org/mozilla-central/rev/edd4b486ee14
https://hg.mozilla.org/mozilla-central/rev/e0aa46fb1ed1
https://hg.mozilla.org/mozilla-central/rev/a901d5cfc7d2
https://hg.mozilla.org/mozilla-central/rev/36477b4e736a
https://hg.mozilla.org/mozilla-central/rev/d9d678e7422e
Description
•