internal static T Compile <T>(Type type, ILProgram program) where T : ILStruct, new() { var source = new T { Type = type, Program = program }; source.Compile(); return(source); }
internal static T Compile <T>(MethodInfo info, ILProgram program) where T : ILSource, new() { var source = new T { Info = info, Program = program }; source.Compile(); var kernel = info.GetCustomAttribute <KernelAttribute>(); if (kernel != null) { source.IsKernel = true; } return(source); }