Closed Bug 1811264 Opened 2 years ago Closed 2 years ago

Support relational comparison of {String,BigInt} with null or undefined

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(4 files)

Bug 1810299 was slow due to unsupported comparison ops. Handle the remaining unsupported cases:

  • String x {Null, Undefined}
  • BigInt x {Null, Undefined}

This case is already handled by CompareIRGenerator::tryAttachNumber(), which
is called before CompareIRGenerator::tryAttachBoolStringOrNumber().

Also rename the method to tryAttachStringBoolean to match the other String
comparison method tryAttachStringNumber.

Handle String x Boolean in tryAttachStringNumber. Also adds support for String x {Null, Undefined}.

Depends on D167264

This adds support for BigInt x {Null, Undefined} relational comparisons.

Depends on D167265

Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b6b38d390e21 Part 1: Remove Boolean x Number case from CompareIRGenerator::tryAttachBoolStringOrNumber. r=jandem https://hg.mozilla.org/integration/autoland/rev/b0681205064c Part 2: Merge tryAttachStringBoolean with tryAttachStringNumber. r=jandem https://hg.mozilla.org/integration/autoland/rev/cf4e8b705023 Part 3: Handle remaining BigInt comparisons. r=jandem https://hg.mozilla.org/integration/autoland/rev/5d23be21258f Part 4: Add comments about supported comparison types. r=jandem
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: