Skip to content

fix corner case in keep_fnames#1445

Closed
alexlamsl wants to merge 1 commit intomishoo:masterfrom
alexlamsl:keep_fnames-unused
Closed

fix corner case in keep_fnames#1445
alexlamsl wants to merge 1 commit intomishoo:masterfrom
alexlamsl:keep_fnames-unused

Conversation

@alexlamsl
Copy link
Copy Markdown
Collaborator

Happens when inner function:

  • just below top level
  • not referenced
  • unused is disabled

Now also iterates over function definitions only when adding to enclosed during keep_fnames=true, so performance should improve as well.

Quick notes on why I think it's safe to iterate over AST_Scope.functions instead of AST_Scope.variables:

happens when inner function:
- just below top level
- not referenced
- `unused` is disabled
@kzc
Copy link
Copy Markdown
Contributor

kzc commented Jan 28, 2017

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. ;-)

@alexlamsl
Copy link
Copy Markdown
Collaborator Author

@kzc roger that 😉

Fun fact: I discovered this whilst working on better test cases in #1443 (comment)

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()
@alexlamsl alexlamsl closed this in fa668a2 Feb 23, 2017
@alexlamsl alexlamsl deleted the keep_fnames-unused branch February 24, 2017 00:17
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