diff options
Diffstat (limited to 'go/callgraph/rta/rta.go')
-rw-r--r-- | go/callgraph/rta/rta.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/go/callgraph/rta/rta.go b/go/callgraph/rta/rta.go index e6b44606a..2e80415ff 100644 --- a/go/callgraph/rta/rta.go +++ b/go/callgraph/rta/rta.go @@ -39,13 +39,16 @@ // analysis, but the algorithm is much faster. For example, running the // cmd/callgraph tool on its own source takes ~2.1s for RTA and ~5.4s // for points-to analysis. -// package rta // import "golang.org/x/tools/go/callgraph/rta" // TODO(adonovan): test it by connecting it to the interpreter and // replacing all "unreachable" functions by a special intrinsic, and // ensure that that intrinsic is never called. +// TODO(zpavlinovic): decide if the clients must use ssa.InstantiateGenerics +// mode when building programs with generics. It might be possible to +// extend rta to accurately support generics with just ssa.BuilderMode(0). + import ( "fmt" "go/types" @@ -57,7 +60,6 @@ import ( // A Result holds the results of Rapid Type Analysis, which includes the // set of reachable functions/methods, runtime types, and the call graph. -// type Result struct { // CallGraph is the discovered callgraph. // It does not include edges for calls made via reflection. @@ -262,7 +264,6 @@ func (r *rta) visitFunc(f *ssa.Function) { // If buildCallGraph is true, Result.CallGraph will contain a call // graph; otherwise, only the other fields (reachable functions) are // populated. -// func Analyze(roots []*ssa.Function, buildCallGraph bool) *Result { if len(roots) == 0 { return nil @@ -341,7 +342,6 @@ func (r *rta) implementations(I *types.Interface) []types.Type { // addRuntimeType is called for each concrete type that can be the // dynamic type of some interface or reflect.Value. // Adapted from needMethods in go/ssa/builder.go -// func (r *rta) addRuntimeType(T types.Type, skip bool) { if prev, ok := r.result.RuntimeTypes.At(T).(bool); ok { if skip && !prev { |