diff options
author | Alan Donovan <adonovan@google.com> | 2014-12-29 13:20:22 -0500 |
---|---|---|
committer | Alan Donovan <adonovan@google.com> | 2015-01-22 14:03:32 +0000 |
commit | f011631cea2c67954dff8b1551b6998d54a99feb (patch) | |
tree | 1eae4c52d34403659244fab9032aad581f25aa65 /go/ssa/ssautil/visit.go | |
parent | e079f6c63283585db69001a632951cc88c70b052 (diff) | |
download | golang-x-tools-f011631cea2c67954dff8b1551b6998d54a99feb.tar.gz |
go/ssa: simplify TypesWithMethodSets
Details:
- rename (*Program).TypesWithMethodSets() to RuntimeTypes()
- delete (*Package).TypesWithMethodSets() method and simplify
- move code to methods.go
- update test to use
1-2% improvement in space and time (though I barely trust this data
because the GC at tip is in such terrible state).
Change-Id: I38eab78b11e0ad0ff16e0530e775b6ff6a2ab246
Reviewed-on: https://go-review.googlesource.com/3148
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'go/ssa/ssautil/visit.go')
-rw-r--r-- | go/ssa/ssautil/visit.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/go/ssa/ssautil/visit.go b/go/ssa/ssautil/visit.go index 14de15400..30843c3cb 100644 --- a/go/ssa/ssautil/visit.go +++ b/go/ssa/ssautil/visit.go @@ -41,7 +41,7 @@ func (visit *visitor) program() { } } } - for _, T := range visit.prog.TypesWithMethodSets() { + for _, T := range visit.prog.RuntimeTypes() { mset := visit.prog.MethodSets.MethodSet(T) for i, n := 0, mset.Len(); i < n; i++ { visit.function(visit.prog.Method(mset.At(i))) |