Closed Bug 1986187 Opened 8 months ago Closed 8 months ago

Emit JSOp::TypeofEq for typeof x > "u"

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
144 Branch
Tracking Status
firefox144 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It turns out that esbuild minifies typeof x === "undefined" into typeof x>"u", which means the JSOp::TypeofEq optimization no longer works on the code minified with it.

https://esbuild.github.io/try/#dAAwLjI1LjkALS1taW5pZnkAdHlwZW9mIHggPT09ICJ1bmRlZmluZWQi

We could extend the support for JSOp::TypeofEq to also match the minified code, so that the minified code still works in the same speed.

JSC already landed a patch to emit an optimized ops for the the minified code: https://bugs.webkit.org/show_bug.cgi?id=298148

So this minfier basically made it impossible to introduce any new type in JavaScript that is lexographically lager than an "u"?

Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 144 Branch
QA Whiteboard: [qa-triage-done-c145/b144]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: