(e ast.Expr)
| 975 | } |
| 976 | |
| 977 | func (c *coster) computeEntrySize(e ast.Expr) *entrySizeEstimate { |
| 978 | if sz, found := c.computedEntrySizes[e.ID()]; found { |
| 979 | return &sz |
| 980 | } |
| 981 | if e.Kind() == ast.IdentKind { |
| 982 | varName := e.AsIdent() |
| 983 | if v, ok := c.peekLocalVar(varName); ok && v.entrySize != nil { |
| 984 | return v.entrySize |
| 985 | } |
| 986 | } |
| 987 | return nil |
| 988 | } |
| 989 | |
| 990 | func computeExprSize(expr ast.Expr) *SizeEstimate { |
| 991 | var v uint64 |
no test coverage detected