From a80cbc25bddfa1e6be76cf539ae9276d41b5108f Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Fri, 24 Sep 2021 14:55:06 -0700 Subject: runtime: elide instantiated types in tracebacks They tend to be things like ".shape.int" which are noisy, if not otherwise confusing. It would be nice to somehow print the real instantiations here, but that requires keeping track of the dictionary argument so the instantiating types could be found. One day, maybe, but not today. Fixes #48578 Change-Id: I0968d24e110b6d47c9468c45372a6979575a8d29 Reviewed-on: https://go-review.googlesource.com/c/go/+/352118 Trust: Keith Randall Trust: Dan Scales Run-TryBot: Keith Randall TryBot-Result: Go Bot Reviewed-by: Dan Scales --- src/cmd/link/internal/loader/loader.go | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/cmd/link/internal/loader/loader.go') diff --git a/src/cmd/link/internal/loader/loader.go b/src/cmd/link/internal/loader/loader.go index dcc33b966b..4bf5475a32 100644 --- a/src/cmd/link/internal/loader/loader.go +++ b/src/cmd/link/internal/loader/loader.go @@ -752,22 +752,6 @@ func (l *Loader) NReachableSym() int { return l.attrReachable.Count() } -// SymNameLen returns the length of the symbol name, trying hard not to load -// the name. -func (l *Loader) SymNameLen(i Sym) int { - // Not much we can do about external symbols. - if l.IsExternal(i) { - return len(l.SymName(i)) - } - r, li := l.toLocal(i) - le := r.Sym(li).NameLen(r.Reader) - if !r.NeedNameExpansion() { - return le - } - // Just load the symbol name. We don't know how expanded it'll be. - return len(l.SymName(i)) -} - // Returns the raw (unpatched) name of the i-th symbol. func (l *Loader) RawSymName(i Sym) string { if l.IsExternal(i) { -- cgit v1.3