70 references to Compilation
Microsoft.CodeAnalysis.CSharp (70)
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
182if (method.IsAsyncEffectivelyReturningTask(F.Compilation)) 253if (method.IsAsyncEffectivelyReturningGenericTask(F.Compilation)) 441F.Compilation.WellKnownMemberSignatureComparer,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (9)
88_exprRetValue = method.IsAsyncEffectivelyReturningGenericTask(F.Compilation) 221_method.IsAsyncEffectivelyReturningGenericTask(F.Compilation) 269var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(F.Diagnostics, F.Compilation.Assembly); 483if (F.Compilation.Options.EnableEditAndContinue) 607var useUnsafeOnCompleted = F.Compilation.Conversions.ClassifyImplicitConversionFromType( 609F.Compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_ICriticalNotifyCompletion), 617onCompleted.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, this.Diagnostics)); 646Debug.Assert(_method.IsAsyncEffectivelyReturningGenericTask(F.Compilation));
Lowering\AsyncRewriter\AsyncRewriter.AsyncIteratorRewriter.cs (1)
215parameter.Type.Equals(F.Compilation.GetWellKnownType(WellKnownType.System_Threading_CancellationToken), TypeCompareKind.ConsiderEverything))
Lowering\AsyncRewriter\AsyncRewriter.cs (3)
132return Binder.GetWellKnownTypeMember(F.Compilation, member, bag, body.Syntax.Location); 258startMethod.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, diagnostics));
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
620var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(Diagnostics, _bound.Compilation.Assembly); 621var kind = _bound.Compilation.Conversions.ClassifyConversionFromType(oldType, newType, isChecked: false, ref useSiteInfo).Kind;
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (4)
64methodBodyFactory.Compilation, 70methodBodyFactory.Compilation, 117_payloadType = ArrayTypeSymbol.CreateCSharpArray(methodBodyFactory.Compilation.Assembly, TypeWithAnnotations.Create(payloadElementType)); 253ArrayTypeSymbol.CreateCSharpArray(_methodBodyFactory.Compilation.Assembly, TypeWithAnnotations.Create(_payloadType));
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (1)
175if (!factory.Compilation.Options.EnableEditAndContinue)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (3)
175var contextType = factory.Compilation.GetWellKnownType(WellKnownType.Microsoft_CodeAnalysis_Runtime_LocalStoreTracker); 269=> (MethodSymbol?)Binder.GetWellKnownTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax, isOptional: false); 272=> (MethodSymbol?)Binder.GetSpecialTypeMember(_factory.Compilation, overload, _diagnostics, syntax: syntax);
Lowering\IteratorRewriter\IteratorRewriter.cs (2)
142Binder.TryGetSpecialTypeMember(F.Compilation, member, body.Syntax, bag, out symbol); 148Binder.GetSpecialType(F.Compilation, type, body.Syntax, bag);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
761this._factory.Compilation.Options.OptimizationLevel == OptimizationLevel.Release &&
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (3)
211Conversion conversion = _factory.Compilation.Conversions.ClassifyBuiltInConversion(inputType, output.Type, isChecked: false, ref useSiteInfo); 484_factory.Compilation.Conversions.ClassifyBuiltInConversion(test.Input.Type, typeEvaluation2.Type, isChecked: false, ref useSiteInfo) is Conversion conv && 553!loweredInput.Type.OriginalDefinition.Equals(_factory.Compilation.GetWellKnownType(WellKnownType.System_ValueTuple_TRest)) &&
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (1)
580if (_factory.Compilation.LanguageVersion >= MessageID.IDS_FeatureCacheStaticMethodGroupConversion.RequiredVersion()
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (1)
17BoundDecisionDag decisionDag = node.GetDecisionDagForLowering(_factory.Compilation);
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
99node.GetDecisionDagForLowering(_factory.Compilation),
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (1)
54node.GetDecisionDagForLowering(_factory.Compilation, out LabelSymbol? defaultLabel),
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (3)
709var callSiteType = _factory.Compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_CallSite_T); 746var delegateType = _factory.Compilation.GetWellKnownType(wkDelegateType); 787var synthesizedType = _factory.Compilation.AnonymousTypeManager.SynthesizeDelegate(parameterCount, byRefs, returnsVoid, generation);
Lowering\SpillSequenceSpiller.cs (6)
448else if (call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Span_T__get_Item) || 449call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__get_Item)) 462else if (call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_Span_T__Slice_Int_Int) || 463call.Method.OriginalDefinition == _F.Compilation.GetWellKnownTypeMember(WellKnownMember.System_ReadOnlySpan_T__Slice_Int_Int)) 471else if (call.Method == _F.Compilation.GetSpecialTypeMember(SpecialMember.System_String__op_Implicit_ToReadOnlySpanOfChar)) 484objectCreationExpression.Constructor.OriginalDefinition == _F.Compilation.GetSpecialTypeMember(SpecialMember.System_ReadOnlySpan_T__ctor_Reference))
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (3)
142F.Compilation.Options.OptimizationLevel == OptimizationLevel.Release) 513if (F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug) 663if (F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
118var variablesToHoist = IteratorAndAsyncCaptureWalker.Analyze(F.Compilation, method, body, diagnostics.DiagnosticBag); 144bool isDebugBuild = F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug; 270var optimizationLevel = F.Compilation.Options.OptimizationLevel;
Lowering\SyntheticBoundNodeFactory.cs (19)
272(ReferenceEquals(property, Compilation.GetSpecialTypeMember(CodeAnalysis.SpecialMember.System_Array__Length)) || 273ReferenceEquals(property, Compilation.GetSpecialTypeMember(CodeAnalysis.SpecialMember.System_Array__LongLength)))), "Use BoundArrayLength instead?"); 290NamedTypeSymbol specialType = Compilation.GetSpecialType(st); 297return Compilation.CreateArrayTypeSymbol(WellKnownType(elementType)); 302NamedTypeSymbol wellKnownType = Compilation.GetWellKnownType(wt); 317Symbol? wellKnownMember = Binder.GetWellKnownTypeMember(Compilation, wm, Diagnostics, syntax: Syntax, isOptional: true); 359Symbol specialMember = Compilation.GetSpecialTypeMember(sm); 556var conversion = Compilation.Conversions.ClassifyConversionFromType(expression.Type, CurrentFunction.ReturnType, isChecked: false, ref useSiteInfo); 644Conversion c = Compilation.Conversions.ClassifyBuiltInConversion(operand.Type, type, isChecked: false, ref discardedUseSiteInfo); 1209return Throw(Null(Binder.GetWellKnownType(Compilation, Microsoft.CodeAnalysis.WellKnownType.System_Exception, Diagnostics, Syntax.Location))); 1251systemType.Equals(Compilation.GetWellKnownType(CodeAnalysis.WellKnownType.System_Type), TypeCompareKind.AllIgnoreOptions)); 1433systemReflectionMethodOrConstructorInfo.Equals(Compilation.GetWellKnownType(CodeAnalysis.WellKnownType.System_Reflection_MethodInfo), TypeCompareKind.AllIgnoreOptions) || 1434systemReflectionMethodOrConstructorInfo.Equals(Compilation.GetWellKnownType(CodeAnalysis.WellKnownType.System_Reflection_ConstructorInfo), TypeCompareKind.AllIgnoreOptions)); 1477Conversion c = Compilation.Conversions.ClassifyConversionFromExpression(arg, type, isChecked: false, ref useSiteInfo); 1552Compilation.CreateArrayTypeSymbol(elementType)); 1561Compilation.CreateArrayTypeSymbol(elementType)) 1658Compilation.IsPeVerifyCompatEnabled, 1755TypeSymbol boolType = Compilation.GetSpecialType(CodeAnalysis.SpecialType.System_Boolean); 1800LocalRewriter.UnsafeGetNullableMethod(syntax, expression.Type, CodeAnalysis.SpecialMember.System_Nullable_T_get_HasValue, Compilation, Diagnostics));