package ir
import (
+ "cmd/compile/internal/base"
"cmd/compile/internal/types"
"cmd/internal/src"
"fmt"
const (
miniWalkdefShift = 0 // TODO(mdempsky): Move to Name.flags.
miniTypecheckShift = 2
- miniDiag = 1 << 4
miniWalked = 1 << 5 // to prevent/catch re-walking
)
n.bits.set2(miniTypecheckShift, x)
}
-func (n *miniNode) Diag() bool { return n.bits&miniDiag != 0 }
-func (n *miniNode) SetDiag(x bool) { n.bits.set(miniDiag, x) }
+func (n *miniNode) Diag() bool { return false }
+func (n *miniNode) SetDiag(x bool) { base.AssertfAt(!x, n.Pos(), "SetDiag") }
func (n *miniNode) Walked() bool { return n.bits&miniWalked != 0 }
func (n *miniNode) SetWalked(x bool) { n.bits.set(miniWalked, x) }
const (
typeNotInHeap = 1 << iota // type cannot be heap allocated
- typeBroke // broken type definition
typeNoalg // suppress hash and eq algorithm generation
typeDeferwidth // width computation has been deferred and type is on deferredTypeStack
typeRecur
)
func (t *Type) NotInHeap() bool { return t.flags&typeNotInHeap != 0 }
-func (t *Type) Broke() bool { return t.flags&typeBroke != 0 }
+func (t *Type) Broke() bool { return false }
func (t *Type) Noalg() bool { return t.flags&typeNoalg != 0 }
func (t *Type) Deferwidth() bool { return t.flags&typeDeferwidth != 0 }
func (t *Type) Recur() bool { return t.flags&typeRecur != 0 }
func (t *Type) HasShape() bool { return t.flags&typeHasShape != 0 }
func (t *Type) SetNotInHeap(b bool) { t.flags.set(typeNotInHeap, b) }
-func (t *Type) SetBroke(b bool) { t.flags.set(typeBroke, b) }
+func (t *Type) SetBroke(b bool) { base.Assertf(!b, "SetBroke") }
func (t *Type) SetNoalg(b bool) { t.flags.set(typeNoalg, b) }
func (t *Type) SetDeferwidth(b bool) { t.flags.set(typeDeferwidth, b) }
func (t *Type) SetRecur(b bool) { t.flags.set(typeRecur, b) }