mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: rename sizeof_Array and array_* to slice_*
Renames variables sizeof_Array and other array_* variables that were actually intended for slices and not arrays. Change-Id: I391b95880cc77cabb8472efe694b7dd19545f31a Reviewed-on: https://go-review.googlesource.com/c/go/+/180919 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
47bc24091a
commit
f07059d949
5 changed files with 23 additions and 23 deletions
|
|
@ -130,11 +130,11 @@ func (s *InitSchedule) staticcopy(l *Node, r *Node) bool {
|
|||
a := s.inittemps[r]
|
||||
|
||||
n := l.copy()
|
||||
n.Xoffset = l.Xoffset + int64(array_array)
|
||||
n.Xoffset = l.Xoffset + int64(slice_array)
|
||||
gdata(n, nod(OADDR, a, nil), Widthptr)
|
||||
n.Xoffset = l.Xoffset + int64(array_nel)
|
||||
n.Xoffset = l.Xoffset + int64(slice_nel)
|
||||
gdata(n, r.Right, Widthptr)
|
||||
n.Xoffset = l.Xoffset + int64(array_cap)
|
||||
n.Xoffset = l.Xoffset + int64(slice_cap)
|
||||
gdata(n, r.Right, Widthptr)
|
||||
return true
|
||||
|
||||
|
|
@ -227,11 +227,11 @@ func (s *InitSchedule) staticassign(l *Node, r *Node) bool {
|
|||
a := staticname(ta)
|
||||
s.inittemps[r] = a
|
||||
n := l.copy()
|
||||
n.Xoffset = l.Xoffset + int64(array_array)
|
||||
n.Xoffset = l.Xoffset + int64(slice_array)
|
||||
gdata(n, nod(OADDR, a, nil), Widthptr)
|
||||
n.Xoffset = l.Xoffset + int64(array_nel)
|
||||
n.Xoffset = l.Xoffset + int64(slice_nel)
|
||||
gdata(n, r.Right, Widthptr)
|
||||
n.Xoffset = l.Xoffset + int64(array_cap)
|
||||
n.Xoffset = l.Xoffset + int64(slice_cap)
|
||||
gdata(n, r.Right, Widthptr)
|
||||
|
||||
// Fall through to init underlying array.
|
||||
|
|
@ -615,11 +615,11 @@ func slicelit(ctxt initContext, n *Node, var_ *Node, init *Nodes) {
|
|||
v.Type = types.Types[TINT]
|
||||
setintconst(&v, t.NumElem())
|
||||
|
||||
nam.Xoffset += int64(array_array)
|
||||
nam.Xoffset += int64(slice_array)
|
||||
gdata(&nam, nod(OADDR, vstat, nil), Widthptr)
|
||||
nam.Xoffset += int64(array_nel) - int64(array_array)
|
||||
nam.Xoffset += int64(slice_nel) - int64(slice_array)
|
||||
gdata(&nam, &v, Widthptr)
|
||||
nam.Xoffset += int64(array_cap) - int64(array_nel)
|
||||
nam.Xoffset += int64(slice_cap) - int64(slice_nel)
|
||||
gdata(&nam, &v, Widthptr)
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue