public int Compile(ByteCode bc, Func <int> afterDecl, string friendlyName) { using (bc.EnterSource(_begin)) { var symbs = _closure.ToArray(); _closureInstruction = bc.Emit_Closure(symbs, bc.GetJumpPointForNextInstruction()); int ops = afterDecl(); _closureInstruction.NumVal += 2 + ops; } return(this.CompileBody(bc, friendlyName)); }
public int Compile(ByteCode bc, Func <int> afterDecl, string friendlyName) { using (bc.EnterSource(m_Begin)) { SymbolRef[] symbs = m_Closure //.Select((s, idx) => s.CloneLocalAndSetFrame(m_ClosureFrames[idx])) .ToArray(); m_ClosureInstruction = bc.Emit_Closure(symbs, bc.GetJumpPointForNextInstruction()); int ops = afterDecl(); m_ClosureInstruction.NumVal += 2 + ops; } return(CompileBody(bc, friendlyName)); }