Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-03-24 23:12:23 +0300
committerGitHub <noreply@github.com>2017-03-24 23:12:23 +0300
commita6eace0600573efc582218436cc004c5cef8bde8 (patch)
tree41cbbddf691baa4ce832f3159a086142a98ad2a7
parent42de63265bc8b4a75c96c48eb464f6c0dd7fdcac (diff)
parent1e1b2d64bf8da5b41487f4d460858f733076cce0 (diff)
Merge pull request #3095 from MichalStrehovsky/containsGenericVariables
Delete ContainsGenericVariables
-rw-r--r--src/Common/src/TypeSystem/Common/ArrayType.cs7
-rw-r--r--src/Common/src/TypeSystem/Common/ByRefType.cs7
-rw-r--r--src/Common/src/TypeSystem/Common/FunctionPointerType.cs19
-rw-r--r--src/Common/src/TypeSystem/Common/GenericParameterDesc.cs2
-rw-r--r--src/Common/src/TypeSystem/Common/InstantiatedType.cs14
-rw-r--r--src/Common/src/TypeSystem/Common/MethodDesc.cs20
-rw-r--r--src/Common/src/TypeSystem/Common/PointerType.cs7
-rw-r--r--src/Common/src/TypeSystem/Common/TypeDesc.cs8
-rw-r--r--src/Common/src/TypeSystem/Common/TypeFlags.cs11
-rw-r--r--src/Common/src/TypeSystem/Ecma/EcmaType.cs9
-rw-r--r--src/Common/src/TypeSystem/Interop/IL/NativeStructType.cs4
-rw-r--r--src/Common/src/TypeSystem/NativeFormat/NativeFormatType.cs9
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/CompilerGeneratedType.cs1
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.BoxedTypes.cs5
-rw-r--r--src/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs14
15 files changed, 4 insertions, 133 deletions
diff --git a/src/Common/src/TypeSystem/Common/ArrayType.cs b/src/Common/src/TypeSystem/Common/ArrayType.cs
index 248f96c64..2aeb169e7 100644
--- a/src/Common/src/TypeSystem/Common/ArrayType.cs
+++ b/src/Common/src/TypeSystem/Common/ArrayType.cs
@@ -141,13 +141,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = _rank == -1 ? TypeFlags.SzArray : TypeFlags.Array;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
- if (this.ParameterType.ContainsGenericVariables)
- flags |= TypeFlags.ContainsGenericVariables;
- }
-
flags |= TypeFlags.HasGenericVarianceComputed;
return flags;
diff --git a/src/Common/src/TypeSystem/Common/ByRefType.cs b/src/Common/src/TypeSystem/Common/ByRefType.cs
index 7fb07fb5f..f786451e2 100644
--- a/src/Common/src/TypeSystem/Common/ByRefType.cs
+++ b/src/Common/src/TypeSystem/Common/ByRefType.cs
@@ -33,13 +33,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = TypeFlags.ByRef;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
- if (this.ParameterType.ContainsGenericVariables)
- flags |= TypeFlags.ContainsGenericVariables;
- }
-
flags |= TypeFlags.HasGenericVarianceComputed;
return flags;
diff --git a/src/Common/src/TypeSystem/Common/FunctionPointerType.cs b/src/Common/src/TypeSystem/Common/FunctionPointerType.cs
index 4ecc304bf..37d9520bc 100644
--- a/src/Common/src/TypeSystem/Common/FunctionPointerType.cs
+++ b/src/Common/src/TypeSystem/Common/FunctionPointerType.cs
@@ -63,25 +63,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = TypeFlags.FunctionPointer;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
-
- if (_signature.ReturnType.ContainsGenericVariables)
- flags |= TypeFlags.ContainsGenericVariables;
- else
- {
- for (int i = 0; i < _signature.Length; i++)
- {
- if (_signature[i].ContainsGenericVariables)
- {
- flags |= TypeFlags.ContainsGenericVariables;
- break;
- }
- }
- }
- }
-
flags |= TypeFlags.HasGenericVarianceComputed;
return flags;
diff --git a/src/Common/src/TypeSystem/Common/GenericParameterDesc.cs b/src/Common/src/TypeSystem/Common/GenericParameterDesc.cs
index 7e3f8fbf1..0eeff79b5 100644
--- a/src/Common/src/TypeSystem/Common/GenericParameterDesc.cs
+++ b/src/Common/src/TypeSystem/Common/GenericParameterDesc.cs
@@ -160,8 +160,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = 0;
- flags |= TypeFlags.ContainsGenericVariablesComputed | TypeFlags.ContainsGenericVariables;
-
flags |= TypeFlags.GenericParameter;
flags |= TypeFlags.HasGenericVarianceComputed;
diff --git a/src/Common/src/TypeSystem/Common/InstantiatedType.cs b/src/Common/src/TypeSystem/Common/InstantiatedType.cs
index 8f0b085c5..75938b68d 100644
--- a/src/Common/src/TypeSystem/Common/InstantiatedType.cs
+++ b/src/Common/src/TypeSystem/Common/InstantiatedType.cs
@@ -83,20 +83,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
-
- for (int i = 0; i < _instantiation.Length; i++)
- {
- if (_instantiation[i].ContainsGenericVariables)
- {
- flags |= TypeFlags.ContainsGenericVariables;
- break;
- }
- }
- }
-
if ((mask & TypeFlags.CategoryMask) != 0)
{
flags |= _typeDef.Category;
diff --git a/src/Common/src/TypeSystem/Common/MethodDesc.cs b/src/Common/src/TypeSystem/Common/MethodDesc.cs
index dbd15d26a..1387124ed 100644
--- a/src/Common/src/TypeSystem/Common/MethodDesc.cs
+++ b/src/Common/src/TypeSystem/Common/MethodDesc.cs
@@ -313,26 +313,6 @@ namespace Internal.TypeSystem
}
/// <summary>
- /// Gets a value indicating whether the method's <see cref="Instantiation"/>
- /// contains any generic variables.
- /// </summary>
- public bool ContainsGenericVariables
- {
- get
- {
- // TODO: Cache?
-
- Instantiation instantiation = this.Instantiation;
- for (int i = 0; i < instantiation.Length; i++)
- {
- if (instantiation[i].ContainsGenericVariables)
- return true;
- }
- return false;
- }
- }
-
- /// <summary>
/// Gets a value indicating whether this method is an instance constructor.
/// </summary>
public bool IsConstructor
diff --git a/src/Common/src/TypeSystem/Common/PointerType.cs b/src/Common/src/TypeSystem/Common/PointerType.cs
index dd1751823..9e642df10 100644
--- a/src/Common/src/TypeSystem/Common/PointerType.cs
+++ b/src/Common/src/TypeSystem/Common/PointerType.cs
@@ -33,13 +33,6 @@ namespace Internal.TypeSystem
{
TypeFlags flags = TypeFlags.Pointer;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
- if (this.ParameterType.ContainsGenericVariables)
- flags |= TypeFlags.ContainsGenericVariables;
- }
-
flags |= TypeFlags.HasGenericVarianceComputed;
return flags;
diff --git a/src/Common/src/TypeSystem/Common/TypeDesc.cs b/src/Common/src/TypeSystem/Common/TypeDesc.cs
index ab7333d3e..e0ff0be2b 100644
--- a/src/Common/src/TypeSystem/Common/TypeDesc.cs
+++ b/src/Common/src/TypeSystem/Common/TypeDesc.cs
@@ -413,14 +413,6 @@ namespace Internal.TypeSystem
}
}
- public bool ContainsGenericVariables
- {
- get
- {
- return (GetTypeFlags(TypeFlags.ContainsGenericVariables | TypeFlags.ContainsGenericVariablesComputed) & TypeFlags.ContainsGenericVariables) != 0;
- }
- }
-
/// <summary>
/// Gets the type from which this type derives from, or null if there's no such type.
/// </summary>
diff --git a/src/Common/src/TypeSystem/Common/TypeFlags.cs b/src/Common/src/TypeSystem/Common/TypeFlags.cs
index 85f760659..3e7928c07 100644
--- a/src/Common/src/TypeSystem/Common/TypeFlags.cs
+++ b/src/Common/src/TypeSystem/Common/TypeFlags.cs
@@ -48,13 +48,10 @@ namespace Internal.TypeSystem
SignatureTypeVariable = 0x1D,
SignatureMethodVariable = 0x1E,
- ContainsGenericVariables = 0x100,
- ContainsGenericVariablesComputed = 0x200,
+ HasGenericVariance = 0x100,
+ HasGenericVarianceComputed = 0x200,
- HasGenericVariance = 0x400,
- HasGenericVarianceComputed = 0x800,
-
- HasStaticConstructor = 0x1000,
- HasStaticConstructorComputed = 0x2000,
+ HasStaticConstructor = 0x400,
+ HasStaticConstructorComputed = 0x800,
}
}
diff --git a/src/Common/src/TypeSystem/Ecma/EcmaType.cs b/src/Common/src/TypeSystem/Ecma/EcmaType.cs
index aa308aa2a..5c8d7533f 100644
--- a/src/Common/src/TypeSystem/Ecma/EcmaType.cs
+++ b/src/Common/src/TypeSystem/Ecma/EcmaType.cs
@@ -194,15 +194,6 @@ namespace Internal.TypeSystem.Ecma
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
-
- // TODO: Do we really want to get the instantiation to figure out whether the type is generic?
- if (this.HasInstantiation)
- flags |= TypeFlags.ContainsGenericVariables;
- }
-
if ((mask & TypeFlags.CategoryMask) != 0)
{
TypeDesc baseType = this.BaseType;
diff --git a/src/Common/src/TypeSystem/Interop/IL/NativeStructType.cs b/src/Common/src/TypeSystem/Interop/IL/NativeStructType.cs
index bf3de019a..e0f06e69e 100644
--- a/src/Common/src/TypeSystem/Interop/IL/NativeStructType.cs
+++ b/src/Common/src/TypeSystem/Interop/IL/NativeStructType.cs
@@ -260,10 +260,6 @@ namespace Internal.TypeSystem.Interop
protected override TypeFlags ComputeTypeFlags(TypeFlags mask)
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
- }
if ((mask & TypeFlags.HasGenericVarianceComputed) != 0)
{
diff --git a/src/Common/src/TypeSystem/NativeFormat/NativeFormatType.cs b/src/Common/src/TypeSystem/NativeFormat/NativeFormatType.cs
index d0ba59b99..cfcc38964 100644
--- a/src/Common/src/TypeSystem/NativeFormat/NativeFormatType.cs
+++ b/src/Common/src/TypeSystem/NativeFormat/NativeFormatType.cs
@@ -234,15 +234,6 @@ namespace Internal.TypeSystem.NativeFormat
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
-
- // TODO: Do we really want to get the instantiation to figure out whether the type is generic?
- if (this.HasInstantiation)
- flags |= TypeFlags.ContainsGenericVariables;
- }
-
if ((mask & TypeFlags.CategoryMask) != 0 && (flags & TypeFlags.CategoryMask) == 0)
{
TypeDesc baseType = this.BaseType;
diff --git a/src/ILCompiler.Compiler/src/Compiler/CompilerGeneratedType.cs b/src/ILCompiler.Compiler/src/Compiler/CompilerGeneratedType.cs
index 182314e1b..c52e6aa1f 100644
--- a/src/ILCompiler.Compiler/src/Compiler/CompilerGeneratedType.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/CompilerGeneratedType.cs
@@ -75,7 +75,6 @@ namespace ILCompiler
protected override TypeFlags ComputeTypeFlags(TypeFlags mask)
{
return TypeFlags.Class |
- TypeFlags.ContainsGenericVariablesComputed |
TypeFlags.HasGenericVarianceComputed |
TypeFlags.HasStaticConstructorComputed;
}
diff --git a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.BoxedTypes.cs b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.BoxedTypes.cs
index 4fc1f301e..6b0ee6180 100644
--- a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.BoxedTypes.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.BoxedTypes.cs
@@ -257,11 +257,6 @@ namespace ILCompiler
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
- }
-
if ((mask & TypeFlags.HasGenericVarianceComputed) != 0)
{
flags |= TypeFlags.HasGenericVarianceComputed;
diff --git a/src/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs b/src/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs
index 3cac02202..1f5425b0c 100644
--- a/src/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs
+++ b/src/System.Private.TypeLoader/src/Internal/TypeSystem/RuntimeNoMetadataType.cs
@@ -130,20 +130,6 @@ namespace Internal.TypeSystem.NoMetadata
{
TypeFlags flags = 0;
- if ((mask & TypeFlags.ContainsGenericVariablesComputed) != 0)
- {
- flags |= TypeFlags.ContainsGenericVariablesComputed;
-
- for (int i = 0; i < _instantiation.Length; i++)
- {
- if (_instantiation[i].ContainsGenericVariables)
- {
- flags |= TypeFlags.ContainsGenericVariables;
- break;
- }
- }
- }
-
if ((mask & TypeFlags.CategoryMask) != 0)
{
unsafe