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

extend function inlining safety checks #2430

Merged
merged 2 commits into from
Nov 4, 2017
Merged

Conversation

alexlamsl
Copy link
Collaborator

@kzc this is the final version of #2427 (comment)

@kzc
Copy link
Contributor

kzc commented Nov 4, 2017

Fantastic.

Could you please add this correctly working test?

$ cat scope1.js 
function x() {
    y();
}
function y() {
    console.log(1);
}
function z() {
    function y() {
        console.log(2);
    }
    x();
    y();
}
z();
z();
$ cat scope1.js | bin/uglifyjs -c toplevel,passes=2
function z(){console.log(1),console.log(2)}z(),z();

@alexlamsl
Copy link
Collaborator Author

#2430 (comment) added in af7bb57

@kzc
Copy link
Contributor

kzc commented Nov 4, 2017

I swear you code faster than I can think.

@alexlamsl
Copy link
Collaborator Author

In which case, I shall get some sleep while you catch up... 👻

@alexlamsl alexlamsl merged commit 5b4b07e into mishoo:master Nov 4, 2017
@alexlamsl alexlamsl deleted the fixup-2427 branch November 4, 2017 22:18
@alexlamsl alexlamsl mentioned this pull request Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants