build: use MOBILE_DYNAMIC instead of MONODROID
authorAaron Bockover <abock@xamarin.com>
Thu, 16 Jan 2014 19:13:10 +0000 (14:13 -0500)
committerAaron Bockover <abock@xamarin.com>
Thu, 16 Jan 2014 19:13:10 +0000 (14:13 -0500)
Some conditional compilation shouldn't really
be bound to MONODROID, instead add a new define
that can be reused, MOBILE_DYNAMIC.

mcs/build/profiles/monodroid.make
mcs/class/System.Core/System.Runtime.CompilerServices/ExecutionScope.cs
mcs/mcs/assign.cs
mcs/mcs/dynamic.cs
mcs/mcs/expression.cs
mcs/mcs/location.cs
mcs/mcs/support.cs

index 9504c8b2f8a2a6c9bf60fcbb2e0bc9377f0b9aea..7336ced7b7bb07cbc51d343dbdfb5ef900a1ead0 100644 (file)
@@ -12,7 +12,7 @@ profile-check:
        @:
 
 DEFAULT_REFERENCES = -r:mscorlib.dll
-PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
+PROFILE_MCS_FLAGS = -d:NET_1_1 -d:NET_2_0 -d:NET_2_1 -d:NET_3_5 -d:NET_4_0 -d:NET_4_5 -d:MOBILE -d:MOBILE_DYNAMIC -d:MONODROID -nowarn:1699 -nostdlib -lib:$(topdir)/class/lib/$(PROFILE) $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
 FRAMEWORK_VERSION = 2.1
 NO_TEST = yes
 
index 320e7a197b04906f0dbf79bd0b0cee37f93ff037..84458d94a20cbf35f18f66e6a4a7792a2fea490d 100644 (file)
@@ -33,7 +33,7 @@ using System.Linq.Expressions;
 
 namespace System.Runtime.CompilerServices {
 
-#if MONODROID
+#if MOBILE_DYNAMIC
        [Obsolete ("do not use this type", true)]
 #endif
        public class ExecutionScope {
@@ -42,12 +42,12 @@ namespace System.Runtime.CompilerServices {
                public object [] Locals;
                public ExecutionScope Parent;
 
-#if !MONODROID
+#if !MOBILE_DYNAMIC
                internal CompilationContext context;
 #endif
                internal int compilation_unit;
 
-#if !MONODROID
+#if !MOBILE_DYNAMIC
                ExecutionScope (CompilationContext context, int compilation_unit)
                {
                        this.context = context;
@@ -69,7 +69,7 @@ namespace System.Runtime.CompilerServices {
 #endif
                public Delegate CreateDelegate (int indexLambda, object [] locals)
                {
-#if MONODROID
+#if MOBILE_DYNAMIC
                        throw new NotSupportedException ();
 #else
                        return context.CreateDelegate (
@@ -80,7 +80,7 @@ namespace System.Runtime.CompilerServices {
 
                public object [] CreateHoistedLocals ()
                {
-#if MONODROID
+#if MOBILE_DYNAMIC
                        throw new NotSupportedException ();
 #else
                        return context.CreateHoistedLocals (compilation_unit);
@@ -89,7 +89,7 @@ namespace System.Runtime.CompilerServices {
 
                public Expression IsolateExpression (Expression expression, object [] locals)
                {
-#if MONODROID
+#if MOBILE_DYNAMIC
                        throw new NotSupportedException ();
 #else
                        return context.IsolateExpression (this, locals, expression);
index 714e953be0052518939d5d21d537479379568620..9481aef96edae4b6d66b28b161a9eeb43e0b5b44 100644 (file)
@@ -363,7 +363,7 @@ namespace Mono.CSharp {
                        return this;
                }
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
                {
                        var tassign = target as IDynamicAssign;
index 3627610a51c14cc7f27e59b99dd119992220a902..939984e5c6b41e972d3ce4e8facebc77bf89b276 100644 (file)
@@ -13,7 +13,7 @@ using System;
 using System.Linq;
 using SLE = System.Linq.Expressions;
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
 using System.Dynamic;
 #endif
 
@@ -63,7 +63,7 @@ namespace Mono.CSharp
        //
        public class RuntimeValueExpression : Expression, IDynamicAssign, IMemoryLocation
        {
-#if !NET_4_0 && !MONODROID
+#if !NET_4_0 && !MOBILE_DYNAMIC
                public class DynamicMetaObject
                {
                        public TypeSpec RuntimeType;
@@ -146,7 +146,7 @@ namespace Mono.CSharp
                        return base.MakeExpression (ctx);
 #else
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                                if (type.IsStruct && !obj.Expression.Type.IsValueType)
                                        return SLE.Expression.Unbox (obj.Expression, type.GetMetaInfo ());
 
@@ -181,7 +181,7 @@ namespace Mono.CSharp
                        return this;
                }
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
 #if STATIC
index c53baf91f8ae677c193b49cba17ce3bbc728a771..de639d70ce694a6d94c6e9af9556291970b28d01 100644 (file)
@@ -657,7 +657,7 @@ namespace Mono.CSharp
                                return is_checked ? SLE.Expression.NegateChecked (expr) : SLE.Expression.Negate (expr);
                        case Operator.LogicalNot:
                                return SLE.Expression.Not (expr);
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                        case Operator.OnesComplement:
                                return SLE.Expression.OnesComplement (expr);
 #endif
@@ -1340,7 +1340,7 @@ namespace Mono.CSharp
                }
 
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
                        var target = ((RuntimeValueExpression) expr).MetaObject.Expression;
@@ -1922,7 +1922,7 @@ namespace Mono.CSharp
                        temp_storage.Release (ec);
                }
 
-#if (NET_4_0 || MONODROID) && !STATIC
+#if (NET_4_0 || MOBILE_DYNAMIC) && !STATIC
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
                        return SLE.Expression.Default (type.GetMetaInfo ());
@@ -7421,7 +7421,7 @@ namespace Mono.CSharp
                        return data;
                }
 
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                public override SLE.Expression MakeExpression (BuilderContext ctx)
                {
 #if STATIC
@@ -9618,7 +9618,7 @@ namespace Mono.CSharp
 
                public SLE.Expression MakeAssignExpression (BuilderContext ctx, Expression source)
                {
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                        return SLE.Expression.ArrayAccess (ea.Expr.MakeExpression (ctx), MakeExpressionArguments (ctx));
 #else
                        throw new NotImplementedException ();
@@ -9797,7 +9797,7 @@ namespace Mono.CSharp
 #else
                        var value = new[] { source.MakeExpression (ctx) };
                        var args = Arguments.MakeExpression (arguments, ctx).Concat (value);
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                        return SLE.Expression.Block (
                                        SLE.Expression.Call (InstanceExpression.MakeExpression (ctx), (MethodInfo) Setter.GetMetaInfo (), args),
                                        value [0]);
index 10afaa1cc263a97ef0ff931eaaa422d01a822619..e7daa53ce0bd98a5f86aeba6f18d632b7f65690f 100644 (file)
@@ -222,7 +222,7 @@ namespace Mono.CSharp
                // </summary>
                static public void Initialize (List<SourceFile> files)
                {
-#if NET_4_0 || MONODROID
+#if NET_4_0 || MOBILE_DYNAMIC
                        source_list.AddRange (files);
 #else
                        source_list.AddRange (files.ToArray ());
index 8cbbc14680557a301ba3dcb59834d1b2f8c09012..be2f6a48583cfee7c23627d640ad7d46d0f22024 100644 (file)
@@ -36,7 +36,7 @@ namespace Mono.CSharp {
                        return System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode (obj);
                }
        }
-#if !NET_4_0 && !MONODROID
+#if !NET_4_0 && !MOBILE_DYNAMIC
        public class Tuple<T1, T2> : IEquatable<Tuple<T1, T2>>
        {
                public Tuple (T1 item1, T2 item2)