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

ifStatementRemoval optimization does not handle all edge cases #568

Closed
1 task
emilos opened this issue Mar 5, 2020 · 0 comments
Closed
1 task

ifStatementRemoval optimization does not handle all edge cases #568

emilos opened this issue Mar 5, 2020 · 0 comments
Labels

Comments

@emilos
Copy link
Contributor

emilos commented Mar 5, 2020

Currently, if the code like this is generated by the engine due to inlining:

if (null) {} else if (true) {
  __t += "foo";
}
if (null) {} else if (!null) {
  __t += "foo";
}
if (void 0 !== void 0) {} else {
  __t += "foo";
}
if (typeof void 0 === "undefined") {
  __t += "foo";
} else {}

then the Optimizer should simplify it to:

__t += "foo";

unfortunately these edge cases were missed in the astoptech dependency.

Acceptance criteria

  • handle the above edge cases in the ifStatementRemoval of the astoptech dependency
@emilos emilos added good first issue Good for newcomers performance labels Mar 5, 2020
@emilos emilos added this to To do in Optimisations Apr 27, 2020
@emilos emilos closed this as completed Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Optimisations
  
To do
Development

No branches or pull requests

1 participant