Adjust to disable IL generation under FULL_AOT_RUNTIME
authorMiguel de Icaza <miguel@gnome.org>
Mon, 24 Nov 2014 02:32:47 +0000 (21:32 -0500)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:07:38 +0000 (00:07 +0200)
mcs/class/referencesource/System/regex/system/text/regularexpressions/Regex.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexCompiler.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexOptions.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/RegexParser.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/compiledregexrunner.cs
mcs/class/referencesource/System/regex/system/text/regularexpressions/compiledregexrunnerfactory.cs

index 84d2654ff2340975b7458a24ee8c00d6581c7a4a..d2a174a2f3003bc63262dfa052bc639b1751e2c6 100644 (file)
@@ -13,7 +13,9 @@ namespace System.Text.RegularExpressions {
     using System.Threading;
     using System.Collections;
     using System.Reflection;
+#if !FULL_AOT_RUNTIME
     using System.Reflection.Emit;
+#endif
     using System.Globalization;
     using System.Security.Permissions;
     using System.Runtime.CompilerServices;
@@ -210,7 +212,7 @@ namespace System.Text.RegularExpressions {
              && (options & ~(RegexOptions.ECMAScript | 
                              RegexOptions.IgnoreCase | 
                              RegexOptions.Multiline |
-#if !SILVERLIGHT || FEATURE_LEGACYNETCF
+#if !(SILVERLIGHT) || FEATURE_LEGACYNETCF 
                              RegexOptions.Compiled | 
 #endif
                              RegexOptions.CultureInvariant
@@ -219,7 +221,7 @@ namespace System.Text.RegularExpressions {
 #endif
                                                )) != 0)
                 throw new ArgumentOutOfRangeException("options");
-        
+
             ValidateMatchTimeout(matchTimeout);
 
             // Try to look up this regex in the cache.  We do this regardless of whether useCache is true since there's
@@ -266,7 +268,7 @@ namespace System.Text.RegularExpressions {
                 refsInitialized = true;
             }
 
-#if !SILVERLIGHT
+#if !(SILVERLIGHT || FULL_AOT_RUNTIME)
             // if the compile option is set, then compile the code if it's not already
             if (UseOptionC() && factory == null) {
                 factory = Compile(code, roptions);
@@ -395,7 +397,7 @@ namespace System.Text.RegularExpressions {
         }  // private static TimeSpan InitDefaultMatchTimeout
 #endif  // !SILVERLIGHT
 
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !FULL_AOT_RUNTIME
         /* 
         * This method is here for perf reasons: if the call to RegexCompiler is NOT in the 
         * Regex constructor, we don't load RegexCompiler and its reflection classes when
@@ -1190,7 +1192,7 @@ namespace System.Text.RegularExpressions {
 
 
         
-#if !SILVERLIGHT
+#if !SILVERLIGHT || FULL_AOT_RUNTIME
         /// <devdoc>
         /// </devdoc>
 #if !DISABLE_CAS_USE
@@ -1341,7 +1343,7 @@ namespace System.Text.RegularExpressions {
             return newcached;
         }
 
-#if !SILVERLIGHT
+#if !(SILVERLIGHT||FULL_AOT_RUNTIME)
         /*
          * True if the O option was set
          */
index 63e77fa7d0442c829b1a39c6dbf2640a074d68c6..69fcc04a1eafc1b79bb484f7ad806712e6adc5a2 100644 (file)
@@ -9,7 +9,7 @@
 // subclass of the RegexRunner type.
 
 
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !FULL_AOT_RUNTIME
 
 namespace System.Text.RegularExpressions {
 
@@ -3273,7 +3273,7 @@ namespace System.Text.RegularExpressions {
             _typebuilder = null;
         }
 
-#if SILVERLIGHT        
+#if SILVERLIGHT
         internal void GenerateCreateType<TKey>(Type myCollectionType, FieldInfo field, Dictionary<TKey,int> ht) {
             MethodInfo addMethod = myCollectionType.GetMethod("Add", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
             
index c8a82f5341ddc6dd59ef1f601dabcec5afb64ec8..f9b05f8402f61bda46d83807514d3ba73140209d 100644 (file)
@@ -33,7 +33,7 @@ using System;
         ///    <para>[To be supplied.]</para>
         /// </devdoc>
         ExplicitCapture =          0x0004,      // "n"
-#if !SILVERLIGHT || FEATURE_LEGACYNETCF
+#if !SILVERLIGHT || FEATURE_LEGACYNETCF || MOBILE
         /// <devdoc>
         ///    <para>[To be supplied.]</para>
         /// </devdoc>
index b105e22a5a9d94a21ca410712a8ec8073b707822..8cf2d64a9db72d7fbd5253643d7d9e9cb7a25b28 100644 (file)
@@ -1336,7 +1336,7 @@ namespace System.Text.RegularExpressions {
          */
         internal bool IsOnlyTopOption(RegexOptions option) {
             return(option == RegexOptions.RightToLeft
-#if !SILVERLIGHT
+#if !(SILVERLIGHT||FULL_AOT_RUNTIME)
                 || option == RegexOptions.Compiled
 #endif
                 || option == RegexOptions.CultureInvariant
@@ -1476,7 +1476,7 @@ namespace System.Text.RegularExpressions {
                 ch += (char)('a' - 'A');
 
             switch (ch) {
-#if !SILVERLIGHT
+#if !(SILVERLIGHT||FULL_AOT_RUNTIME)
                 case 'c':
                     return RegexOptions.Compiled;
 #endif
index 266b8fb41ad46350ca60578d51a98b1417318b5a..0fdaf936fc4f37e6c36f77349062429aee09c2e8 100644 (file)
@@ -6,9 +6,9 @@
 
 using System;
 using System.Diagnostics;
-using System.Reflection.Emit;
 
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !FULL_AOT_RUNTIME
+using System.Reflection.Emit;
 
 namespace System.Text.RegularExpressions {
 
index 56545405b208cb730ecd072b9dfb4753aedea365..640758a4461a1e6ab52d039a3db54e118752d76b 100644 (file)
@@ -4,11 +4,11 @@
 // </copyright>                                                                
 //------------------------------------------------------------------------------
 
-using System.Reflection.Emit;
 using System.Diagnostics;
 using System.Security.Permissions;
 
-#if !SILVERLIGHT
+#if !SILVERLIGHT && !FULL_AOT_RUNTIME
+using System.Reflection.Emit;
 
 namespace System.Text.RegularExpressions {