public override void VisitFixedStatement(FixedStatementSyntax node) { Debug.Assert((object)_containingMemberOrLambda == _enclosing.ContainingMemberOrLambda); var binder = new FixedStatementBinder(_enclosing, node); AddToMap(node, binder); if (node.Declaration != null) { foreach (VariableDeclaratorSyntax declarator in node.Declaration.Variables) { Visit(declarator, binder); } } VisitPossibleEmbeddedStatement(node.Statement, binder); }
protected abstract void VisitFixedStatementDeclarations(FixedStatementSyntax node);
public sealed override void VisitFixedStatement(FixedStatementSyntax node) { this.VisitFixedStatementDeclarations(node); this.Visit(node.Statement); }
public override void VisitFixedStatement(FixedStatementSyntax node) { Debug.Assert((object)_method == _enclosing.ContainingMemberOrLambda); var binder = new FixedStatementBinder(_enclosing, node); AddToMap(node, binder); VisitPossibleEmbeddedStatement(node.Statement, binder); }
public override void VisitFixedStatement(FixedStatementSyntax node) { HandleEmbeddedStatement(node.Statement, curNode); CreateConnectedEndNode(node); }
public override SyntaxList <VB.Syntax.StatementSyntax> VisitFixedStatement(CS.Syntax.FixedStatementSyntax node) { // todo return(Visit(node.Statement)); }
private BoundStatement BindFixedStatementParts(FixedStatementSyntax node, DiagnosticBag diagnostics) { VariableDeclarationSyntax declarationSyntax = node.Declaration; ImmutableArray<BoundLocalDeclaration> declarations; BindForOrUsingOrFixedDeclarations(declarationSyntax, LocalDeclarationKind.FixedVariable, diagnostics, out declarations); Debug.Assert(!declarations.IsEmpty); BoundMultipleLocalDeclarations boundMultipleDeclarations = new BoundMultipleLocalDeclarations(declarationSyntax, declarations); BoundStatement boundBody = BindPossibleEmbeddedStatement(node.Statement, diagnostics); return new BoundFixedStatement(node, GetDeclaredLocalsForScope(node), boundMultipleDeclarations, boundBody); }
public override void VisitFixedStatement(FixedStatementSyntax node) { throw new NotSupportedException(); }
/// <summary> /// /// </summary> /// <param name="node"></param> /// <remarks> /// Statements will cause an AST walker to be created, thus we don't need to go further deeper in the /// tree by visiting the node. /// </remarks> public override void VisitFixedStatement(FixedStatementSyntax node) { this.VisitStatement(node); }
protected override void VisitFixedStatementDeclarations(FixedStatementSyntax node) { // Expecting N variable locals followed by N temporaries. var declarators = node.Declaration.Variables; int n = declarators.Count; int startOffset = this.offset; for (int i = 0; i < n; i++) { var declarator = declarators[i]; TryGetSlotIndex(declarator.Identifier.ValueText); this.offset++; } int endOffset = this.offset; this.offset = startOffset; for (int i = 0; i < n; i++) { var declarator = declarators[i]; if (!IsSlotIndex(SynthesizedLocalKind.FixedString)) { break; } AddSynthesizedLocal(SynthesizedLocalKind.FixedString); this.offset++; } Debug.Assert(this.offset <= endOffset); this.offset = endOffset; }
protected override void VisitFixedStatementDeclarations(FixedStatementSyntax node) { foreach (var declarator in node.Declaration.Variables) { this.builder.Add(declarator); } }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitFixedStatement(FixedStatementSyntax node) { this.OnNodeVisited(node, this.type.IsInstanceOfType(node)); base.VisitFixedStatement(node); }
/// <summary> /// /// </summary> /// <param name="node"></param> public override sealed void VisitFixedStatement(FixedStatementSyntax node) { this.OnNodeVisited(node); if (!this.traverseRootOnly) base.VisitFixedStatement(node); }
private static bool AreEquivalentActiveStatements(FixedStatementSyntax oldNode, FixedStatementSyntax newNode) { return SyntaxFactory.AreEquivalent(oldNode.Declaration, newNode.Declaration); }
public override void VisitFixedStatement(FixedStatementSyntax node) { base.VisitFixedStatement(node); MarkUnsafe(); }
public override void VisitFixedStatement(FixedStatementSyntax node) { base.VisitFixedStatement(node); _counter++; }
public static void WriteFixedStatement(OutputWriter writer, FixedStatementSyntax statement) { // writer.WriteIndent(); writer.WriteLine("//fixed() Scope"); writer.OpenBrace(); Write(writer, statement.Declaration); Write(writer, statement.Statement); writer.CloseBrace(); // writer.Write(";\r\n"); }
public override void VisitFixedStatement(FixedStatementSyntax node) { var saveCurrentScope = currentScope; currentScope = new DeclarationScope(currentScope); foreach (VariableDeclaratorSyntax declarator in node.Declaration.Variables) { builder.Add(new SemanticModelInfo(currentScope, declarator)); Visit(declarator.Initializer); } VisitPossibleEmbeddedStatement(node.Statement); Debug.Assert(currentScope.Parent == saveCurrentScope); currentScope = saveCurrentScope; }
private BoundStatement BindFixedStatement(FixedStatementSyntax node, DiagnosticBag diagnostics) { var fixedBinder = this.GetBinder(node); Debug.Assert(fixedBinder != null); fixedBinder.ReportUnsafeIfNotAllowed(node, diagnostics); return fixedBinder.BindFixedStatementParts(node, diagnostics); }
public FixedStatementBinder(Binder enclosing, FixedStatementSyntax syntax) : base(enclosing) { Debug.Assert(syntax != null); _syntax = syntax; }
public FixedStatementBinder(MethodSymbol owner, Binder enclosing, FixedStatementSyntax syntax) : base(owner, enclosing) { Debug.Assert(syntax != null); this.syntax = syntax; }
public override void VisitFixedStatement(FixedStatementSyntax node) { var binder = new FixedStatementBinder(this.method, enclosing, node); AddToMap(node, binder); VisitPossibleEmbeddedStatement(node.Statement, binder); }
private static bool AreEquivalentActiveStatements(FixedStatementSyntax oldNode, FixedStatementSyntax newNode) { return AreEquivalentIgnoringLambdaBodies(oldNode.Declaration, newNode.Declaration); }
public override void VisitFixedStatement(FixedStatementSyntax node) { this.Logic.Add(this.nodeFactory.CreateFixed(node)); }