public static void InitializeFields(CodeContext context, Type type, bool reusable) { if (type == null) { return; } const string slotStorageName = "#SlotStorage"; foreach (FieldInfo fi in type.GetFields()) { if (fi.Name.StartsWith(slotStorageName)) { object value; if (reusable) { value = ConstantPool.GetConstantDataReusable(Int32.Parse(fi.Name.Substring(slotStorageName.Length))); } else { value = ConstantPool.GetConstantData(Int32.Parse(fi.Name.Substring(slotStorageName.Length))); } Debug.Assert(value != null); FastDynamicSite fds = value as FastDynamicSite; if (fds != null) { fds.Context = context; } fi.SetValue(null, value); } } }
public Tret FastInvoke6(FastDynamicSite <T0, T1, T2, T3, T4, T5, Tret> site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) { return(site.UpdateBindingAndInvoke(arg0, arg1, arg2, arg3, arg4, arg5)); }
public Tret FastInvoke2(FastDynamicSite <T0, T1, Tret> site, T0 arg0, T1 arg1) { return(site.UpdateBindingAndInvoke(arg0, arg1)); }
public Tret FastInvoke4(FastDynamicSite <T0, T1, T2, T3, Tret> site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) { return(site.UpdateBindingAndInvoke(arg0, arg1, arg2, arg3)); }
public Tret FastInvoke1(FastDynamicSite <T0, Tret> site, T0 arg0) { return(site.UpdateBindingAndInvoke(arg0)); }