Пример #1
0
 public void Compile(Compiler compiler)
 {
     RecvExpr.Compile(compiler);
     foreach (IExpr argExpr in ArgExprs)
     {
         argExpr.Compile(compiler);
     }
     compiler.Push(new InsnSend(Selector, ArgExprs.Count, mInfo));
 }
Пример #2
0
 public void Compile(Compiler compiler)
 {
     mFuncExpr.Compile(compiler);
     foreach (IExpr argExpr in mArgExprs)
     {
         argExpr.Compile(compiler);
     }
     compiler.Push(new InsnCall(mArgExprs.Count, mInfo));
 }
Пример #3
0
 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));
 }