mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: remove most uses of duintxx
The only remaining uses of duintxx are in the implementation of duintNN. I hope to inline those once I figure out why CL 40864 is broken. Note that some uses of duintxx with width Widthint were converted into duintptr. I did that, since #19954 is officially going to move forward. Passes toolstash-check. Change-Id: Id25253b711ea589d0199b51be9a3c18ca1af59ce Reviewed-on: https://go-review.googlesource.com/41398 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
a544df33fd
commit
bea8ffdbb1
2 changed files with 11 additions and 11 deletions
|
|
@ -332,8 +332,8 @@ func slicebytes(nam *Node, s string, len int) {
|
|||
}
|
||||
off = int(nam.Xoffset)
|
||||
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)
|
||||
off = duintptr(nam.Sym.Linksym(), off, uint64(len))
|
||||
duintptr(nam.Sym.Linksym(), off, uint64(len))
|
||||
}
|
||||
|
||||
func dsname(s *obj.LSym, off int, t string) int {
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ func dgopkgpath(s *types.Sym, ot int, pkg *types.Pkg) int {
|
|||
|
||||
func dgopkgpathLSym(s *obj.LSym, ot int, pkg *types.Pkg) int {
|
||||
if pkg == nil {
|
||||
return duintxx(s, ot, 0, Widthptr)
|
||||
return duintptr(s, ot, 0)
|
||||
}
|
||||
|
||||
if pkg == localpkg && myimportpath == "" {
|
||||
|
|
@ -479,7 +479,7 @@ func dgopkgpathLSym(s *obj.LSym, ot int, pkg *types.Pkg) int {
|
|||
// dgopkgpathOffLSym writes an offset relocation in s at offset ot to the pkg path symbol.
|
||||
func dgopkgpathOffLSym(s *obj.LSym, ot int, pkg *types.Pkg) int {
|
||||
if pkg == nil {
|
||||
return duintxx(s, ot, 0, 4)
|
||||
return duint32(s, ot, 0)
|
||||
}
|
||||
if pkg == localpkg && myimportpath == "" {
|
||||
// If we don't know the full import path of the package being compiled
|
||||
|
|
@ -673,7 +673,7 @@ func dextratypeData(s *types.Sym, ot int, t *types.Type) int {
|
|||
}
|
||||
|
||||
func dmethodptrOffLSym(s *obj.LSym, ot int, x *obj.LSym) int {
|
||||
duintxx(s, ot, 0, 4)
|
||||
duint32(s, ot, 0)
|
||||
r := obj.Addrel(s)
|
||||
r.Off = int32(ot)
|
||||
r.Siz = 4
|
||||
|
|
@ -1204,8 +1204,8 @@ ok:
|
|||
ot = dgopkgpath(s, ot, tpkg)
|
||||
|
||||
ot = dsymptr(s.Linksym(), ot, s.Linksym(), ot+Widthptr+2*Widthint+uncommonSize(t))
|
||||
ot = duintxx(s.Linksym(), ot, uint64(n), Widthint)
|
||||
ot = duintxx(s.Linksym(), ot, uint64(n), Widthint)
|
||||
ot = duintptr(s.Linksym(), ot, uint64(n))
|
||||
ot = duintptr(s.Linksym(), ot, uint64(n))
|
||||
dataAdd := imethodSize() * n
|
||||
ot = dextratype(s, ot, t, dataAdd)
|
||||
|
||||
|
|
@ -1297,8 +1297,8 @@ ok:
|
|||
}
|
||||
ot = dgopkgpath(s, ot, pkg)
|
||||
ot = dsymptr(s.Linksym(), ot, s.Linksym(), ot+Widthptr+2*Widthint+uncommonSize(t))
|
||||
ot = duintxx(s.Linksym(), ot, uint64(n), Widthint)
|
||||
ot = duintxx(s.Linksym(), ot, uint64(n), Widthint)
|
||||
ot = duintptr(s.Linksym(), ot, uint64(n))
|
||||
ot = duintptr(s.Linksym(), ot, uint64(n))
|
||||
|
||||
dataAdd := n * structfieldSize()
|
||||
ot = dextratype(s, ot, t, dataAdd)
|
||||
|
|
@ -1575,7 +1575,7 @@ func dalgsym(t *types.Type) *types.Sym {
|
|||
|
||||
ot := 0
|
||||
ot = dsymptr(hashfunc.Linksym(), ot, Runtimepkg.Lookup("memhash_varlen").Linksym(), 0)
|
||||
ot = duintxx(hashfunc.Linksym(), ot, uint64(t.Width), Widthptr) // size encoded in closure
|
||||
ot = duintptr(hashfunc.Linksym(), ot, uint64(t.Width)) // size encoded in closure
|
||||
ggloblsym(hashfunc, int32(ot), obj.DUPOK|obj.RODATA)
|
||||
|
||||
// make equality closure
|
||||
|
|
@ -1585,7 +1585,7 @@ func dalgsym(t *types.Type) *types.Sym {
|
|||
|
||||
ot = 0
|
||||
ot = dsymptr(eqfunc.Linksym(), ot, Runtimepkg.Lookup("memequal_varlen").Linksym(), 0)
|
||||
ot = duintxx(eqfunc.Linksym(), ot, uint64(t.Width), Widthptr)
|
||||
ot = duintptr(eqfunc.Linksym(), ot, uint64(t.Width))
|
||||
ggloblsym(eqfunc, int32(ot), obj.DUPOK|obj.RODATA)
|
||||
} else {
|
||||
// generate an alg table specific to this type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue