Beispiel #1
0
 public void TestAndroid()
 {
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.AndroidPath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
Beispiel #2
0
 public void TestOpenGlExe()
 {
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.OpenGlExePath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
Beispiel #3
0
 public void TestOpenGlLib()
 {
     // todo:
     // 1) class Condition method _getEffectiveTarget when it is returning Object it does not cast Interface to an Object, to replicate the issue change returning type to Object
     // 2) the same as 1) but in InterpolateValueAction when saving value 'value = this._target[this._property]'
     Il2Converter.Convert(
         Path.GetFullPath(CompilerHelper.OpenGlLibPath),
         CompilerHelper.OutputPath,
         CompilerHelper.GetConverterArgs(true));
 }
Beispiel #4
0
        public void TestMscorlibCompile_TypeTest()
        {
            // Do not forget to set MSCORLIB variable

            Il2Converter.Convert(
                Path.GetFullPath(
                    @"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false),
                new[] { "System.Diagnostics.Tracing.EventProvider" });
        }
Beispiel #5
0
        public void TestMscorlibCompile_ReducedBuild()
        {
            // Do not forget to set MSCORLIB variable

            Il2Converter.Convert(
                //Path.GetFullPath(@"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.MscorlibPath,
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false),
                new[]
            {
                "System.Object",
            });
        }
Beispiel #6
0
        public void TestCoreLib()
        {
            Il2Converter.Convert(
                Path.GetFullPath(CompilerHelper.CoreLibPath),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false));

            if (CompilerHelper.CompileWithOptimization)
            {
                CompilerHelper.ExecCmd("opt", "CoreLib.ll -o CoreLib.bc -O2");
                CompilerHelper.ExecCmd(
                    "llc",
                    string.Format("-filetype=obj -mtriple={0} CoreLib.bc", CompilerHelper.Target));
            }
            else
            {
                CompilerHelper.ExecCmd(
                    "llc",
                    string.Format("-filetype=obj -mtriple={0} CoreLib.ll", CompilerHelper.Target));
            }
        }
Beispiel #7
0
        public void TestMscorlibCompile()
        {
            // TODO: if you have undefined symbols, remove all linkodr_once and see which symbol is not defined

            // Do not forget to set MSCORLIB variable

            // you need to compile it with optimization, otherwise it will not be compiled as being to big

            /*
             *  IF NOT EXIST mscorlib.obj opt mscorlib.ll -o mscorlib.bc -O2
             *  IF NOT EXIST mscorlib.obj llc -filetype=obj -mtriple=i686-w64-mingw32 mscorlib.bc
             *  opt test-1.ll -o test-1.bc -O3
             *  llc -filetype=obj -mtriple=i686-w64-mingw32 test-1.bc
             *  g++.exe -o test-1.exe mscorlib.obj test-1.obj -lstdc++ -lgc-lib -march=i686 -L .
             *  del test-1.obj
             *  del test-1.bc
             */

            // alternative way to compile

            /*
             *  llvm-link -o=test-1.bc test-1.ll mscorlib.ll
             *  llc -filetype=obj -mtriple=i686-w64-mingw32 test-1.bc
             *  g++.exe -o test-1.exe test-1.obj -lstdc++ -lgc-lib -march=i686 -L .
             *  del test-1.o
             */

            // WHAT TODO here
            // remove static dependancy on count of interfaces
            // adjust creating string as MSCORLIB does
            // adjust creating RuntimeType as MSCORLIB does

            Il2Converter.Convert(
                Path.GetFullPath(
                    @"C:\Windows\Microsoft.NET\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll"),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false, stubs: true));
        }
Beispiel #8
0
        public void TestMscolibCSNative()
        {
            // TODO: if you have undefined symbols, remove all linkodr_once and see which symbol is not defined

            Il2Converter.Convert(
                Path.GetFullPath(CompilerHelper.MscorlibPath),
                CompilerHelper.OutputPath,
                CompilerHelper.GetConverterArgs(false, stubs: true));

            ////if (CompilerHelper.CompileWithOptimization)
            ////{
            ////    CompilerHelper.ExecCmd("opt", "CoreLib.ll -o CoreLib.bc -O2");
            ////    CompilerHelper.ExecCmd(
            ////        "llc",
            ////        string.Format("-filetype=obj -mtriple={0} mscorlib.bc", CompilerHelper.Target));
            ////}
            ////else
            ////{
            ////    CompilerHelper.ExecCmd(
            ////        "llc",
            ////        string.Format("-filetype=obj -mtriple={0} mscorlib.ll", CompilerHelper.Target));
            ////}
        }