type Callee … func (callee *Callee) String() string { … } type gobCallee … type returnOperandFlags … const nonTrivialResult … const untypedNilResult … type freeRef … type object … // AnalyzeCallee analyzes a function that is a candidate for inlining // and returns a Callee that describes it. The Callee object, which is // serializable, can be passed to one or more subsequent calls to // Inline, each with a different Caller. // // This design allows separate analysis of callers and callees in the // golang.org/x/tools/go/analysis framework: the inlining information // about a callee can be recorded as a "fact". // // The content should be the actual input to the compiler, not the // apparent source file according to any //line directives that // may be present within it. func AnalyzeCallee(logf func(string, ...any), fset *token.FileSet, pkg *types.Package, info *types.Info, decl *ast.FuncDecl, content []byte) (*Callee, error) { … } // parseCompact parses a Go source file of the form "package _\n func f() { ... }" // and returns the sole function declaration. func parseCompact(content []byte) (*token.FileSet, *ast.FuncDecl, error) { … } type paramInfo … // analyzeParams computes information about parameters of function fn, // including a simple "address taken" escape analysis. // // It returns two new arrays, one of the receiver and parameters, and // the other of the result variables of function fn. // // The input must be well-typed. func analyzeParams(logf func(string, ...any), fset *token.FileSet, info *types.Info, decl *ast.FuncDecl) (params, results []*paramInfo, effects []int, _ falconResult) { … } // addShadows returns the shadows set augmented by the set of names // locally shadowed at the location of the reference in the callee // (identified by the stack). The name of the reference itself is // excluded. // // These shadowed names may not be used in a replacement expression // for the reference. func addShadows(shadows map[string]bool, info *types.Info, exclude string, stack []ast.Node) map[string]bool { … } func isField(obj types.Object) bool { … } func isMethod(obj types.Object) bool { … } var _ … var _ … func (callee *Callee) GobEncode() ([]byte, error) { … } func (callee *Callee) GobDecode(data []byte) error { … }