Exemple #1
0
        // this method resolves types in IKVM.Runtime.dll
        // (the version of IKVM.Runtime.dll that we're running
        // with can be different from the one we're compiling against.)
        internal static Type LoadType(Type type)
        {
#if STATIC_COMPILER || STUB_GENERATOR
            return(StaticCompiler.GetRuntimeType(type.FullName));
#else
            return(type);
#endif
        }
    static MethodHandleUtil()
    {
#if STATIC_COMPILER
        typeofMHA = StaticCompiler.GetRuntimeType("IKVM.Runtime.MHA`8");
        typeofMHV = new Type[] {
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`1"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`2"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`3"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`4"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`5"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`6"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`7"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MHV`8"),
        };
        typeofMH = new Type[] {
            null,
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`1"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`2"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`3"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`4"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`5"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`6"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`7"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`8"),
            StaticCompiler.GetRuntimeType("IKVM.Runtime.MH`9"),
        };
#else
        typeofMHA = typeof(IKVM.Runtime.MHA <, , , , , , ,>);
        typeofMHV = new Type[] {
            typeof(IKVM.Runtime.MHV),
            typeof(IKVM.Runtime.MHV <>),
            typeof(IKVM.Runtime.MHV <,>),
            typeof(IKVM.Runtime.MHV <, ,>),
            typeof(IKVM.Runtime.MHV <, , ,>),
            typeof(IKVM.Runtime.MHV <, , , ,>),
            typeof(IKVM.Runtime.MHV <, , , , ,>),
            typeof(IKVM.Runtime.MHV <, , , , , ,>),
            typeof(IKVM.Runtime.MHV <, , , , , , ,>),
        };
        typeofMH = new Type[] {
            null,
            typeof(IKVM.Runtime.MH <>),
            typeof(IKVM.Runtime.MH <,>),
            typeof(IKVM.Runtime.MH <, ,>),
            typeof(IKVM.Runtime.MH <, , ,>),
            typeof(IKVM.Runtime.MH <, , , ,>),
            typeof(IKVM.Runtime.MH <, , , , ,>),
            typeof(IKVM.Runtime.MH <, , , , , ,>),
            typeof(IKVM.Runtime.MH <, , , , , , ,>),
            typeof(IKVM.Runtime.MH <, , , , , , , ,>),
        };
#endif
    }
Exemple #3
0
 internal static Type LoadType(System.Type type)
 {
     return(StaticCompiler.GetRuntimeType(type.FullName));
 }