-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/refactor/inline: substitute groups of dependent arguments
In change signature refactoring, the wrapper was very likely to run into a particular unidiomatic behavior of the inliner, where arguments were detected as unsubstitutable because they have free variables shadowed by other parameters. But if those other parameters are going to be substituted, this shadowing is irrelevant. Fix this by keeping track of shadowing from other parameters in a new shadowMap type, and then analyzing these relationships during substitution to detect cases where closed subgraphs of parameters can be substituted simultaneously. Also: fix a formatting bug (golang/go#67335) that was reproduced by one of the new tests: we need to clear positions when using nodes from the callee in the caller's binding decl. For golang/go#70599 Fixes golang/go#67335 Change-Id: I08970a1cea8a82ea108084394569cffbc5975235 Reviewed-on: https://go-review.googlesource.com/c/tools/+/633256 Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
- Loading branch information
Showing
6 changed files
with
478 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.