Lowering\ClosureConversion\ClosureConversion.cs (18)
407ClosureKind closureKind;
417closureKind = ClosureKind.General;
425closureKind = ClosureKind.ThisOnly;
439closureKind = ClosureKind.Singleton;
447closureKind = ClosureKind.Static;
999ClosureKind closureKind,
1039if (closureKind == ClosureKind.Singleton)
1044else if (closureKind == ClosureKind.Static)
1405ClosureKind closureKind;
1423private DebugId GetLambdaId(SyntaxNode syntax, ClosureKind closureKind, int closureOrdinal)
1454Debug.Assert(closureKind == ClosureKind.Singleton);
1485out ClosureKind closureKind,
1542if (closureKind == ClosureKind.Static || closureKind == ClosureKind.Singleton)
1605ClosureKind closureKind;
1644var shouldCacheForStaticMethod = closureKind == ClosureKind.Singleton &&
1677(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal,
1682var cacheField = new SynthesizedLambdaCacheFieldSymbol(translatedLambdaContainer, cacheVariableType, cacheVariableName, _topLevelMethod, isReadOnly: false, isStatic: closureKind == ClosureKind.Singleton);
Lowering\ClosureConversion\SynthesizedClosureMethod.cs (13)
28ClosureKind closureKind,
57case ClosureKind.Singleton: // all type parameters on method (except the top level method's)
58case ClosureKind.General: // only lambda's type parameters on method (rest on class)
67case ClosureKind.ThisOnly: // all type parameters on method
68case ClosureKind.Static:
156private static DeclarationModifiers MakeDeclarationModifiers(ClosureKind closureKind, MethodSymbol originalMethod)
158var mods = closureKind == ClosureKind.ThisOnly ? DeclarationModifiers.Private : DeclarationModifiers.Internal;
160if (closureKind == ClosureKind.Static)
178private static string MakeName(string topLevelMethodName, string localFunctionName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId)
183(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal,
189private static string MakeName(string topLevelMethodName, DebugId topLevelMethodId, ClosureKind closureKind, DebugId lambdaId)
196(closureKind == ClosureKind.General) ? -1 : topLevelMethodId.Ordinal,
235public ClosureKind ClosureKind { get; }