diff options
Diffstat (limited to 'src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs index 4feb7a582..6f4710561 100644 --- a/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs +++ b/src/ILCompiler.Compiler/src/Compiler/CompilerTypeSystemContext.cs @@ -424,6 +424,9 @@ namespace ILCompiler { Debug.Assert(field.IsStatic); + if (field.IsThreadStatic) + return true; + TypeDesc fieldType = field.FieldType; if (fieldType.IsValueType) return ((DefType)fieldType).ContainsGCPointers; @@ -499,17 +502,23 @@ namespace ILCompiler // method table. public long UniversalCanonReflectionMethodRootHeuristic_InstantiationCount { get; } + // To avoid infinite generic recursion issues during debug type record generation, attempt to + // use canonical form for types with high generic complexity. + public long MaxGenericDepthOfDebugRecord { get; } + public SharedGenericsConfiguration() { UniversalCanonGVMReflectionRootHeuristic_InstantiationCount = 4; UniversalCanonGVMDepthHeuristic_NonCanonDepth = 2; UniversalCanonGVMDepthHeuristic_CanonDepth = 1; - // Unlike the GVM heuristics which are intended to kick in aggresively + // Unlike the GVM heuristics which are intended to kick in aggressively // this heuristic exists to make it so that a fair amount of generic // expansion is allowed. Numbers are chosen to allow a fairly large // amount of generic expansion before trimming. UniversalCanonReflectionMethodRootHeuristic_InstantiationCount = 1024; + + MaxGenericDepthOfDebugRecord = 15; } }; } |