aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/expr.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-11-28 12:37:55 -0800
committerKeith Randall <khr@golang.org>2020-12-29 18:04:37 +0000
commit0620c674ddca234e0a69b5a35c5fb06a881dd73b (patch)
treee945f8b7fe62997665b68676bfd1ffc4eb655575 /src/cmd/compile/internal/typecheck/expr.go
parent0523d525ae0dea229cffc5634caddd0acbc066af (diff)
downloadgo-0620c674ddca234e0a69b5a35c5fb06a881dd73b.tar.gz
go-0620c674ddca234e0a69b5a35c5fb06a881dd73b.zip
[dev.regabi] cmd/compile: remove original addrtaken bit
Switch the source of truth to the new addrtaken bit. Remove the old one. Change-Id: Ie53679ab14cfcd34b55e912e7ecb962a22db7db3 Reviewed-on: https://go-review.googlesource.com/c/go/+/275696 Trust: Keith Randall <khr@golang.org> Trust: Dan Scales <danscales@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/expr.go')
-rw-r--r--src/cmd/compile/internal/typecheck/expr.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/cmd/compile/internal/typecheck/expr.go b/src/cmd/compile/internal/typecheck/expr.go
index 5752139c0b..12bfae67a8 100644
--- a/src/cmd/compile/internal/typecheck/expr.go
+++ b/src/cmd/compile/internal/typecheck/expr.go
@@ -35,14 +35,6 @@ func tcAddr(n *ir.AddrExpr) ir.Node {
if ir.Orig(r) != r {
base.Fatalf("found non-orig name node %v", r) // TODO(mdempsky): What does this mean?
}
- r.Name().SetAddrtaken(true)
- if r.Name().IsClosureVar() && !CaptureVarsComplete {
- // Mark the original variable as Addrtaken so that capturevars
- // knows not to pass it by value.
- // But if the capturevars phase is complete, don't touch it,
- // in case l.Name's containing function has not yet been compiled.
- r.Name().Defn.Name().SetAddrtaken(true)
- }
}
n.X = DefaultLit(n.X, nil)
if n.X.Type() == nil {