diff options
Diffstat (limited to 'src/cmd/compile/internal/devirtualize/devirtualize.go')
| -rw-r--r-- | src/cmd/compile/internal/devirtualize/devirtualize.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/devirtualize/devirtualize.go b/src/cmd/compile/internal/devirtualize/devirtualize.go index 59ddc2e536..08af63c39e 100644 --- a/src/cmd/compile/internal/devirtualize/devirtualize.go +++ b/src/cmd/compile/internal/devirtualize/devirtualize.go @@ -182,6 +182,17 @@ const concreteTypeDebug = false // Returns nil when the concrete type could not be determined, or when there are multiple // (different) types assigned to an interface. func concreteType(s *State, n ir.Node) (typ *types.Type) { + if concreteTypeDebug { + base.Warn("concreteType(%v) - analyzing", n) + defer func() { + t := typ.String() + if typ == nil { + t = "<nil> (unknown static type)" + } + base.Warn("concreteType(%v) -> %v", n, t) + }() + } + typ = concreteType1(s, n, make(map[*ir.Name]struct{})) if typ == &noType { return nil @@ -207,6 +218,9 @@ func concreteType1(s *State, n ir.Node, seen map[*ir.Name]struct{}) (outT *types if outT != &noType { t = outT.String() } + if outT == nil { + t = "<nil> (unknown static type)" + } base.Warn("concreteType1(%v) -> %v", nn, t) }() } |
