Closed Bug 1780517 Opened 3 years ago Closed 3 years ago

Emit JSOp::Undefined for undefined in self-hosted JS

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(3 files)

In self-hosted JS code, undefined is emitted as JSOp::GetIntrinsic "undefined",
but it can be JSOp::Undefined, given undefined variable should always be undefined there.

undefined value is written as both undefined and void 0 in existing self-hosted JS code.
Once we fix the bytecode emitter, we can always use undefined instead of void 0

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/72664babe2c6 Part 1: Emit JSOP::Undefined for undefined in self-hosted JS. r=jandem https://hg.mozilla.org/integration/autoland/rev/28d512ea39d5 Part 2: Always use undefined instead of void 0 in self-hosted JS. r=jandem https://hg.mozilla.org/integration/autoland/rev/1300bb7f770b Part 3: Do not define undefined in self-hosted intrinsic. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: