public override void Emit(IlCompilerContext ctx)
 {
     _expression.Emit(ctx);
     ctx.StackDepth--;
     ctx.Il.Emit(OpCodes.Castclass, _type);
     ctx.StackDepth++;
 }
 public override void Emit(IlCompilerContext ctx)
 {
     _target.Emit(ctx);
     _value.Emit(ctx);
     ctx.Il.Emit(OpCodes.Stfld, _field);
     ctx.StackDepth -= 2;
 }
 public override void Emit(IlCompilerContext ctx)
 {
     _target.Emit(ctx);
     ctx.StackDepth--;
     foreach (var arg in _args)
     {
         arg.Emit(ctx);
         ctx.StackDepth--;
     }
     if (_method.IsVirtual)
     {
         ctx.Il.EmitCall(OpCodes.Callvirt, _method, null);
     }
     else
     {
         ctx.Il.EmitCall(OpCodes.Call, _method, null);
     }
     if (_method.ReturnType != typeof(void))
     {
         ctx.StackDepth++;
     }
 }
 public override void Emit(IlCompilerContext ctx)
 {
     _value.Emit(ctx);
     ctx.Il.Emit(OpCodes.Stloc, _variable.VariableIndex);
     ctx.StackDepth--;
 }
 public override void Emit(IlCompilerContext ctx)
 {
     _target.Emit(ctx);
     ctx.Il.Emit(OpCodes.Ldfld, _field);
     //we are still at the same stack size as we consumed the target
 }
 public override void Emit(IlCompilerContext ctx)
 {
     _expression.Emit(ctx);
     ctx.Il.Emit(OpCodes.Unbox_Any, _type);
 }