Exemplo n.º 1
0
        public override void VisitFixedStatement(IFixedStatement operation)
        {
            LogString(nameof(IFixedStatement));
            LogCommonPropertiesAndNewLine(operation);

            base.VisitFixedStatement(operation);
        }
Exemplo n.º 2
0
        public override void VisitFixedStatement(IFixedStatement operation)
        {
            LogString(nameof(IFixedStatement));
            LogCommonPropertiesAndNewLine(operation);

            Visit(operation.Variables, "Declaration");
            Visit(operation.Body, "Body");
        }
            public override void VisitFixedStatement([NotNull] IFixedStatement operation)
            {
#pragma warning disable AV2310 // Code blocks should not contain inline comments
                // Note: fixed statements must always occur in combination with a declaration
                // expression statement. So to allow eight fixed statements, we do not count these.
#pragma warning restore AV2310 // Code blocks should not contain inline comments

                base.VisitFixedStatement(operation);
            }
Exemplo n.º 4
0
        private static void WriteFixed(LanguageWriter w, IFixedStatement state)
        {
            w.Write("{");
            w.WriteIndent();
            w.WriteLine();

            w.scope.RegisterVariable(state.Variable, false);
            w.WriteKeyword("pin_ptr");
            w.Write("<");
            new TypeRef(((IPointerType)state.Variable.VariableType).ElementType).WriteNameWithRef(w);
            w.Write("> ");
            w.WriteDeclaration(state.Variable.Name);
            w.Write(" = ");
            ExpressionWriter.WriteExpression(w, state.Expression, false);

            WriteBlock(w, state.Body);
            w.WriteOutdent();
            w.Write("}");
        }
Exemplo n.º 5
0
 public virtual void VisitFixedStatement(IFixedStatement operation)
 {
     DefaultVisit(operation);
 }
Exemplo n.º 6
0
 // https://github.com/dotnet/roslyn/issues/21281
 internal override void VisitFixedStatement(IFixedStatement operation)
 {
     base.VisitFixedStatement(operation);
 }
Exemplo n.º 7
0
 public override void VisitFixedStatement(IFixedStatement operation)
 {
     Visit(operation.Variables);
     Visit(operation.Body);
 }
Exemplo n.º 8
0
 public static IFixedStatement Update(this IFixedStatement self, ImmutableArray <ISymbol> @locals, IVariableDeclarationStatement @declarations, IOperation @body) => self;
Exemplo n.º 9
0
 public virtual void VisitFixedStatement(IFixedStatement value)
 {
     this.VisitVariableDeclaration(value.Variable);
     this.VisitExpression(value.Expression);
     this.VisitStatement(value.Body);
 }
Exemplo n.º 10
0
 public virtual void VisitFixedStatement(IFixedStatement value)
 {
     VisitVariableDeclaration(value.Variable);
     VisitExpression(value.Expression);
     VisitStatement(value.Body);
 }
Exemplo n.º 11
0
 // https://github.com/dotnet/roslyn/issues/21281
 internal override IOperation VisitFixedStatement(IFixedStatement operation, object argument)
 {
     return(new FixedStatement(Visit(operation.Variables), Visit(operation.Body), ((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue, operation.IsImplicit));
 }
Exemplo n.º 12
0
 public override void VisitFixedStatement(IFixedStatement operation)
 {
     base.VisitFixedStatement(operation);
 }
Exemplo n.º 13
0
 public override void VisitFixedStatement(IFixedStatement operation)
 {
     base.VisitFixedStatement(operation);
 }
Exemplo n.º 14
0
 /// <inheritdoc />
 public override Expression VisitFixedStatement(IFixedStatement operation, LocalBinder argument)
 {
     throw NotSupported(operation);
 }
            private void WriteFixedStatement(IFixedStatement statement, IFormatter formatter)
            {
                this.WriteStatementSeparator(formatter);

                formatter.WriteKeyword("fixed");
                formatter.Write(" ");
                formatter.Write("(");
                this.WriteVariableDeclaration(statement.Variable, formatter);
                formatter.Write(" ");
                formatter.WriteKeyword("=");
                formatter.Write(" ");
                this.WriteExpression(statement.Expression, formatter);
                formatter.Write(")");

                formatter.WriteLine();
                formatter.WriteKeyword("begin");
                formatter.WriteLine();
                formatter.WriteIndent();

                if (statement.Body != null)
                {
                    this.WriteBlockStatement(statement.Body, formatter);
                }

                formatter.WriteOutdent();
                formatter.WriteKeyword("end ");
            }
Exemplo n.º 16
0
 public virtual void VisitFixedStatement(IFixedStatement operation)
 {
     DefaultVisit(operation);
 }
Exemplo n.º 17
0
 /// <inheritdoc />
 public override IOperation VisitFixedStatement(IFixedStatement operation, object argument)
 {
     return(base.VisitFixedStatement(operation, argument));
 }
Exemplo n.º 18
0
 public virtual IStatement TransformFixedStatement(IFixedStatement value)
 {
     value.Variable = this.TransformVariableDeclaration(value.Variable);
     value.Expression = this.TransformExpression(value.Expression);
     value.Body = (IBlockStatement)this.TransformStatement(value.Body);
     return value;
 }