(fr *callFrame)
| 838 | } |
| 839 | |
| 840 | func (ls *LState) frameFuncName(fr *callFrame) (string, bool) { |
| 841 | frame := fr.Parent |
| 842 | if frame == nil { |
| 843 | if ls.Parent == nil { |
| 844 | return "main chunk", true |
| 845 | } else { |
| 846 | return "corountine", true |
| 847 | } |
| 848 | } |
| 849 | if !frame.Fn.IsG { |
| 850 | pc := frame.Pc - 1 |
| 851 | for _, call := range frame.Fn.Proto.DbgCalls { |
| 852 | if call.Pc == pc { |
| 853 | name := call.Name |
| 854 | if (name == "?" || fr.TailCall > 0) && !fr.Fn.IsG { |
| 855 | name = fmt.Sprintf("<%v:%v>", fr.Fn.Proto.SourceName, fr.Fn.Proto.LineDefined) |
| 856 | } |
| 857 | return name, false |
| 858 | } |
| 859 | } |
| 860 | } |
| 861 | if !fr.Fn.IsG { |
| 862 | return fmt.Sprintf("<%v:%v>", fr.Fn.Proto.SourceName, fr.Fn.Proto.LineDefined), false |
| 863 | } |
| 864 | return "(anonymous)", false |
| 865 | } |
| 866 | |
| 867 | func (ls *LState) isStarted() bool { |
| 868 | return ls.currentFrame != nil |
no outgoing calls
no test coverage detected