72 references to Compilation
Microsoft.CodeAnalysis.CSharp (72)
Lowering\AsyncRewriter\AsyncIteratorMethodToStateMachineRewriter.cs (1)
333var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(F.Diagnostics, F.Compilation.Assembly);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (3)
182if (method.IsAsyncEffectivelyReturningTask(F.Compilation)) 253if (method.IsAsyncEffectivelyReturningGenericTask(F.Compilation)) 441F.Compilation.WellKnownMemberSignatureComparer,
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (9)
90_exprRetValue = method.IsAsyncEffectivelyReturningGenericTask(F.Compilation) 259_method.IsAsyncEffectivelyReturningGenericTask(F.Compilation) 272var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(F.Diagnostics, F.Compilation.Assembly); 497if (F.Compilation.Options.EnableEditAndContinue) 621var useUnsafeOnCompleted = F.Compilation.Conversions.ClassifyImplicitConversionFromType( 623F.Compilation.GetWellKnownType(WellKnownType.System_Runtime_CompilerServices_ICriticalNotifyCompletion), 631onCompleted.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, this.Diagnostics)); 660Debug.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 (4)
147F.Compilation.Options.OptimizationLevel == OptimizationLevel.Release) 436var useSiteInfo = new CompoundUseSiteInfo<AssemblySymbol>(F.Diagnostics, F.Compilation.Assembly); 530if (F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug) 680if (F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug)
Lowering\StateMachineRewriter\StateMachineRewriter.cs (3)
118var variablesToHoist = IteratorAndAsyncCaptureWalker.Analyze(F.Compilation, method, body, diagnostics.DiagnosticBag); 146bool isDebugBuild = F.Compilation.Options.OptimizationLevel == OptimizationLevel.Debug; 274var 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));