aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/gc/walk.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/gc/walk.go')
-rw-r--r--src/cmd/compile/internal/gc/walk.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/compile/internal/gc/walk.go b/src/cmd/compile/internal/gc/walk.go
index b7cf313938..9291301f36 100644
--- a/src/cmd/compile/internal/gc/walk.go
+++ b/src/cmd/compile/internal/gc/walk.go
@@ -380,9 +380,9 @@ func convFuncName(from, to *types.Type) (fnname string, needsaddr bool) {
switch {
case from.Size() == 2 && from.Align == 2:
return "convT16", false
- case from.Size() == 4 && from.Align == 4 && !types.Haspointers(from):
+ case from.Size() == 4 && from.Align == 4 && !from.HasPointers():
return "convT32", false
- case from.Size() == 8 && from.Align == types.Types[TUINT64].Align && !types.Haspointers(from):
+ case from.Size() == 8 && from.Align == types.Types[TUINT64].Align && !from.HasPointers():
return "convT64", false
}
if sc := from.SoleComponent(); sc != nil {
@@ -396,12 +396,12 @@ func convFuncName(from, to *types.Type) (fnname string, needsaddr bool) {
switch tkind {
case 'E':
- if !types.Haspointers(from) {
+ if !from.HasPointers() {
return "convT2Enoptr", true
}
return "convT2E", true
case 'I':
- if !types.Haspointers(from) {
+ if !from.HasPointers() {
return "convT2Inoptr", true
}
return "convT2I", true
@@ -1405,7 +1405,7 @@ opswitch:
copylen := nod(OLEN, n.Right, nil)
copyptr := nod(OSPTR, n.Right, nil)
- if !types.Haspointers(t.Elem()) && n.Bounded() {
+ if !t.Elem().HasPointers() && n.Bounded() {
// When len(to)==len(from) and elements have no pointers:
// replace make+copy with runtime.mallocgc+runtime.memmove.
@@ -2855,7 +2855,7 @@ func isAppendOfMake(n *Node) bool {
// s = s[:n]
// lptr := &l1[0]
// sptr := &s[0]
-// if lptr == sptr || !hasPointers(T) {
+// if lptr == sptr || !T.HasPointers() {
// // growslice did not clear the whole underlying array (or did not get called)
// hp := &s[len(l1)]
// hn := l2 * sizeof(T)
@@ -2936,7 +2936,7 @@ func extendslice(n *Node, init *Nodes) *Node {
hn = conv(hn, types.Types[TUINTPTR])
clrname := "memclrNoHeapPointers"
- hasPointers := types.Haspointers(elemtype)
+ hasPointers := elemtype.HasPointers()
if hasPointers {
clrname = "memclrHasPointers"
Curfn.Func.setWBPos(n.Pos)