summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ir/expr.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-04 16:33:30 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-10 08:02:23 +0000
commit7fd84c6e465d9c9d9424538ec99da2c59afdd469 (patch)
tree2efdddd1ffcd0cfca9ebf11ff5d52401a21f2466 /src/cmd/compile/internal/ir/expr.go
parentc9c26d7ffb3c4077ffaa80f7c8e2d550528e1445 (diff)
downloadgo-git-7fd84c6e465d9c9d9424538ec99da2c59afdd469.tar.gz
[dev.regabi] cmd/compile: remove OCLOSUREREAD
After the previous CLs, all closure reads are handled during SSA construction. Change-Id: Iad67b01fa2d3798f50ea647be7ccf8195f189c27 Reviewed-on: https://go-review.googlesource.com/c/go/+/281512 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/ir/expr.go')
-rw-r--r--src/cmd/compile/internal/ir/expr.go17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/cmd/compile/internal/ir/expr.go b/src/cmd/compile/internal/ir/expr.go
index e7aa9c6a8f..51425db42d 100644
--- a/src/cmd/compile/internal/ir/expr.go
+++ b/src/cmd/compile/internal/ir/expr.go
@@ -203,19 +203,6 @@ func NewClosureExpr(pos src.XPos, fn *Func) *ClosureExpr {
return n
}
-// A ClosureRead denotes reading a variable stored within a closure struct.
-type ClosureReadExpr struct {
- miniExpr
- Offset int64
-}
-
-func NewClosureRead(typ *types.Type, offset int64) *ClosureReadExpr {
- n := &ClosureReadExpr{Offset: offset}
- n.typ = typ
- n.op = OCLOSUREREAD
- return n
-}
-
// A CompLitExpr is a composite literal Type{Vals}.
// Before type-checking, the type is Ntype.
type CompLitExpr struct {
@@ -727,7 +714,7 @@ func IsAddressable(n Node) bool {
return false
}
fallthrough
- case ODEREF, ODOTPTR, OCLOSUREREAD:
+ case ODEREF, ODOTPTR:
return true
case ODOT:
@@ -889,7 +876,7 @@ func SameSafeExpr(l Node, r Node) bool {
}
switch l.Op() {
- case ONAME, OCLOSUREREAD:
+ case ONAME:
return l == r
case ODOT, ODOTPTR: