| 652 | } |
| 653 | |
| 654 | func (ls *LState) findLocal(frame *callFrame, no int) string { |
| 655 | fn := frame.Fn |
| 656 | if !fn.IsG { |
| 657 | if name, ok := fn.LocalName(no, frame.Pc-1); ok { |
| 658 | return name |
| 659 | } |
| 660 | } |
| 661 | var top int |
| 662 | if ls.currentFrame == frame { |
| 663 | top = ls.reg.Top() |
| 664 | } else if frame.Idx+1 < ls.stack.Sp() { |
| 665 | top = ls.stack.At(frame.Idx + 1).Base |
| 666 | } else { |
| 667 | return "" |
| 668 | } |
| 669 | if top-frame.LocalBase >= no { |
| 670 | return "(*temporary)" |
| 671 | } |
| 672 | return "" |
| 673 | } |
| 674 | |
| 675 | func (ls *LState) where(level int, skipg bool) string { |
| 676 | dbg, ok := ls.GetStack(level) |