| 204 | } |
| 205 | |
| 206 | func functionInfo(p Debug, f closure) (d Debug) { |
| 207 | d = p |
| 208 | if l, ok := f.(*luaClosure); !ok { |
| 209 | d.Source = "=[Go]" |
| 210 | d.LineDefined, d.LastLineDefined = -1, -1 |
| 211 | d.What = "Go" |
| 212 | } else { |
| 213 | p := l.prototype |
| 214 | d.Source = p.source |
| 215 | if d.Source == "" { |
| 216 | d.Source = "=?" |
| 217 | } |
| 218 | d.LineDefined, d.LastLineDefined = p.lineDefined, p.lastLineDefined |
| 219 | d.What = "Lua" |
| 220 | if d.LineDefined == 0 { |
| 221 | d.What = "main" |
| 222 | } |
| 223 | } |
| 224 | d.ShortSource = chunkID(d.Source) |
| 225 | return |
| 226 | } |
| 227 | |
| 228 | func (l *State) functionName(ci *callInfo) (name, kind string) { |
| 229 | if ci == &l.baseCallInfo { |