Skip to content

minifier: inline uninitialized variable for arithmetical binary expression #24474

Description

@Dunqing

#24452 The change prevents inlining implicitly undefined variables to void 0, which causes let a; a * 0 to never be inlined. It also blocks the inlining of (void 0 * 2) if it's implemented in the future.

I assumed void 0 * 2 is transformed to 0/0 (NaN). But I guess it will still be console.log(0/0) if that's implemented, as let a; console.log((a + "").length); is transformed to console.log(9);.

Originally posted by @sapphi-red in #24452 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions