示例#1
0
            protected override void BeginImpl()
            {
                lbDecision = g.il.DefineLabel();
                lbDefault  = lbEnd = g.il.DefineLabel();

                expression.EmitGet(g);
                if (conv != null)
                {
                    conv.Emit(g, expression.Type, govType);
                }
                exp = g.il.DeclareLocal(govType);
                g.il.Emit(OpCodes.Stloc, exp);
                g.il.Emit(OpCodes.Br, lbDecision);
                g.reachable = false;
            }
示例#2
0
        internal void Convert(Operand op, Type to, bool allowExplicit)
        {
            Conversion conv = allowExplicit ? Conversion.GetExplicit(op, to, false) : Conversion.GetImplicit(op, to, false);

            conv.Emit(this, (object)op == null ? null : op.Type, to);
        }
示例#3
0
 public override void Emit(CodeGen g, Type from, Type to)
 {
     before.Emit(g, from, fromType);
     g.IL.Emit(OpCodes.Call, (MethodInfo)method.Member);
     after.Emit(g, toType, to);
 }