1
0
mirror of https://github.com/golang/go synced 2024-11-17 21:54:49 -07:00

cmd/compile: remove lookupBytes

Change-Id: I08c264f5f3744d835e407534c492ef8c43e1a700
Reviewed-on: https://go-review.googlesource.com/38991
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Robert Griesemer 2017-03-30 14:04:54 -07:00
parent 7efb0779be
commit f7027b4b2d

View File

@ -215,17 +215,13 @@ func lookupf(format string, a ...interface{}) *Sym {
return lookup(fmt.Sprintf(format, a...))
}
func lookupBytes(name []byte) *Sym {
return localpkg.LookupBytes(name)
}
// lookupN looks up the symbol starting with prefix and ending with
// the decimal n. If prefix is too long, lookupN panics.
func lookupN(prefix string, n int) *Sym {
var buf [20]byte // plenty long enough for all current users
copy(buf[:], prefix)
b := strconv.AppendInt(buf[:len(prefix)], int64(n), 10)
return lookupBytes(b)
return localpkg.LookupBytes(b)
}
// autolabel generates a new Name node for use with