Skip to content

Make tdz optional in helper evaluate#658

Merged
boopathi merged 3 commits intomasterfrom
evaluate-tdz-0
Aug 11, 2017
Merged

Make tdz optional in helper evaluate#658
boopathi merged 3 commits intomasterfrom
evaluate-tdz-0

Conversation

@boopathi
Copy link
Copy Markdown
Member

For common case, detecting tdz isn't required. Make it optional.

For common case, detecting tdz isn't required. Make it optional.
@boopathi boopathi added the Tag: New Feature Pull Request adding a new feature label Aug 11, 2017

module.exports = function evaluate(path) {
module.exports = function evaluate(path, { tdz = false } = {}) {
if (!tdz) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

good catch, would help shave off some time in the benchmarks

keepFnName: ["mangle", "deadcode"],
keepClassName: ["mangle", "deadcode"]
keepClassName: ["mangle", "deadcode"],
tdz: ["builtIns", "evaluate", "deadcode"]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can you add the same option to preset README?

@boopathi boopathi merged commit 8b7ed4a into master Aug 11, 2017
@boopathi boopathi deleted the evaluate-tdz-0 branch August 11, 2017 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tag: New Feature Pull Request adding a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants