Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact(es/minifier): merge cond_init with reassigned #6850

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

Austaras
Copy link
Member

Description:

And optimize following sutiation

export function genElement(el, state) {
    if ('slot' === el.tag) return el1 = el, genChildren(el1);
    if (el.component) {
        var el1
        return 999;
    }
}

which rarely happens in hand written JS, but is often generated by swc merge variable pass

BREAKING CHANGE:

Related issue (if exists):

@kdy1 kdy1 self-assigned this Jan 25, 2023
@kdy1 kdy1 added this to the Planned milestone Jan 25, 2023
@kdy1 kdy1 requested review from jridgewell and kdy1 and removed request for jridgewell January 25, 2023 07:01
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!


swc-bump:

  • swc_ecma_usage_analyzer --breaking

crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs Outdated Show resolved Hide resolved
crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs Outdated Show resolved Hide resolved
crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs Outdated Show resolved Hide resolved
crates/swc_ecma_usage_analyzer/src/analyzer/mod.rs Outdated Show resolved Hide resolved
crates/swc_ecma_minifier/src/program_data.rs Outdated Show resolved Hide resolved
@Austaras Austaras requested a review from kdy1 January 25, 2023 18:53
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kdy1 kdy1 merged commit 55225cb into swc-project:main Jan 26, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.29 Jan 26, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants