]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: add Name.Canonical and move Byval
authorMatthew Dempsky <mdempsky@google.com>
Tue, 5 Jan 2021 14:43:38 +0000 (06:43 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 5 Jan 2021 15:42:33 +0000 (15:42 +0000)
commit77365c5ed739f4882020ff76b2a4f5bfe4e8fc9d
tree87e2eb4333d040e79d81241a6d6540b9e4a907aa
parente09783cbc0a7142719c6210b4eda7b21daad91d5
[dev.regabi] cmd/compile: add Name.Canonical and move Byval

There's a bunch of code that wants to map closure variables back to
their original name, so add a single Name.Canonical method that they
can all use.

Also, move the Byval flag from being stored on individual closure
variables to being stored on the canonical variable.

Passes toolstash -cmp.

Change-Id: Ia3ef81af5a15783d09f04b4e274ce33df94518e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/281541
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/dwarfgen/dwarf.go
src/cmd/compile/internal/escape/escape.go
src/cmd/compile/internal/ir/expr.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/typecheck/func.go