private void CollectValidLines(StkId func) { Utl.Assert(func.V.TtIsFunction()); if (func.V.ClIsLuaClosure()) { var lcl = func.V.ClLValue(); var p = lcl.Proto; var lineinfo = p.LineInfo; var t = new LuaTable(this); Top.V.SetHValue(t); IncrTop(); var v = new TValue(); v.SetBValue(true); for (int i = 0; i < lineinfo.Count; ++i) { t.SetInt(lineinfo[i], ref v); } } else if (func.V.ClIsCsClosure()) { Top.V.SetNilValue(); IncrTop(); } else { throw new System.NotImplementedException(); } }
private void CollectValidLines( StkId func ) { Utl.Assert(func.V.TtIsFunction()); if(func.V.ClIsLuaClosure()) { var lcl = func.V.ClLValue(); var p = lcl.Proto; var lineinfo = p.LineInfo; var t = new LuaTable(this); Top.V.SetHValue(t); IncrTop(); var v = new TValue(); v.SetBValue(true); for( int i=0; i<lineinfo.Count; ++i ) t.SetInt(lineinfo[i], ref v); } else if(func.V.ClIsCsClosure()) { Top.V.SetNilValue(); IncrTop(); } else throw new System.NotImplementedException(); }