Remove disabled FEATURE_NORM_IDNA_ONLY
authordanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 17:59:09 +0000 (09:59 -0800)
committerdanmosemsft <danmose@microsoft.com>
Mon, 23 Jan 2017 18:30:48 +0000 (10:30 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/c54bd618d0c3415facef49b25913f3747af4c258

src/coreclr/clr.defines.targets
src/coreclr/src/mscorlib/src/System/String.cs
src/coreclr/src/mscorlib/src/System/Text/Encoding.cs
src/coreclr/src/mscorlib/src/System/Text/Latin1Encoding.cs
src/coreclr/src/mscorlib/src/System/Text/Normalization.Windows.cs
src/coreclr/src/mscorlib/src/System/Text/Normalization.cs

index cb374e6..f381513 100644 (file)
@@ -61,7 +61,6 @@
         <CDefines Condition="'$(FeatureMultiModuleAssemblies)' == 'true'">$(CDefines);FEATURE_MULTIMODULE_ASSEMBLIES</CDefines>
         <CDefines Condition="'$(FeatureNativeImageGeneration)' == 'true'">$(CDefines);FEATURE_NATIVE_IMAGE_GENERATION</CDefines>
         <CDefines Condition="'$(FeatureNongenericCollections)' == 'true'">$(CDefines);FEATURE_NONGENERIC_COLLECTIONS</CDefines>
-        <CDefines Condition="'$(FeatureNormIdnaOnly)' == 'true'">$(CDefines);FEATURE_NORM_IDNA_ONLY</CDefines>
         <CDefines Condition="'$(FeaturePal)' == 'true'">$(CDefines);FEATURE_PAL</CDefines>
         <CDefines Condition="'$(FeaturePerfmon)' == 'true'">$(CDefines);FEATURE_PERFMON</CDefines>
         <CDefines Condition="'$(FeaturePls)' == 'true'">$(CDefines);FEATURE_PLS</CDefines>
         <DefineConstants Condition="'$(FeatureManagedEtw)' == 'true'">$(DefineConstants);FEATURE_MANAGED_ETW</DefineConstants>
         <DefineConstants Condition="'$(FeatureMultiModuleAssemblies)' == 'true'">$(DefineConstants);FEATURE_MULTIMODULE_ASSEMBLIES</DefineConstants>
         <DefineConstants Condition="'$(FeatureNongenericCollections)' == 'true'">$(DefineConstants);FEATURE_NONGENERIC_COLLECTIONS</DefineConstants>
-        <DefineConstants Condition="'$(FeatureNormIdnaOnly)' == 'true'">$(DefineConstants);FEATURE_NORM_IDNA_ONLY</DefineConstants>
         <DefineConstants Condition="'$(FeaturePal)' == 'true'">$(DefineConstants);FEATURE_PAL</DefineConstants>
         <DefineConstants Condition="'$(FeaturePathCompat)' == 'true'">$(DefineConstants);FEATURE_PATHCOMPAT</DefineConstants>
         <DefineConstants Condition="'$(FeatureXplatEventSource)' == 'true'">$(DefineConstants);FEATURE_EVENTSOURCE_XPLAT</DefineConstants>
index 27758b7..5a8e167 100644 (file)
@@ -331,18 +331,12 @@ namespace System {
         // These just wrap calls to Normalization class
         public bool IsNormalized()
         {
-#if !FEATURE_NORM_IDNA_ONLY
             // Default to Form C
             return IsNormalized(NormalizationForm.FormC);
-#else
-            // Default to Form IDNA
-            return IsNormalized((NormalizationForm)ExtendedNormalizationForms.FormIdna);
-#endif
         }
 
         public bool IsNormalized(NormalizationForm normalizationForm)
         {
-#if !FEATURE_NORM_IDNA_ONLY
             if (this.IsFastSort())
             {
                 // If its FastSort && one of the 4 main forms, then its already normalized
@@ -352,24 +346,17 @@ namespace System {
                     normalizationForm == NormalizationForm.FormKD )
                     return true;
             }            
-#endif // !FEATURE_NORM_IDNA_ONLY            
             return Normalization.IsNormalized(this, normalizationForm);
         }
 
         public String Normalize()
         {
-#if !FEATURE_NORM_IDNA_ONLY
             // Default to Form C
             return Normalize(NormalizationForm.FormC);
-#else
-            // Default to Form IDNA
-            return Normalize((NormalizationForm)ExtendedNormalizationForms.FormIdna);
-#endif
         }
 
         public String Normalize(NormalizationForm normalizationForm)
         {
-#if !FEATURE_NORM_IDNA_ONLY        
             if (this.IsAscii())
             {
                 // If its FastSort && one of the 4 main forms, then its already normalized
@@ -379,7 +366,6 @@ namespace System {
                     normalizationForm == NormalizationForm.FormKD )
                     return this;
             }
-#endif // !FEATURE_NORM_IDNA_ONLY            
             return Normalization.Normalize(this, normalizationForm);
         }
 
index e4fec89..dece2e9 100644 (file)
@@ -1186,11 +1186,7 @@ namespace System.Text
         [System.Runtime.InteropServices.ComVisible(false)]
         public bool IsAlwaysNormalized()
         {
-#if !FEATURE_NORM_IDNA_ONLY        
             return this.IsAlwaysNormalized(NormalizationForm.FormC);
-#else
-            return this.IsAlwaysNormalized((NormalizationForm)ExtendedNormalizationForms.FormIdna);
-#endif
         }
 
         [Pure]
index 56a6c1f..8fe8f89 100644 (file)
@@ -488,7 +488,6 @@ namespace System.Text
             }
         }
 
-#if !FEATURE_NORM_IDNA_ONLY
         public override bool IsAlwaysNormalized(NormalizationForm form)
         {
             // Latin-1 contains precomposed characters, so normal for Form C.
@@ -498,7 +497,6 @@ namespace System.Text
             // Only true for form C.
             return (form == NormalizationForm.FormC);
         }
-#endif // !FEATURE_NORM_IDNA_ONLY        
         // Since our best fit table is small we'll hard code it
         internal override char[] GetBestFitUnicodeToBytesData()
         {
index b2faf0d..3bcba08 100644 (file)
@@ -21,19 +21,15 @@ namespace System.Text
         //
         // Flags that track whether given normalization form was initialized
         //
-#if !FEATURE_NORM_IDNA_ONLY
         private static volatile bool NFC;
         private static volatile bool NFD;
         private static volatile bool NFKC;
         private static volatile bool NFKD;
-#endif // !FEATURE_NORM_IDNA_ONLY                
         private static volatile bool IDNA;
-#if !FEATURE_NORM_IDNA_ONLY        
         private static volatile bool NFCDisallowUnassigned;
         private static volatile bool NFDDisallowUnassigned;
         private static volatile bool NFKCDisallowUnassigned;
         private static volatile bool NFKDDisallowUnassigned;
-#endif // !FEATURE_NORM_IDNA_ONLY    
         private static volatile bool IDNADisallowUnassigned;
         private static volatile bool Other;
 
@@ -77,7 +73,6 @@ namespace System.Text
         {
             switch ((ExtendedNormalizationForms)form)
             {
-#if !FEATURE_NORM_IDNA_ONLY
                 case ExtendedNormalizationForms.FormC:
                     if (NFC) return;
                     InitializeForm(form, "normnfc.nlp");
@@ -101,7 +96,6 @@ namespace System.Text
                     InitializeForm(form, "normnfkd.nlp");
                     NFKD = true;
                     break;
-#endif // !FEATURE_NORM_IDNA_ONLY
 
                 case ExtendedNormalizationForms.FormIdna:
                     if (IDNA) return;
@@ -109,7 +103,6 @@ namespace System.Text
                     IDNA = true;
                     break;
 
-#if !FEATURE_NORM_IDNA_ONLY
                 case ExtendedNormalizationForms.FormCDisallowUnassigned:
                     if (NFCDisallowUnassigned) return;
                     InitializeForm(form, "normnfc.nlp");
@@ -133,7 +126,6 @@ namespace System.Text
                     InitializeForm(form, "normnfkd.nlp");
                     NFKDDisallowUnassigned = true;
                     break;
-#endif // !FEATURE_NORM_IDNA_ONLY
 
                 case ExtendedNormalizationForms.FormIdnaDisallowUnassigned:
                     if (IDNADisallowUnassigned) return;
index e7e733a..4ed921f 100644 (file)
@@ -8,29 +8,23 @@ namespace System.Text
 [System.Runtime.InteropServices.ComVisible(true)]
     public enum NormalizationForm
     {
-#if !FEATURE_NORM_IDNA_ONLY     
         FormC    = 1,
         FormD    = 2,
         FormKC   = 5,
         FormKD   = 6
-#endif // !FEATURE_NORM_IDNA_ONLY       
     }
 
     internal enum ExtendedNormalizationForms
     {
-#if !FEATURE_NORM_IDNA_ONLY     
         FormC    = 1,
         FormD    = 2,
         FormKC   = 5,
         FormKD   = 6,
-#endif // !FEATURE_NORM_IDNA_ONLY        
         FormIdna = 0xd,
-#if !FEATURE_NORM_IDNA_ONLY
         FormCDisallowUnassigned     = 0x101,
         FormDDisallowUnassigned     = 0x102,
         FormKCDisallowUnassigned    = 0x105,
         FormKDDisallowUnassigned    = 0x106,
-#endif // !FEATURE_NORM_IDNA_ONLY        
         FormIdnaDisallowUnassigned  = 0x10d
     }
 }