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

Make tdz optional in helper evaluate #658

Merged
merged 3 commits into from
Aug 11, 2017
Merged

Make tdz optional in helper evaluate #658

merged 3 commits into from
Aug 11, 2017

Conversation

boopathi
Copy link
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
@@ -1,6 +1,10 @@
"use strict";

module.exports = function evaluate(path) {
module.exports = function evaluate(path, { tdz = false } = {}) {
if (!tdz) {
Copy link
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

@@ -33,7 +33,8 @@ const PLUGINS = [

const PROXIES = {
keepFnName: ["mangle", "deadcode"],
keepClassName: ["mangle", "deadcode"]
keepClassName: ["mangle", "deadcode"],
tdz: ["builtIns", "evaluate", "deadcode"]
Copy link
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