Commit 11d916b1 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: remove Node.Nointerface field

We already keep the entire pragma bitset in n.Func.Pragma, so there's
no need to track Nointerface separately.

Passes toolstash -cmp.

Change-Id: Ic027ece477fcf63b0c1df128a08b89ef0f34fd58
Reviewed-on: https://go-review.googlesource.com/21381
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 7c4d53c2
...@@ -1861,7 +1861,7 @@ func (p *parser) xfndcl() *Node { ...@@ -1861,7 +1861,7 @@ func (p *parser) xfndcl() *Node {
} }
p.want(LFUNC) p.want(LFUNC)
f := p.fndcl(p.pragma&Nointerface != 0) f := p.fndcl()
body := p.fnbody() body := p.fnbody()
if f == nil { if f == nil {
...@@ -1886,7 +1886,7 @@ func (p *parser) xfndcl() *Node { ...@@ -1886,7 +1886,7 @@ func (p *parser) xfndcl() *Node {
// Function = Signature FunctionBody . // Function = Signature FunctionBody .
// MethodDecl = "func" Receiver MethodName ( Function | Signature ) . // MethodDecl = "func" Receiver MethodName ( Function | Signature ) .
// Receiver = Parameters . // Receiver = Parameters .
func (p *parser) fndcl(nointerface bool) *Node { func (p *parser) fndcl() *Node {
if trace && Debug['x'] != 0 { if trace && Debug['x'] != 0 {
defer p.trace("fndcl")() defer p.trace("fndcl")()
} }
...@@ -1950,7 +1950,6 @@ func (p *parser) fndcl(nointerface bool) *Node { ...@@ -1950,7 +1950,6 @@ func (p *parser) fndcl(nointerface bool) *Node {
f.Func.Nname = methodname1(f.Func.Shortname, recv.Right) f.Func.Nname = methodname1(f.Func.Shortname, recv.Right)
f.Func.Nname.Name.Defn = f f.Func.Nname.Name.Defn = f
f.Func.Nname.Name.Param.Ntype = t f.Func.Nname.Name.Param.Ntype = t
f.Func.Nname.Nointerface = nointerface
declare(f.Func.Nname, PFUNC) declare(f.Func.Nname, PFUNC)
funchdr(f) funchdr(f)
......
...@@ -50,7 +50,6 @@ type Node struct { ...@@ -50,7 +50,6 @@ type Node struct {
Esc uint16 // EscXXX Esc uint16 // EscXXX
Op Op Op Op
Nointerface bool
Ullman uint8 // sethi/ullman number Ullman uint8 // sethi/ullman number
Addable bool // addressable Addable bool // addressable
Etype EType // op for OASOP, etype for OTYPE, exclam for export, 6g saved reg Etype EType // op for OASOP, etype for OTYPE, exclam for export, 6g saved reg
......
...@@ -3423,7 +3423,7 @@ func typecheckfunc(n *Node) { ...@@ -3423,7 +3423,7 @@ func typecheckfunc(n *Node) {
t.SetNname(n.Func.Nname) t.SetNname(n.Func.Nname)
rcvr := t.Recv() rcvr := t.Recv()
if rcvr != nil && n.Func.Shortname != nil { if rcvr != nil && n.Func.Shortname != nil {
addmethod(n.Func.Shortname.Sym, t, nil, true, n.Func.Nname.Nointerface) addmethod(n.Func.Shortname.Sym, t, nil, true, n.Func.Pragma&Nointerface != 0)
} }
for _, ln := range n.Func.Dcl { for _, ln := range n.Func.Dcl {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment