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 redundant alias handling in JS compiler. NFC #17419

Closed
wants to merge 1 commit into from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 12, 2022

This alias handling code was not active. You can see this from the
fact that the deps variable is declared const and then re-assigned
in the case of an alias, which would have been a runtime error if it
ever happended.

Aliased are instead handed in modules.js. See apply synonyms in that
file.

This alias handling code was not active.  You can see this from the
fact that the `deps` variable is declared const and then re-assigned
in the case of an alias, which would have been a runtime error if it
ever happended.

Aliased are instead handed in modules.js.  See `apply synonyms` in that
file.
@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 12, 2022

I guess its possible we could instead remove the more complex alias handling that is currenty the active one (in modules.js)?

@sbc100 sbc100 requested a review from kripken July 12, 2022 20:09
sbc100 added a commit that referenced this pull request Jul 12, 2022
This change removes the redudant handling of aliases, leaving the
simpler and more effecient one in place.

The alternative PR is #17419.

With this method the final output contains:

var foo = target;

Rather than:

function foo(arg1, arg2) {
  return target(arg1, arg1);
}
@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 12, 2022

I think we can close this in favor of #17420

sbc100 added a commit that referenced this pull request Jul 12, 2022
This change removes the redudant handling of aliases, leaving the
simpler and more effecient one in place.

The alternative PR is #17419.

With this method the final output contains:

var foo = target;

Rather than:

function foo(arg1, arg2) {
  return target(arg1, arg1);
}
sbc100 added a commit that referenced this pull request Jul 12, 2022
This change removes the redudant handling of aliases, leaving the
simpler and more effecient one in place.

The alternative PR is #17419.

With this method the final output contains:

var foo = target;

Rather than:

function foo(arg1, arg2) {
  return target(arg1, arg1);
}
sbc100 added a commit that referenced this pull request Jul 12, 2022
This change removes the redudant handling of aliases, leaving the
simpler and more effecient one in place.

The alternative PR is #17419.

With this method the final output contains:

var foo = target;

Rather than:

function foo(arg1, arg2) {
  return target(arg1, arg1);
}
sbc100 added a commit that referenced this pull request Jul 12, 2022
This change removes the redudant handling of aliases, leaving the
simpler and more effecient one in place.

The alternative PR is #17419.

With this method the final output contains:

var foo = target;

Rather than:

function foo(arg1, arg2) {
  return target(arg1, arg1);
}
@sbc100 sbc100 closed this Jul 12, 2022
@sbc100 sbc100 deleted the remove_redundant_alias_handling branch July 12, 2022 21:03
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

Successfully merging this pull request may close these issues.

None yet

1 participant