Closed
Conversation
happens when inner function: - just below top level - not referenced - `unused` is disabled
Contributor
|
I'd have to take your word for this. I don't understand the mangling code as well as you. Just don't go on vacation for a week after it is released. ;-) |
Collaborator
Author
|
@kzc roger that 😉 Fun fact: I discovered this whilst working on better test cases in #1443 (comment) |
Closed
alexlamsl
referenced
this pull request
Feb 23, 2017
* fix mangling collision with keep_fnames fixes #1423 * pass mangle options to figure_out_scope() bring command-line in line with minify()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Happens when inner function:
unusedis disabledNow also iterates over function definitions only when adding to
enclosedduringkeep_fnames=true, so performance should improve as well.Quick notes on why I think it's safe to iterate over
AST_Scope.functionsinstead ofAST_Scope.variables:AST_SymbolLambda&AST_SymbolDefuncan be unmangleable underkeep_fnamesAST_Scope.def_function()when processed byfigure_out_scope()def_function()setsAST_Scope.functionsand callsdef_variable(), which in turn setsAST_Scope.variables