static public ILMethodInvokation GetTechnicalInstanceILMethodInvokation(this ILValue item, string name, IEnumerable <ILValue> arguments) { return(item.GetILMethodInvokation( item.GetValueType().GetTechnicalInstanceMethod(name, arguments.GetValueTypes()), arguments )); }
static public void UseLocalValue(this ILCanvas item, ILValue value, Process <ILLocal> process) { item.UseLocal(value.GetValueType(), delegate(ILLocal local) { local.RenderIL_Store(item, value); process(local); }); }
static public ILConstructorInvokation GetBaseILConstructor(this ILValue item, IEnumerable <ILValue> arguments) { return(item.GetILConstructorInvokation( item.GetValueType().BaseType.GetInstanceConstructor(arguments.GetValueTypes()), arguments )); }
static private ILValue GetILCast(this ILValue item, Type destination_type, Operation <ILCast, Type, ILValue> operation) { if (item.GetValueType().CanILTreatAs(destination_type)) { return(item); } return(operation(destination_type, item)); }
public override void RenderIL_Execute(ILCanvas canvas) { value.RenderIL_Load(canvas); if (value.GetValueType().IsVoidType() == false) { canvas.Emit_Pop(); } }
public ILLoadStatement(Operation <ILValue, ILBlock> o) { ILBlock block = new ILBlock(); ILValue value = o(block); block.AddStatement(new ILLoad(value)); type = value.GetValueType(); statement = block; }
public ILLocal CreateCementedLocal(ILValue value) { ILLocal local; if (value.Convert <ILLocal>(out local)) { if (local.IsCemented()) { return(local); } } return(cemented_locals.AddAndGet(new ILLocal(value.GetValueType(), null, value, true)) .Chain(l => AddStatement(new ILInitializeLocal(l)))); }
static public BasicType GetValueBasicType(this ILValue item) { return(item.GetValueType().GetBasicType()); }
static public ILField GetILField(this ILValue item, string name) { return(item.GetILField(item.GetValueType().GetInstanceField(name))); }
public override Type GetValueType() { return(true_value.GetValueType().GetCommonAncestor(false_value.GetValueType())); }
static public ILCast NewExplicitCast(Type d, ILValue v) { return(new ILCast(ILCastInfos.GetExplicitILCastInfo(v.GetValueType(), d), v)); }
static public ILCast NewThinCast(Type d, ILValue v) { return(new ILCast(ILCastInfos.GetThinILCastInfo(v.GetValueType(), d), v)); }
public ILBinaryOperatorInvokation(BinaryOperatorType o, ILValue l, ILValue r) : this(l.GetValueType().GetBinaryOperator(r.GetValueType(), o), l, r) { }
public ILIndexed(ILValue t, ILValue i) : this(t.GetValueType().GetIndexer(i.GetValueType()), t, i) { }
static public ILCast NewCustomCast(Type d, ILValue v, bool cou, bool aio, bool aeo) { return(new ILCast(ILCastInfos.GetILCastInfo(v.GetValueType(), d, cou, aio, aeo), v)); }
static public void RenderIL_LoadAddressInternal(this ILValue item, ILCanvas canvas) { item.RenderIL_Load(canvas); canvas.MakeAddressImmediate(item.GetValueType()); }
public ILUnaryOperatorInvokation(UnaryOperatorType o, ILValue i) : this(i.GetValueType().GetUnaryOperator(o), i) { }