[dev.link] cmd/internal/goobj2: move NoSplit to symbol flag

Move NoSplit flag from FuncInfo to symbol flag, so this can be
accessed easily without reading the FuncInfo.

The CFunc flag is never used. Remove.

Change-Id: I8bf4fcb2f209434bb90ccc4987a4c3f28f003323
Reviewed-on: https://go-review.googlesource.com/c/go/+/220058
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Zhang 2020-02-17 01:27:11 -05:00
parent c4ccd08a25
commit 0f99ab4e86
5 changed files with 13 additions and 20 deletions

View file

@ -940,6 +940,11 @@ func (l *Loader) IsReflectMethod(i Sym) bool {
return l.SymAttr(i)&goobj2.SymFlagReflectMethod != 0
}
// Returns whether the i-th symbol is nosplit.
func (l *Loader) IsNoSplit(i Sym) bool {
return l.SymAttr(i)&goobj2.SymFlagNoSplit != 0
}
// Returns whether this is a Go type symbol.
func (l *Loader) IsGoType(i Sym) bool {
return l.SymAttr(i)&goobj2.SymFlagGoType != 0
@ -2189,7 +2194,7 @@ func loadObjFull(l *Loader, r *oReader) {
info := goobj2.FuncInfo{}
info.Read(b)
if info.NoSplit != 0 {
if osym.NoSplit() {
s.Attr |= sym.AttrNoSplit
}
if osym.ReflectMethod() {