Remove bits of dead code from TypeInference

RESOLVED FIXED in Firefox 68

Status

()

defect
P3
normal
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: tcampbell, Assigned: tcampbell)

Tracking

unspecified
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment, 4 obsolete attachments)

Dead code in TI:

ObjectGroup::matchDefiniteProperties
TypeNewScript::makeNativeVersion

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb5b01e0b309
Remove unused JS TypeInference methods. r=iain
  1. CanonicalizedDoubleValue should reuse the logic in CanonicalizeNaN.
  2. Places that call DoubleValue(CanonicalizeNaN(d)) should just use CanonicalizedDoubleValue(d).

Back when we first freed the lizard in 1998, it made sense to have copies of NaN/+Inf/-Inf living on the runtime, because Values didn't store doubles inline. That hasn't been true for a long time. This patch gets rid of those.

Depends on D29867

We can't generate a constexpr uint64_t containing the bits for positive/negative infinity, because of a (very sensible) static_assert in SpecificNaNBits. This patch adds support to FloatingPoint.h for infinity, and uses it to make JS::InfinityValue constexpr (to match JS::NaNValue).

IsCanonical was only used in StructuredCloneReader::CheckDouble. Two of CheckDouble's three uses already canonicalized the double before checking it, and the third should have already done so.

Comment on attachment 9062555 [details]
Bug 1548903: Make JS::InfinityValue constexpr r=jwalden

Revision D29869 was moved to bug 1548908. Setting attachment 9062555 [details] to obsolete.

Attachment #9062555 - Attachment is obsolete: true

Comment on attachment 9062556 [details]
Bug 1548903: Remove IsCanonical and simplify StructuredCloneReader r=tcampbell

Revision D29870 was moved to bug 1548908. Setting attachment 9062556 [details] to obsolete.

Attachment #9062556 - Attachment is obsolete: true

Comment on attachment 9062554 [details]
Bug 1548903: Remove "well-known numbers" from JSRuntime r=tcampbell

Revision D29868 was moved to bug 1548908. Setting attachment 9062554 [details] to obsolete.

Attachment #9062554 - Attachment is obsolete: true

Comment on attachment 9062553 [details]
Bug 1548903: Clean up JS::CanonicalizedDoubleValue r=tcampbell

Revision D29867 was moved to bug 1548908. Setting attachment 9062553 [details] to obsolete.

Attachment #9062553 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.