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

remove wasted return statement #43

Open
Constellation opened this issue Sep 23, 2012 · 1 comment
Open

remove wasted return statement #43

Constellation opened this issue Sep 23, 2012 · 1 comment

Comments

@Constellation
Copy link
Member

function t() {
  if (a) {
    ...
  }
  return;
}

should be transformed to

function t() {
  if (a) {
    ...
  }
}
function f() {
  return void 0;
}

to

function t() { }

We should check control flow and eliminate wasted return statement.

@Constellation
Copy link
Member Author

Quoted:

function a(a){return void a()}

which would hopefully be further reduced to this program:

function a(a){a()}

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

No branches or pull requests

1 participant