[dev.typeparams] all: merge dev.regabi (063c72f) into dev.typeparams

Eager re-sync-branch to keep Git history reasonably accurate, since
Git lacks a better way of encoding partial merges like CL 286172.

Conflicts:

- src/cmd/compile/internal/inline/inl.go
- src/cmd/compile/internal/noder/import.go
- src/cmd/compile/internal/noder/noder.go

Merge List:

+ 2021-01-25 063c72f06d [dev.regabi] cmd/compile: backport changes from dev.typeparams (9456804)
+ 2021-01-23 d05d6fab32 [dev.regabi] cmd/compile: replace ir.Name map with ir.NameSet for SSA 2
+ 2021-01-23 48badc5fa8 [dev.regabi] cmd/compile: fix escape analysis problem with closures
+ 2021-01-23 51e1819a8d [dev.regabi] cmd/compile: scan body of closure in tooHairy to check for disallowed nodes

Change-Id: I48c0435f7aaf56f4aec26518a7459e9d95a51e9c
This commit is contained in:
Matthew Dempsky 2021-01-24 17:36:59 -08:00
commit 6d8d118762
5 changed files with 45 additions and 6 deletions

View file

@ -176,6 +176,11 @@ func resolveImportPath(path string) (string, error) {
// TODO(mdempsky): Return an error instead.
func importfile(decl *syntax.ImportDecl) *types.Pkg {
if decl.Path.Kind != syntax.StringLit {
base.Errorf("import path must be a string")
return nil
}
path, err := strconv.Unquote(decl.Path.Value)
if err != nil {
base.Errorf("import path must be a string")