| 752 | } |
| 753 | |
| 754 | func (ls *LState) findLocal(frame *callFrame, no int) string { |
| 755 | fn := frame.Fn |
| 756 | if !fn.IsG { |
| 757 | if name, ok := fn.LocalName(no, frame.Pc-1); ok { |
| 758 | return name |
| 759 | } |
| 760 | } |
| 761 | var top int |
| 762 | if ls.currentFrame == frame { |
| 763 | top = ls.reg.Top() |
| 764 | } else if frame.Idx+1 < ls.stack.Sp() { |
| 765 | top = ls.stack.At(frame.Idx + 1).Base |
| 766 | } else { |
| 767 | return "" |
| 768 | } |
| 769 | if top-frame.LocalBase >= no { |
| 770 | return "(*temporary)" |
| 771 | } |
| 772 | return "" |
| 773 | } |
| 774 | |
| 775 | func (ls *LState) where(level int, skipg bool) string { |
| 776 | dbg, ok := ls.GetStack(level) |