public void Compile(Compiler compiler) { RecvExpr.Compile(compiler); foreach (IExpr argExpr in ArgExprs) { argExpr.Compile(compiler); } compiler.Push(new InsnSend(Selector, ArgExprs.Count, mInfo)); }
public void Compile(Compiler compiler) { mFuncExpr.Compile(compiler); foreach (IExpr argExpr in mArgExprs) { argExpr.Compile(compiler); } compiler.Push(new InsnCall(mArgExprs.Count, mInfo)); }
public void Compile(Compiler compiler) { Compiler bodyCompiler = new Compiler(compiler); if (mBodyExprs.Count == 0) { bodyCompiler.Push(new InsnPush(ValueNil.Instance)); } else { foreach (IExpr expr in mBodyExprs) { expr.Compile(bodyCompiler); bodyCompiler.Push(InsnPop.Instance); } bodyCompiler.Pop(); } bodyCompiler.Push(new InsnCall(1, mInfo)); ISList<IInsn> insns = bodyCompiler.GetResult(); compiler.Push(new InsnMakeClosure(mParams, insns, mInfo)); }