diff options
Diffstat (limited to 'src/cmd/compile/internal/ir/expr.go')
| -rw-r--r-- | src/cmd/compile/internal/ir/expr.go | 17 |
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: |
