-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the output is generated with `--keep-names` flag - `__name(fn, "name")` statements are inserted for every function/class with a name. However, in many situations the renamer doesn't change the name of the function/class, and thus the call to `__name` has no effect other than imposing an extra runtime cost on the application. This change adds `IsKeepName` flag to `ECall` struct and uses it in js_printer to detect such situations and omit the `__name()` from being printed. Sadly, it would be hard to drop it completely without `--minify` flag, but at least we can drop the runtime cost associated with it by just replacing the `__name()` with its first argument in such situations.
- Loading branch information
Showing
5 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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