Exemplo n.º 1
0
 public static MonoInstall SmartInstall(DotNetProfile profile)
 {
     if (profile == DotNetProfile.Net45)
     {
         return(BleedingEdge);
     }
     return(TwoSix);
 }
Exemplo n.º 2
0
 public static NPath SmartProfilePath(DotNetProfile profile)
 {
     if (profile == DotNetProfile.Net45)
     {
         return(BleedingEdge.ProfilePath(profile));
     }
     return(TwoSix.ProfilePath(profile));
 }
 public void Initialize(ModuleDefinition mscorlib, DotNetProfile dotNetProfile)
 {
     this._mscorlib = mscorlib;
     if ((dotNetProfile != DotNetProfile.Net20) && (dotNetProfile != DotNetProfile.Unity))
     {
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "INotifyCollectionChanged", "Windows.UI.Xaml.Interop", "INotifyCollectionChanged");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedAction", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedAction");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedEventArgs", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedEventArgs");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedEventHandler", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedEventHandler");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "INotifyPropertyChanged", "Windows.UI.Xaml.Data", "INotifyPropertyChanged");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "PropertyChangedEventArgs", "Windows.UI.Xaml.Data", "PropertyChangedEventArgs");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "PropertyChangedEventHandler", "Windows.UI.Xaml.Data", "PropertyChangedEventHandler");
         this.AddProjection("System.ObjectModel", "System.Windows.Input", "ICommand", "Windows.UI.Xaml.Input", "ICommand");
         this.AddProjection("System.Runtime", "System", "AttributeTargets", "Windows.Foundation.Metadata", "AttributeTargets");
         this.AddProjection("System.Runtime", "System", "AttributeUsageAttribute", "Windows.Foundation.Metadata", "AttributeUsageAttribute");
         this.AddProjection("System.Runtime", "System", "DateTimeOffset", "Windows.Foundation", "DateTime");
         this.AddProjection("System.Runtime", "System", "EventHandler`1", "Windows.Foundation", "EventHandler`1");
         this.AddProjection("System.Runtime", "System", "Exception", "Windows.Foundation", "HResult");
         this.AddProjection("System.Runtime", "System", "IDisposable", "Windows.Foundation", "IClosable");
         this.AddProjection("System.Runtime", "System", "Nullable`1", "Windows.Foundation", "IReference`1");
         this.AddProjection("System.Runtime", "System", "TimeSpan", "Windows.Foundation", "TimeSpan");
         this.AddProjection("System.Runtime", "System", "Type", "Windows.UI.Xaml.Interop", "TypeName");
         this.AddProjection("System.Runtime", "System", "Uri", "Windows.Foundation", "Uri");
         this.AddProjection("System.Runtime", "System.Collections", "IEnumerable", "Windows.UI.Xaml.Interop", "IBindableIterable");
         this.AddProjection("System.Runtime", "System.Collections", "IList", "Windows.UI.Xaml.Interop", "IBindableVector");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IDictionary`2", "Windows.Foundation.Collections", "IMap`2");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IEnumerable`1", "Windows.Foundation.Collections", "IIterable`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IList`1", "Windows.Foundation.Collections", "IVector`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IReadOnlyDictionary`2", "Windows.Foundation.Collections", "IMapView`2");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IReadOnlyList`1", "Windows.Foundation.Collections", "IVectorView`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "KeyValuePair`2", "Windows.Foundation.Collections", "IKeyValuePair`2");
         this.AddProjection("System.Runtime.InteropServices.WindowsRuntime", "System.Runtime.InteropServices.WindowsRuntime", "EventRegistrationToken", "Windows.Foundation", "EventRegistrationToken");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Point", "Windows.Foundation", "Point");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Rect", "Windows.Foundation", "Rect");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Size", "Windows.Foundation", "Size");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.UI", "Color", "Windows.UI", "Color");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "CornerRadius", "Windows.UI.Xaml", "CornerRadius");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "Duration", "Windows.UI.Xaml", "Duration");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "DurationType", "Windows.UI.Xaml", "DurationType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "GridLength", "Windows.UI.Xaml", "GridLength");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "GridUnitType", "Windows.UI.Xaml", "GridUnitType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "Thickness", "Windows.UI.Xaml", "Thickness");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Controls.Primitives", "GeneratorPosition", "Windows.UI.Xaml.Controls.Primitives", "GeneratorPosition");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media", "Matrix", "Windows.UI.Xaml.Media", "Matrix");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "RepeatBehavior", "Windows.UI.Xaml.Media.Animation", "RepeatBehavior");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "RepeatBehaviorType", "Windows.UI.Xaml.Media.Animation", "RepeatBehaviorType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "KeyTime", "Windows.UI.Xaml.Media.Animation", "KeyTime");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Media3D", "Matrix3D", "Windows.UI.Xaml.Media.Media3D", "Matrix3D");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Matrix3x2", "Windows.Foundation.Numerics", "Matrix3x2");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Matrix4x4", "Windows.Foundation.Numerics", "Matrix4x4");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Plane", "Windows.Foundation.Numerics", "Plane");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Quaternion", "Windows.Foundation.Numerics", "Quaternion");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector2", "Windows.Foundation.Numerics", "Vector2");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector3", "Windows.Foundation.Numerics", "Vector3");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector4", "Windows.Foundation.Numerics", "Vector4");
     }
 }
 public void Initialize(ModuleDefinition mscorlib, DotNetProfile dotNetProfile)
 {
     this._mscorlib = mscorlib;
     if ((dotNetProfile != DotNetProfile.Net20) && (dotNetProfile != DotNetProfile.Unity))
     {
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "INotifyCollectionChanged", "Windows.UI.Xaml.Interop", "INotifyCollectionChanged");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedAction", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedAction");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedEventArgs", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedEventArgs");
         this.AddProjection("System.ObjectModel", "System.Collections.Specialized", "NotifyCollectionChangedEventHandler", "Windows.UI.Xaml.Interop", "NotifyCollectionChangedEventHandler");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "INotifyPropertyChanged", "Windows.UI.Xaml.Data", "INotifyPropertyChanged");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "PropertyChangedEventArgs", "Windows.UI.Xaml.Data", "PropertyChangedEventArgs");
         this.AddProjection("System.ObjectModel", "System.ComponentModel", "PropertyChangedEventHandler", "Windows.UI.Xaml.Data", "PropertyChangedEventHandler");
         this.AddProjection("System.ObjectModel", "System.Windows.Input", "ICommand", "Windows.UI.Xaml.Input", "ICommand");
         this.AddProjection("System.Runtime", "System", "AttributeTargets", "Windows.Foundation.Metadata", "AttributeTargets");
         this.AddProjection("System.Runtime", "System", "AttributeUsageAttribute", "Windows.Foundation.Metadata", "AttributeUsageAttribute");
         this.AddProjection("System.Runtime", "System", "DateTimeOffset", "Windows.Foundation", "DateTime");
         this.AddProjection("System.Runtime", "System", "EventHandler`1", "Windows.Foundation", "EventHandler`1");
         this.AddProjection("System.Runtime", "System", "Exception", "Windows.Foundation", "HResult");
         this.AddProjection("System.Runtime", "System", "IDisposable", "Windows.Foundation", "IClosable");
         this.AddProjection("System.Runtime", "System", "Nullable`1", "Windows.Foundation", "IReference`1");
         this.AddProjection("System.Runtime", "System", "TimeSpan", "Windows.Foundation", "TimeSpan");
         this.AddProjection("System.Runtime", "System", "Type", "Windows.UI.Xaml.Interop", "TypeName");
         this.AddProjection("System.Runtime", "System", "Uri", "Windows.Foundation", "Uri");
         this.AddProjection("System.Runtime", "System.Collections", "IEnumerable", "Windows.UI.Xaml.Interop", "IBindableIterable");
         this.AddProjection("System.Runtime", "System.Collections", "IList", "Windows.UI.Xaml.Interop", "IBindableVector");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IDictionary`2", "Windows.Foundation.Collections", "IMap`2");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IEnumerable`1", "Windows.Foundation.Collections", "IIterable`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IList`1", "Windows.Foundation.Collections", "IVector`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IReadOnlyDictionary`2", "Windows.Foundation.Collections", "IMapView`2");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "IReadOnlyList`1", "Windows.Foundation.Collections", "IVectorView`1");
         this.AddProjection("System.Runtime", "System.Collections.Generic", "KeyValuePair`2", "Windows.Foundation.Collections", "IKeyValuePair`2");
         this.AddProjection("System.Runtime.InteropServices.WindowsRuntime", "System.Runtime.InteropServices.WindowsRuntime", "EventRegistrationToken", "Windows.Foundation", "EventRegistrationToken");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Point", "Windows.Foundation", "Point");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Rect", "Windows.Foundation", "Rect");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.Foundation", "Size", "Windows.Foundation", "Size");
         this.AddProjection("System.Runtime.WindowsRuntime", "Windows.UI", "Color", "Windows.UI", "Color");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "CornerRadius", "Windows.UI.Xaml", "CornerRadius");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "Duration", "Windows.UI.Xaml", "Duration");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "DurationType", "Windows.UI.Xaml", "DurationType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "GridLength", "Windows.UI.Xaml", "GridLength");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "GridUnitType", "Windows.UI.Xaml", "GridUnitType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml", "Thickness", "Windows.UI.Xaml", "Thickness");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Controls.Primitives", "GeneratorPosition", "Windows.UI.Xaml.Controls.Primitives", "GeneratorPosition");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media", "Matrix", "Windows.UI.Xaml.Media", "Matrix");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "RepeatBehavior", "Windows.UI.Xaml.Media.Animation", "RepeatBehavior");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "RepeatBehaviorType", "Windows.UI.Xaml.Media.Animation", "RepeatBehaviorType");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Animation", "KeyTime", "Windows.UI.Xaml.Media.Animation", "KeyTime");
         this.AddProjection("System.Runtime.WindowsRuntime.UI.Xaml", "Windows.UI.Xaml.Media.Media3D", "Matrix3D", "Windows.UI.Xaml.Media.Media3D", "Matrix3D");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Matrix3x2", "Windows.Foundation.Numerics", "Matrix3x2");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Matrix4x4", "Windows.Foundation.Numerics", "Matrix4x4");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Plane", "Windows.Foundation.Numerics", "Plane");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Quaternion", "Windows.Foundation.Numerics", "Quaternion");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector2", "Windows.Foundation.Numerics", "Vector2");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector3", "Windows.Foundation.Numerics", "Vector3");
         this.AddProjection("System.Numerics.Vectors", "System.Numerics", "Vector4", "Windows.Foundation.Numerics", "Vector4");
     }
 }
Exemplo n.º 5
0
        private static string ProfileDirectoryName(DotNetProfile profile)
        {
            switch (profile)
            {
            case DotNetProfile.Unity:
                return("unity");

            case DotNetProfile.Net20:
                return("2.0");

            case DotNetProfile.Net45:
                return("4.5");
            }
            throw new InvalidOperationException($"Unknown profile : {profile}");
        }
Exemplo n.º 6
0
        private static string ProfileDirectoryName(DotNetProfile profile)
        {
            switch (profile)
            {
                case DotNetProfile.Unity:
                    return "unity";

                case DotNetProfile.Net20:
                    return "2.0";

                case DotNetProfile.Net45:
                    return "4.5";
            }
            throw new InvalidOperationException(string.Format("Unknown profile : {0}", profile));
        }
Exemplo n.º 7
0
 public static void SetToDefaults()
 {
     EmitNullChecks          = false;
     EnableStacktrace        = false;
     EnableDeepProfiler      = false;
     EnableStats             = false;
     EnableArrayBoundsCheck  = false;
     EnableErrorMessageTest  = false;
     EnableDivideByZeroCheck = false;
     EnableSymbolLoading     = false;
     EnablePrimitiveValueTypeGenericSharing = false;
     Dotnetprofile       = DotNetProfile.Net20;
     ProfilerOptions     = Unity.IL2CPP.ProfilerOptions.MethodEnterExit;
     DevelopmentMode     = false;
     DumpRuntimeStats    = false;
     ForceSerial         = Unity.IL2CPP.ParallelHelper.ForceSerialByDefault;
     ForceSerialBetaOnly = false;
 }
Exemplo n.º 8
0
 public static NPath SmartCompiler(DotNetProfile profile) =>
 BleedingEdge.Mcs;
Exemplo n.º 9
0
 public NPath ProfilePath(DotNetProfile profile)
 {
     string[] append     = new string[] { "lib/mono" };
     string[] textArray2 = new string[] { ProfileDirectoryName(profile) };
     return(this._installRoot.Combine(append).Combine(textArray2));
 }
Exemplo n.º 10
0
 public static NPath SmartCompiler(DotNetProfile profile)
 {
     if (profile == DotNetProfile.Net45)
     {
         return BleedingEdge.Mcs;
     }
     return TwoSix._Gmcs;
 }
Exemplo n.º 11
0
 public NPath ProfilePath(DotNetProfile profile)
 {
     string[] append = new string[] { "lib/mono" };
     string[] textArray2 = new string[] { ProfileDirectoryName(profile) };
     return this._installRoot.Combine(append).Combine(textArray2);
 }
Exemplo n.º 12
0
 public static NPath SmartProfilePath(DotNetProfile profile)
 {
     if (profile == DotNetProfile.Net45)
     {
         return BleedingEdge.ProfilePath(profile);
     }
     return TwoSix.ProfilePath(profile);
 }
Exemplo n.º 13
0
 public static MonoInstall SmartInstall(DotNetProfile profile)
 {
     if (profile == DotNetProfile.Net45)
     {
         return BleedingEdge;
     }
     return TwoSix;
 }
Exemplo n.º 14
0
        protected AssemblyConverter(NPath[] assemblies, NPath outputDir, NPath dataFolder, DotNetProfile dotNetProfile)
        {
            this._assemblies      = assemblies;
            this._outputDir       = outputDir;
            this._dataFolder      = dataFolder;
            this._debuggerSupport = DebuggerSupportFactory.GetDebuggerSupport();
            NPath[] searchDirectories = new NPath[] { assemblies[0].Parent, MonoInstall.SmartProfilePath(dotNetProfile) };
            bool    applyWindowsRuntimeProjections = CodeGenOptions.Dotnetprofile == DotNetProfile.Net45;

            this._assemblyLoader = new AssemblyLoader(searchDirectories, DebuggerOptions.Enabled || CodeGenOptions.EnableSymbolLoading, applyWindowsRuntimeProjections);
        }