Commit a544df33 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/compile: rename dxxx -> dxxxLSym

Follow-up to previous CL.

gorename -from '"cmd/compile/internal/gc".duintxxLSym' -to duintxx
gorename -from '"cmd/compile/internal/gc".duint8LSym' -to duint8
gorename -from '"cmd/compile/internal/gc".duint16LSym' -to duint16
gorename -from '"cmd/compile/internal/gc".duint32LSym' -to duint32
gorename -from '"cmd/compile/internal/gc".duintptrLSym' -to duintptr
gorename -from '"cmd/compile/internal/gc".dbvecLSym' -to dbvec
gorename -from '"cmd/compile/internal/gc".dsnameLSym' -to dsname
gorename -from '"cmd/compile/internal/gc".dsymptrLSym' -to dsymptr
gorename -from '"cmd/compile/internal/gc".dsymptrOffLSym' -to dsymptrOff
gorename -from '"cmd/compile/internal/gc".dsymptrWeakOffLSym' -to dsymptrWeakOff

Passes toolstash-check.

Change-Id: I007f57340f9e8b1468553242556ae25a71167e8c
Reviewed-on: https://go-review.googlesource.com/41397
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent 4d600b8e
......@@ -222,7 +222,7 @@ func dumpglobls() {
for _, s := range funcsyms {
sf := s.Pkg.Lookup(funcsymname(s))
dsymptrLSym(sf.Linksym(), 0, s.Linksym(), 0)
dsymptr(sf.Linksym(), 0, s.Linksym(), 0)
ggloblsym(sf, int32(Widthptr), obj.DUPOK|obj.RODATA)
}
......@@ -251,7 +251,7 @@ func addGCLocals() {
}
}
func duintxxLSym(s *obj.LSym, off int, v uint64, wid int) int {
func duintxx(s *obj.LSym, off int, v uint64, wid int) int {
if s.Type == 0 {
// TODO(josharian): Do this in obj.prepwrite instead.
s.Type = objabi.SDATA
......@@ -263,27 +263,27 @@ func duintxxLSym(s *obj.LSym, off int, v uint64, wid int) int {
return off + wid
}
func duint8LSym(s *obj.LSym, off int, v uint8) int {
return duintxxLSym(s, off, uint64(v), 1)
func duint8(s *obj.LSym, off int, v uint8) int {
return duintxx(s, off, uint64(v), 1)
}
func duint16LSym(s *obj.LSym, off int, v uint16) int {
return duintxxLSym(s, off, uint64(v), 2)
func duint16(s *obj.LSym, off int, v uint16) int {
return duintxx(s, off, uint64(v), 2)
}
func duint32LSym(s *obj.LSym, off int, v uint32) int {
return duintxxLSym(s, off, uint64(v), 4)
func duint32(s *obj.LSym, off int, v uint32) int {
return duintxx(s, off, uint64(v), 4)
}
func duintptrLSym(s *obj.LSym, off int, v uint64) int {
return duintxxLSym(s, off, v, Widthptr)
func duintptr(s *obj.LSym, off int, v uint64) int {
return duintxx(s, off, v, Widthptr)
}
func dbvecLSym(s *obj.LSym, off int, bv bvec) int {
func dbvec(s *obj.LSym, off int, bv bvec) int {
// Runtime reads the bitmaps as byte arrays. Oblige.
for j := 0; int32(j) < bv.n; j += 8 {
word := bv.b[j/32]
off = duint8LSym(s, off, uint8(word>>(uint(j)%32)))
off = duint8(s, off, uint8(word>>(uint(j)%32)))
}
return off
}
......@@ -309,7 +309,7 @@ func stringsym(s string) (data *obj.LSym) {
if !symdata.SeenGlobl() {
// string data
off := dsnameLSym(symdata, 0, s)
off := dsname(symdata, 0, s)
ggloblLSym(symdata, int32(off), obj.DUPOK|obj.RODATA|obj.LOCAL)
}
......@@ -324,37 +324,37 @@ func slicebytes(nam *Node, s string, len int) {
sym := localpkg.Lookup(symname)
sym.Def = asTypesNode(newname(sym))
off := dsnameLSym(sym.Linksym(), 0, s)
off := dsname(sym.Linksym(), 0, s)
ggloblsym(sym, int32(off), obj.NOPTR|obj.LOCAL)
if nam.Op != ONAME {
Fatalf("slicebytes %v", nam)
}
off = int(nam.Xoffset)
off = dsymptrLSym(nam.Sym.Linksym(), off, sym.Linksym(), 0)
off = duintxxLSym(nam.Sym.Linksym(), off, uint64(len), Widthint)
duintxxLSym(nam.Sym.Linksym(), off, uint64(len), Widthint)
off = dsymptr(nam.Sym.Linksym(), off, sym.Linksym(), 0)
off = duintxx(nam.Sym.Linksym(), off, uint64(len), Widthint)
duintxx(nam.Sym.Linksym(), off, uint64(len), Widthint)
}
func dsnameLSym(s *obj.LSym, off int, t string) int {
func dsname(s *obj.LSym, off int, t string) int {
s.WriteString(Ctxt, int64(off), len(t), t)
return off + len(t)
}
func dsymptrLSym(s *obj.LSym, off int, x *obj.LSym, xoff int) int {
func dsymptr(s *obj.LSym, off int, x *obj.LSym, xoff int) int {
off = int(Rnd(int64(off), int64(Widthptr)))
s.WriteAddr(Ctxt, int64(off), Widthptr, x, int64(xoff))
off += Widthptr
return off
}
func dsymptrOffLSym(s *obj.LSym, off int, x *obj.LSym, xoff int) int {
func dsymptrOff(s *obj.LSym, off int, x *obj.LSym, xoff int) int {
s.WriteOff(Ctxt, int64(off), x, int64(xoff))
off += 4
return off
}
func dsymptrWeakOffLSym(s *obj.LSym, off int, x *obj.LSym) int {
func dsymptrWeakOff(s *obj.LSym, off int, x *obj.LSym) int {
s.WriteWeakOff(Ctxt, int64(off), x, 0)
off += 4
return off
......
......@@ -31,8 +31,8 @@ func emitptrargsmap() {
if Curfn.Type.Results().NumFields() > 0 {
nbitmap = 2
}
off := duint32LSym(lsym, 0, uint32(nbitmap))
off = duint32LSym(lsym, off, uint32(bv.n))
off := duint32(lsym, 0, uint32(nbitmap))
off = duint32(lsym, off, uint32(bv.n))
var xoffset int64
if Curfn.IsMethod() {
xoffset = 0
......@@ -44,11 +44,11 @@ func emitptrargsmap() {
onebitwalktype1(Curfn.Type.Params(), &xoffset, bv)
}
off = dbvecLSym(lsym, off, bv)
off = dbvec(lsym, off, bv)
if Curfn.Type.Results().NumFields() > 0 {
xoffset = 0
onebitwalktype1(Curfn.Type.Results(), &xoffset, bv)
off = dbvecLSym(lsym, off, bv)
off = dbvec(lsym, off, bv)
}
ggloblLSym(lsym, int32(off), obj.RODATA|obj.LOCAL)
......
......@@ -1276,12 +1276,12 @@ func livenessprintdebug(lv *Liveness) {
// remaining bytes are the raw bitmaps.
func livenessemit(lv *Liveness, argssym, livesym *obj.LSym) {
args := bvalloc(argswords(lv))
aoff := duint32LSym(argssym, 0, uint32(len(lv.livevars))) // number of bitmaps
aoff = duint32LSym(argssym, aoff, uint32(args.n)) // number of bits in each bitmap
aoff := duint32(argssym, 0, uint32(len(lv.livevars))) // number of bitmaps
aoff = duint32(argssym, aoff, uint32(args.n)) // number of bits in each bitmap
locals := bvalloc(localswords(lv))
loff := duint32LSym(livesym, 0, uint32(len(lv.livevars))) // number of bitmaps
loff = duint32LSym(livesym, loff, uint32(locals.n)) // number of bits in each bitmap
loff := duint32(livesym, 0, uint32(len(lv.livevars))) // number of bitmaps
loff = duint32(livesym, loff, uint32(locals.n)) // number of bits in each bitmap
for _, live := range lv.livevars {
args.Clear()
......@@ -1289,8 +1289,8 @@ func livenessemit(lv *Liveness, argssym, livesym *obj.LSym) {
onebitlivepointermap(lv, live, lv.vars, args, locals)
aoff = dbvecLSym(argssym, aoff, args)
loff = dbvecLSym(livesym, loff, locals)
aoff = dbvec(argssym, aoff, args)
loff = dbvec(livesym, loff, locals)
}
// Give these LSyms content-addressable names,
......
This diff is collapsed.
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