More cleanups of NaN in JS::Value
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox78 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(2 files, 2 obsolete files)
Misc cleanup around handling of NaN in JS::Value.
| Assignee | ||
Comment 1•6 years ago
|
||
- Add more comments
- Simplify the JSVAL_SHIFTED_TAG_MAX_DOUBLE
- Add ValueToDouble helper methods
- Assert GenericNaN is compatible
- Fixup the WrappedPtrOperations for JS::Value
| Assignee | ||
Comment 2•6 years ago
|
||
This is arbitrary, but since the negative NaN is the dividing point between
Double and boxed values, it seems like a better canonical value.
Depends on D76339
| Assignee | ||
Comment 3•6 years ago
|
||
This ensures we compute the NaN at runtime instead of compile time since this
is this test is aimed at JIT compatibility. In practice, these should be the
same, plus/minus the sign bit.
Depends on D76340
| Assignee | ||
Comment 4•6 years ago
|
||
The StructuredClone algorithm has its own form of NaN-boxing that does not
need to strictly match JS::Value. Add a SCTAG_NAN type that matches current
value of GenericNaN and replace the CanonicalizeNaN call.
When converting to JS::Value, we still explicitly canonicalize. I put back
the JS:: namespace qualifier since this isn't a universal canonicalization.
Also remove the extraneous canonicalization.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 6•6 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/ed3c28387f3a
https://hg.mozilla.org/mozilla-central/rev/156314339700
Description
•