if cs.Assign == nil {
return nil, nil, nil
}
- fih, ok := fpmap[cs.Callee]
+ funcInlHeur, ok := fpmap[cs.Callee]
if !ok {
// TODO: add an assert/panic here.
return nil, nil, nil
}
- if len(fih.props.ResultFlags) == 0 {
+ if len(funcInlHeur.props.ResultFlags) == 0 {
return nil, nil, nil
}
// Single return case.
- if len(fih.props.ResultFlags) == 1 {
+ if len(funcInlHeur.props.ResultFlags) == 1 {
asgn, ok := cs.Assign.(*ir.AssignStmt)
if !ok {
return nil, nil, nil
if !ok {
return nil, nil, nil
}
- return []*ir.Name{aname}, []*ir.Name{nil}, fih.props
+ return []*ir.Name{aname}, []*ir.Name{nil}, funcInlHeur.props
}
// Multi-return case
if !ok || !asgn.Def {
return nil, nil, nil
}
- userVars := make([]*ir.Name, len(fih.props.ResultFlags))
- autoTemps := make([]*ir.Name, len(fih.props.ResultFlags))
+ userVars := make([]*ir.Name, len(funcInlHeur.props.ResultFlags))
+ autoTemps := make([]*ir.Name, len(funcInlHeur.props.ResultFlags))
for idx, x := range asgn.Lhs {
if n, ok := x.(*ir.Name); ok {
userVars[idx] = n
return nil, nil, nil
}
}
- return userVars, autoTemps, fih.props
+ return userVars, autoTemps, funcInlHeur.props
}
func (rua *resultUseAnalyzer) nodeVisitPost(n ir.Node) {