55 writes to Syntax
Microsoft.CodeAnalysis.CSharp (55)
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (2)
143_F.Syntax = tryStatementSyntax; 147_F.Syntax = oldTrySyntax;
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
173_bound.Syntax = node.Syntax; 175_bound.Syntax = old;
Lowering\LocalRewriter\DelegateCacheRewriter.cs (2)
49_factory.Syntax = boundDelegateCreation.Syntax; 57_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (3)
474_factory.Syntax = test.Syntax; 1125_factory.Syntax = whenClauseSyntax; 1200_factory.Syntax = node.Syntax;
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (1)
338_factory.Syntax = test.Syntax;
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (3)
2214_factory.Syntax = loweredRight.Syntax; 2239_factory.Syntax = syntax; 2245_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (2)
39_factory.Syntax = node.Syntax; 94_factory.Syntax = previousSyntax;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (4)
100_factory.Syntax = node.Syntax; 118_factory.Syntax = save_Syntax; 569_factory.Syntax = (mg.ReceiverOpt ?? mg).Syntax; 572_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (2)
34_factory.Syntax = (mg.ReceiverOpt ?? mg).Syntax; 36_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_Event.cs (2)
299_factory.Syntax = node.Syntax; 317_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_IsPatternOperator.cs (2)
111_factory.Syntax = node.Syntax; 193_factory.Syntax = test.Syntax;
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (2)
377_factory.Syntax = node.Syntax; 422_factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (3)
73_factory.Syntax = node.Syntax; 132_factory.Syntax = section.Syntax; 169_factory.Syntax = node.Syntax;
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (2)
577factory.Syntax = syntax; 584factory.Syntax = oldSyntax;
Lowering\LocalRewriter\LocalRewriter_SwitchExpression.cs (3)
48_factory.Syntax = node.Syntax; 93_factory.Syntax = arm.Syntax; 120_factory.Syntax = node.Syntax;
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (11)
79_factory.Syntax = loweredOperand.Syntax; 121_factory.Syntax = loweredOperand.Syntax; 159_factory.Syntax = loweredLeft.Syntax; 203_factory.Syntax = loweredReceiver.Syntax; 266_factory.Syntax = loweredReceiver.Syntax; 302_factory.Syntax = loweredReceiver.Syntax; 339_factory.Syntax = syntax; 364_factory.Syntax = loweredReceiver.Syntax; 401_factory.Syntax = loweredReceiver.Syntax; 441_factory.Syntax = loweredReceiver.Syntax; 502_factory.Syntax = loweredReceiver.Syntax;
Lowering\SpillSequenceSpiller.cs (4)
310_F.Syntax = builder.Syntax; 754_F.Syntax = node.Syntax; 1054_F.Syntax = node.Syntax; 1061_F.Syntax = save_Syntax;
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (4)
207F.Syntax = syntax; 210F.Syntax = oldSyntax; 727F.Syntax = node.Syntax; 729F.Syntax = oldSyntax;
Lowering\SyntheticBoundNodeFactory.cs (1)
124this.Syntax = node;
162 references to Syntax
Microsoft.CodeAnalysis.CSharp (162)
Compiler\AnonymousTypeMethodBodySynthesizer.cs (2)
262new BoundLoweredConditionalAccess(F.Syntax, 266F.Syntax,
Lowering\AsyncRewriter\AsyncExceptionHandlerRewriter.cs (2)
142var oldTrySyntax = _F.Syntax; 335unpendReturn = new BoundReturnStatement(_F.Syntax, RefKind.None, pendingValue, @checked: false);
Lowering\AsyncRewriter\AsyncMethodBuilderMemberCollection.cs (6)
356F.Diagnostics.Add(ErrorCode.ERR_WrongArityAsyncReturn, F.Syntax.Location, builderType); 367F.Diagnostics.Add(ErrorCode.ERR_BadAsyncReturn, F.Syntax.Location); 462F.Syntax.Location); 494F.Diagnostics.Add(ErrorCode.ERR_MissingPredefinedMember, F.Syntax.Location, builderType, methodName); 520F.Syntax.Location); 530F.Syntax.Location);
Lowering\AsyncRewriter\AsyncMethodToStateMachineRewriter.cs (4)
91? F.SynthesizedLocal(asyncMethodBuilderMemberCollection.ResultType, syntax: F.Syntax, kind: SynthesizedLocalKind.AsyncMethodReturnValue) 114if (slotAllocator == null || !slotAllocator.TryGetPreviousAwaiterSlotIndex(F.ModuleBuilderOpt.Translate(awaiterType, F.Syntax, F.Diagnostics.DiagnosticBag), F.Diagnostics.DiagnosticBag, out slotIndex)) 234F.Syntax, 631onCompleted.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, this.Diagnostics));
Lowering\AsyncRewriter\AsyncRewriter.cs (2)
223return new BoundBadStatement(F.Syntax, ImmutableArray<BoundNode>.Empty, hasErrors: true); 258startMethod.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(F.Compilation, F.Compilation.Conversions, includeNullability: false, F.Syntax.Location, diagnostics));
Lowering\ClosureConversion\ClosureConversion.cs (1)
1731return new BoundBadExpression(F.Syntax, LookupResultKind.Empty, ImmutableArray<Symbol>.Empty, ImmutableArray.Create<BoundExpression>(node), node.Type);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (1)
172SyntaxNode old = _bound.Syntax;
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (5)
312var parameterLogger = GetLocalOrParameterStoreLogger(parameter.Type, parameter, refAssignmentSourceIsLocal: null, _factory.Syntax); 343var entryLogger = GetWellKnownMethodSymbol(entryOverload, _factory.Syntax); 347var returnLogger = GetWellKnownMethodSymbol(WellKnownMember.Microsoft_CodeAnalysis_Runtime_LocalStoreTracker__LogReturn, _factory.Syntax); 456(BoundExpression)new BoundAddressOfOperator(_factory.Syntax, value, isManaged: false, parameter.Type) : 457_factory.Sequence(new[] { value }, new BoundAddressOfOperator(_factory.Syntax, VariableRead(targetSymbol), isManaged: false, parameter.Type));
Lowering\LocalRewriter\DelegateCacheRewriter.cs (1)
48var oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (4)
155return _factory.AssignmentExpression(output, _localRewriter.MakePropertyAccess(_factory.Syntax, input, property, LookupResultKind.Viable, property.Type, isLeftOfAssignment: false)); 313return new BoundFromEndIndexExpression(_factory.Syntax, _factory.Literal(-index), 324var end = new BoundFromEndIndexExpression(_factory.Syntax, _factory.Literal(-e.EndIndex), 428return this._localRewriter.MakeBinaryOperator(_factory.Syntax, operatorKind, input, literal, _factory.SpecialType(SpecialType.System_Boolean), method: null, constrainedToTypeOpt: null);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (1)
2213var oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (1)
38var previousSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (2)
99var save_Syntax = _factory.Syntax; 568var oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_DelegateCreationExpression.cs (1)
33var oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_Event.cs (1)
298SyntaxNode oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_FixedStatement.cs (7)
65_factory.Syntax, 276factory.Syntax, 370factory.Syntax, 473BoundExpression notNullCheck = _factory.MakeNullCheck(factory.Syntax, factory.Local(localSymbol), BinaryOperatorKind.NotEqual); 527BoundExpression notNullCheck = _factory.MakeNullCheck(factory.Syntax, arrayTempInit, BinaryOperatorKind.NotEqual); 560BoundExpression firstElementAddress = new BoundAddressOfOperator(factory.Syntax, firstElement, type: new PointerTypeSymbol(arrayElementType)); 571new BoundConditionalOperator(factory.Syntax, false, condition, consequenceAssignment, alternativeAssignment, ConstantValue.NotAvailable, localType, wasTargetTyped: false, localType));
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
376SyntaxNode oldSyntax = _factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_StringConcat.cs (1)
576var oldSyntax = factory.Syntax;
Lowering\LocalRewriter\LocalRewriter_TupleBinaryOperator.cs (1)
572BoundExpression binary = MakeBinaryOperator(_factory.Syntax, single.Kind, left, right, single.MethodSymbolOpt?.ReturnType ?? boolType, single.MethodSymbolOpt, single.ConstrainedToTypeOpt);
Lowering\LocalRewriter\LoweredDynamicOperation.cs (1)
75return new BoundSequence(_factory.Syntax, _temps, ImmutableArray.Create(SiteInitialization), SiteInvocation, _resultType) { WasCompilerGenerated = true };
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
710_factory.Diagnostics.ReportUseSite(callSiteType, _factory.Syntax);
Lowering\SpillSequenceSpiller.cs (9)
511syntaxOpt: _F.Syntax); 996var tmp = _F.SynthesizedLocal(node.Type, kind: SynthesizedLocalKind.Spill, syntax: _F.Syntax); 1053var save_Syntax = _F.Syntax; 1135var tmp = _F.SynthesizedLocal(node.Type, kind: SynthesizedLocalKind.Spill, syntax: _F.Syntax); 1150var tmp = _F.SynthesizedLocal(condition.Type, kind: SynthesizedLocalKind.Spill, syntax: _F.Syntax); 1250var tmp = _F.SynthesizedLocal(node.Type, kind: SynthesizedLocalKind.Spill, syntax: _F.Syntax); 1306var clone = _F.SynthesizedLocal(receiver.Type, _F.Syntax, refKind: RefKind.None, kind: SynthesizedLocalKind.Spill); 1336var tmp = _F.SynthesizedLocal(node.Type, kind: SynthesizedLocalKind.Spill, syntax: _F.Syntax); 1497LocalSymbol longLived = local.WithSynthesizedLocalKindAndSyntax(SynthesizedLocalKind.Spill, _F.Syntax);
Lowering\StateMachineRewriter\MethodToStateMachineRewriter.cs (11)
127this.cachedState = F.SynthesizedLocal(F.SpecialType(SpecialType.System_Int32), syntax: F.Syntax, kind: SynthesizedLocalKind.StateMachineCachedState); 149BoundExpression thisProxyReplacement = thisProxy.Replacement(F.Syntax, static (frameType, F) => F.This(), F); 151this.cachedThis = F.SynthesizedLocal(thisProxyReplacement.Type, syntax: F.Syntax, kind: SynthesizedLocalKind.FrameCache); 206var oldSyntax = F.Syntax; 405return F.Block(new BoundStateMachineScope(F.Syntax, hoistedLocals, statement)); 643F.Diagnostics.Add(ErrorCode.ERR_RefReturningCallAndAwait, F.Syntax.Location, call.Method); 661F.Diagnostics.Add(ErrorCode.ERR_RefConditionalAndAwait, F.Syntax.Location); 726var oldSyntax = F.Syntax; 947var fetchThis = proxy.Replacement(F.Syntax, static (frameType, F) => F.This(), F); 983return proxy.Replacement(F.Syntax, static (frameType, F) => F.This(), F); 999return proxy.Replacement(F.Syntax, static (frameType, F) => F.This(), F);
Lowering\StateMachineRewriter\StateMachineRewriter.cs (8)
64Debug.Assert(F.Syntax == body.Syntax); 123return new BoundBadStatement(F.Syntax, ImmutableArray<BoundNode>.Empty, hasErrors: true); 319F.Syntax, 333F.Syntax, 473F.Syntax, 477var rightExpression = copySrc[method.ThisParameter].Replacement(F.Syntax, static (stateMachineType, F) => F.This(), F); 492F.Syntax, 497BoundExpression parameterProxy = copySrc[parameter].Replacement(F.Syntax, static (stateMachineType, F) => F.This(), F);
Lowering\SyntheticBoundNodeFactory.cs (87)
167return new BoundHoistedFieldAccess(Syntax, field, field.Type); 217return new BoundThisReference(Syntax, CurrentFunction.ThisParameter.Type) { WasCompilerGenerated = true }; 228return new BoundBaseReference(Syntax, baseType) { WasCompilerGenerated = true }; 233return new BoundBadExpression(Syntax, LookupResultKind.Empty, ImmutableArray<Symbol?>.Empty, ImmutableArray<BoundExpression>.Empty, type, hasErrors: true); 238return new BoundParameter(Syntax, p, p.Type) { WasCompilerGenerated = true }; 243return new BoundFieldAccess(Syntax, receiver, f, ConstantValue.NotAvailable, LookupResultKind.Viable, f.Type) { WasCompilerGenerated = true }; 261Binder.ReportUseSite(propertySym, Diagnostics, Syntax); 291Binder.ReportUseSite(specialType, Diagnostics, Syntax); 303Binder.ReportUseSite(wellKnownType, Diagnostics, Syntax); 317Symbol? wellKnownMember = Binder.GetWellKnownTypeMember(Compilation, wm, Diagnostics, syntax: Syntax, isOptional: true); 321var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 368var diagnostic = new CSDiagnostic(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, memberDescriptor.DeclaringTypeMetadataName, memberDescriptor.Name), Syntax.Location); 385Diagnostics.Add(useSiteInfo, Syntax); 415return new BoundExpressionStatement(Syntax, expr) { WasCompilerGenerated = true }; 423return AssignmentExpression(Syntax, left, right, isRef: isRef, wasCompilerGenerated: true); 465return new BoundBlock(Syntax, locals, statements) { WasCompilerGenerated = true }; 475return new BoundBlock(Syntax, locals, localFunctions, hasUnsafeModifier: false, instrumentation: null, statements) { WasCompilerGenerated = true }; 480return new BoundExtractedFinallyBlock(Syntax, finallyBlock) { WasCompilerGenerated = true }; 490return new BoundStatementList(Syntax, statements) { WasCompilerGenerated = true }; 495return new BoundStatementList(Syntax, ImmutableArray.Create(first, second)) { WasCompilerGenerated = true }; 511Syntax, 562expression = BoundConversion.Synthesized(Syntax, expression, conversion, false, explicitCastInCode: false, conversionGroupOpt: null, ConstantValue.NotAvailable, CurrentFunction.ReturnType); 566return new BoundReturnStatement(Syntax, CurrentFunction.RefKind, expression, @checked: false) { WasCompilerGenerated = true }; 631return new BoundBinaryOperator(this.Syntax, kind, ConstantValue.NotAvailable, methodOpt: null, constrainedToTypeOpt: null, LookupResultKind.Viable, left, right, type) { WasCompilerGenerated = true }; 636return new BoundAsOperator(this.Syntax, operand, Type(type), operandPlaceholder: null, operandConversion: null, type) { WasCompilerGenerated = true }; 645return new BoundIsOperator(this.Syntax, operand, Type(type), c.Kind, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 710return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Byte)) { WasCompilerGenerated = true }; 715return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 723return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_UInt32)) { WasCompilerGenerated = true }; 728return new BoundLiteral(Syntax, value, type) { WasCompilerGenerated = true }; 747=> new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true }; 751Syntax, 767return new BoundObjectCreationExpression(Syntax, ctor, args) { WasCompilerGenerated = true }; 789return new BoundBadExpression(Syntax, default(LookupResultKind), ImmutableArray<Symbol?>.Empty, args.AsImmutable(), receiver); 801Binder.ReportUseSite(methodSymbol, Diagnostics, Syntax); 809Binder.ReportUseSite(methodSymbol, Diagnostics, Syntax); 852Syntax, receiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, args, 888Syntax, receiver, initialBindingReceiverIsSubjectToCloning: ThreeState.Unknown, method, args, 896return new BoundConditionalOperator(Syntax, isRef, condition, consequence, alternative, constantValueOpt: null, type, wasTargetTyped: false, type) { WasCompilerGenerated = true }; 903return new BoundComplexConditionalReceiver(Syntax, valueTypeReceiver, referenceTypeReceiver, valueTypeReceiver.Type) { WasCompilerGenerated = true }; 911return new BoundNullCoalescingOperator(Syntax, left, right, leftPlaceholder: null, leftConversion: null, BoundNullCoalescingOperatorResultKind.LeftType, @checked: false, left.Type) { WasCompilerGenerated = true }; 921return new BoundConditionalGoto(Syntax, condition, jumpIfTrue, label) { WasCompilerGenerated = true }; 977return new BoundThrowStatement(Syntax, e) { WasCompilerGenerated = true }; 982return new BoundLocal(Syntax, local, null, local.Type) { WasCompilerGenerated = true }; 1021return new BoundSequence(Syntax, ImmutableArray<LocalSymbol>.Empty, sideEffects.AsImmutableOrNull(), result, resultType) { WasCompilerGenerated = true }; 1030: new BoundSequence(Syntax, locals, sideEffects, result, result.Type) { WasCompilerGenerated = true }; 1036return new BoundSpillSequence(Syntax, locals, sideEffects, result, result.Type) { WasCompilerGenerated = true }; 1093statements[0] = new BoundSwitchDispatch(Syntax, ex, caseBuilder.ToImmutableAndFree(), breakLabel, lengthBasedStringSwitchDataOpt: null) { WasCompilerGenerated = true }; 1117return new BoundGotoStatement(Syntax, label) { WasCompilerGenerated = true }; 1122return new BoundLabelStatement(Syntax, label) { WasCompilerGenerated = true }; 1127return new BoundLiteral(Syntax, ConstantValue.Create(value), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Boolean)) { WasCompilerGenerated = true }; 1139return new BoundLiteral(Syntax, stringConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1150return new BoundLiteral(Syntax, charConst, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Char)) { WasCompilerGenerated = true }; 1161return new BoundArrayLength(Syntax, array, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)); 1180return new BoundArrayAccess(Syntax, array, indices, ((ArrayTypeSymbol)array.Type).ElementType); 1189return new BoundExpressionStatement(Syntax, Call(Base(baseType), ctor)) { WasCompilerGenerated = true }; 1209return Throw(Null(Binder.GetWellKnownType(Compilation, Microsoft.CodeAnalysis.WellKnownType.System_Exception, Diagnostics, Syntax.Location))); 1219return Null(type, Syntax); 1226return new BoundPointerIndirectionOperator(Syntax, Default(new PointerTypeSymbol(type)), refersToLocation: false, type.Type); 1240return new BoundTypeExpression(Syntax, null, type) { WasCompilerGenerated = true }; 1267Syntax, 1292return new BoundSizeOfOperator(Syntax, Type(type), Binder.GetConstantSizeOf(type), SpecialType(Microsoft.CodeAnalysis.SpecialType.System_Int32)) { WasCompilerGenerated = true }; 1300Syntax, 1316Syntax, 1325Syntax, 1335Syntax, 1345Syntax, 1356return new BoundModuleVersionId(Syntax, WellKnownType(Microsoft.CodeAnalysis.WellKnownType.System_Guid)) { WasCompilerGenerated = true }; 1361return new BoundModuleVersionIdString(Syntax, SpecialType(Microsoft.CodeAnalysis.SpecialType.System_String)) { WasCompilerGenerated = true }; 1366return new BoundInstrumentationPayloadRoot(Syntax, analysisKind, payloadType) { WasCompilerGenerated = true }; 1370=> new BoundThrowIfModuleCancellationRequested(Syntax, SpecialType(CodeAnalysis.SpecialType.System_Void)) { WasCompilerGenerated = true }; 1373=> new ModuleCancellationTokenExpression(Syntax, WellKnownType(CodeAnalysis.WellKnownType.System_Threading_CancellationToken)) { WasCompilerGenerated = true }; 1378Syntax, 1389Syntax, 1407Syntax, 1423Syntax, 1516return new BoundConversion(Syntax, arg, conversion, @checked: isChecked, explicitCastInCode: true, conversionGroupOpt: null, null, type) { WasCompilerGenerated = true }; 1549Syntax, 1551new BoundArrayInitialization(Syntax, isInferred: false, elements) { WasCompilerGenerated = true }, 1558Syntax, 1567return Default(type, Syntax); 1581return new BoundTryStatement(Syntax, tryBlock, catchBlocks, finallyBlock, finallyLabel) { WasCompilerGenerated = true }; 1595return new BoundCatchBlock(Syntax, ImmutableArray.Create(local), source, source.Type, exceptionFilterPrologueOpt: null, exceptionFilterOpt: null, body: block, isSynthesizedAsyncCatchAll: false); 1602return new BoundCatchBlock(Syntax, ImmutableArray<LocalSymbol>.Empty, source, source.Type, exceptionFilterPrologueOpt: null, exceptionFilterOpt: null, body: block, isSynthesizedAsyncCatchAll: false); 1607return new BoundTryStatement(Syntax, tryBlock, ImmutableArray<BoundCatchBlock>.Empty, faultBlock, finallyLabelOpt: null, preferFaultHandler: true); 1612return NullOrDefault(typeSymbol, this.Syntax); 1707return new BoundNoOpStatement(Syntax, noOpStatementFlavor);
Symbols\Synthesized\Records\SynthesizedRecordCopyCtor.cs (1)
69var recordDeclaration = (RecordDeclarationSyntax)F.Syntax;