public override void VisitEmptyStatement(IEmptyStatement stmt, IList <IStatement> body)
 {
     if (stmt == _marker.HandlingNode)
     {
         body.Add(EmptyCompletionExpression);
     }
 }
Example #2
0
 private void ProcessEmptyStatement(IEmptyStatement pStatement)
 {
     if (mCurrentBlock.Terminated)
     {
         mCurrentBlock = CreateBlock(CreateLabel());
     }
 }
 public override void VisitEmptyStatement(IEmptyStatement emptyStatement)
 {
     Value = new Statement()
     {
         EmptyStatement = new EmptyStatementFactory(emptyStatement).Value
     };
 }
        public override void VisitEmptyStatement(IEmptyStatement operation)
        {
            LogString(nameof(IEmptyStatement));
            LogCommonPropertiesAndNewLine(operation);

            base.VisitEmptyStatement(operation);
        }
 public override void Visit(IEmptyStatement emptyStatement)
 {
     if (Process(emptyStatement))
     {
         visitor.Visit(emptyStatement);
     }
     base.Visit(emptyStatement);
 }
Example #6
0
        private static void FindPattern(List <IStatement> statements)
        {
            int n = statements.Count;

            for (int i = n - 1; 0 <= i; i--)
            {
                IEmptyStatement emptyStatement = statements[i] as IEmptyStatement;
                if (emptyStatement == null)
                {
                    continue;
                }
                if (IteratorHelper.EnumerableIsNotEmpty(emptyStatement.Locations))
                {
                    continue;
                }
                statements.RemoveAt(i);
            }
            return;
        }
Example #7
0
 public void Visit(IEmptyStatement emptyStatement)
 {
     Contract.Requires(emptyStatement != null);
       throw new NotImplementedException();
 }
Example #8
0
 public void Visit(IEmptyStatement emptyStatement)
 {
     this.traverser.Traverse(emptyStatement);
 }
Example #9
0
 /// <summary>
 /// Traverses the empty statement.
 /// </summary>
 public void Traverse(IEmptyStatement emptyStatement)
 {
     Contract.Requires(emptyStatement != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(emptyStatement);
       if (this.StopTraversal) return;
       this.TraverseChildren(emptyStatement);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(emptyStatement);
 }
Example #10
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public virtual void Visit(IEmptyStatement emptyStatement)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(emptyStatement);
       //^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not to decrease this.path.Count.
       this.path.Pop();
 }
 public override void VisitEmptyStatement([NotNull] IEmptyStatement operation)
 {
     IncrementStatementCount(operation);
     base.VisitEmptyStatement(operation);
 }
Example #12
0
 public virtual void onASTElement(IEmptyStatement emptyStatement)
 {
 }
Example #13
0
 /// <summary>
 /// Visits the specified empty statement.
 /// </summary>
 /// <param name="emptyStatement">The empty statement.</param>
 public override void Visit(IEmptyStatement emptyStatement)
 {
     EmptyStatement mutableEmptyStatement = emptyStatement as EmptyStatement;
     if (alwaysMakeACopy || mutableEmptyStatement == null) mutableEmptyStatement = new EmptyStatement(emptyStatement);
     this.resultStatement = this.myCodeMutator.Visit(mutableEmptyStatement);
 }
Example #14
0
 public override void VisitEmptyStatement(IEmptyStatement operation)
 {
     base.VisitEmptyStatement(operation);
 }
 /// <summary>
 /// Rewrites the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public virtual IStatement Rewrite(IEmptyStatement emptyStatement)
 {
     return emptyStatement;
 }
Example #16
0
 /// <summary>
 /// Rewrites the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public virtual IStatement Rewrite(IEmptyStatement emptyStatement)
 {
     var mutableEmptyStatement = emptyStatement as EmptyStatement;
       if (mutableEmptyStatement == null) return emptyStatement;
       this.RewriteChildren(mutableEmptyStatement);
       return mutableEmptyStatement;
 }
Example #17
0
 public override void Visit(IEmptyStatement emptyStatement)
 {
     allElements.Add(new InvokInfo(Traverser, "IEmptyStatement", emptyStatement));
 }
Example #18
0
 /// <summary>
 /// Generates IL for the specified empty statement.
 /// </summary>
 /// <param name="emptyStatement">The empty statement.</param>
 public override void TraverseChildren(IEmptyStatement emptyStatement)
 {
     if (!this.minizeCodeSize || IteratorHelper.EnumerableIsNotEmpty(emptyStatement.Locations)) {
     this.EmitSequencePoint(emptyStatement.Locations);
     this.generator.Emit(OperationCode.Nop);
       }
       this.lastStatementWasUnconditionalTransfer = false;
 }
Example #19
0
 public void Visit(IEmptyStatement emptyStatement)
 {
     this.result = this.rewriter.Rewrite((EmptyStatement)emptyStatement);
 }
 public override void VisitEmptyStatement(IEmptyStatement emptyStatement)
 {
     Steps.Add(new WriteSemicolon());
 }
 public override void Visit(IEmptyStatement emptyStatement)
 {
     if(Process(emptyStatement)){visitor.Visit(emptyStatement);}
     base.Visit(emptyStatement);
 }
Example #22
0
 public override void TraverseChildren(IEmptyStatement emptyStatement)
 {
     MethodEnter(emptyStatement);
     base.TraverseChildren(emptyStatement);
     MethodExit();
 }
Example #23
0
 public override IOperation VisitEmptyStatement(IEmptyStatement operation, object argument)
 {
     return(new EmptyStatement(((Operation)operation).SemanticModel, operation.Syntax, operation.Type, operation.ConstantValue, operation.IsImplicit));
 }
Example #24
0
 public void Visit(IEmptyStatement emptyStatement)
 {
     this.result = this.copier.Copy(emptyStatement);
 }
Example #25
0
    /// <summary>
    /// Returns a deep copy of the given empty statement.
    /// </summary>
    /// <param name="emptyStatement"></param>
    public EmptyStatement Copy(IEmptyStatement emptyStatement) {
      Contract.Requires(emptyStatement != null);
      Contract.Ensures(Contract.Result<EmptyStatement>() != null);

      var mutableCopy = this.shallowCopier.Copy(emptyStatement);
      return mutableCopy;
    }
        public override void TraverseChildren(IEmptyStatement emptyStatement)
{ MethodEnter(emptyStatement);
            base.TraverseChildren(emptyStatement);
     MethodExit();   }
Example #27
0
    /// <summary>
    /// Returns a shallow copy of the given empty statement.
    /// </summary>
    /// <param name="emptyStatement"></param>
    public EmptyStatement Copy(IEmptyStatement emptyStatement) {
      Contract.Requires(emptyStatement != null);
      Contract.Ensures(Contract.Result<EmptyStatement>() != null);

      var mutable = emptyStatement as EmptyStatement;
      if (mutable != null) return mutable.Clone();
      return new EmptyStatement(emptyStatement);
    }
Example #28
0
 public virtual void VisitEmptyStatement(IEmptyStatement operation)
 {
     DefaultVisit(operation);
 }
 public static IEmptyStatement Update(this IEmptyStatement self, Enum @flavor) => self;
Example #30
0
 /// <summary>
 /// Performs some computation with the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public virtual void Visit(IEmptyStatement emptyStatement)
 {
 }
Example #31
0
 public virtual void VisitEmptyStatement(IEmptyStatement operation)
 {
     DefaultVisit(operation);
 }
Example #32
0
 /// <summary>
 /// Traverses the children of the empty statement.
 /// </summary>
 public virtual void TraverseChildren(IEmptyStatement emptyStatement)
 {
     Contract.Requires(emptyStatement != null);
       this.TraverseChildren((IStatement)emptyStatement);
 }
Example #33
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="emptyStatement"></param>
 public EmptyStatement(IEmptyStatement emptyStatement)
   : base(emptyStatement) {
   this.isSentinel = emptyStatement.IsSentinel;
 }
Example #34
0
 /// <summary>
 /// Performs some computation with the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public virtual void Visit(IEmptyStatement emptyStatement)
 {
     this.Visit((IStatement)emptyStatement);
 }
 public virtual void VisitEmptyStatement(IEmptyStatement emptyStatement)
 {
     Visit(emptyStatement);
 }
Example #36
0
 public void Visit(IEmptyStatement emptyStatement)
 {
     throw new NotImplementedException();
 }
Example #37
0
 private void ProcessEmptyStatement(IEmptyStatement pStatement)
 {
     if (mCurrentBlock.Terminated) mCurrentBlock = CreateBlock(CreateLabel());
 }
 public override void VisitEmptyStatement(IEmptyStatement operation)
 {
     base.VisitEmptyStatement(operation);
 }
 /// <inheritdoc />
 public override IOperation VisitEmptyStatement(IEmptyStatement operation, object argument)
 {
     return(base.VisitEmptyStatement(operation, argument));
 }
Example #40
0
 public override void TraverseChildren(IEmptyStatement emptyStatement)
 {
     base.TraverseChildren(emptyStatement);
 }
Example #41
0
 public override void TraverseChildren(IEmptyStatement emptyStatement) {
   base.TraverseChildren(emptyStatement);
 }
Example #42
0
 /// <summary>
 /// Visits the specified empty statement.
 /// </summary>
 /// <param name="emptyStatement">The empty statement.</param>
 public override void Visit(IEmptyStatement emptyStatement)
 {
     EmptyStatement mutableEmptyStatement = new EmptyStatement(emptyStatement);
     this.resultStatement = this.myCodeCopier.DeepCopy(mutableEmptyStatement);
 }
Example #43
0
 /// <summary>
 /// Returns a deep copy of the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public EmptyStatement Copy(IEmptyStatement emptyStatement)
 {
     var mutableCopy = this.shallowCopier.Copy(emptyStatement);
       return mutableCopy;
 }
 public virtual void onASTElement(IEmptyStatement emptyStatement) { }
Example #45
0
 /// <summary>
 /// Returns a shallow copy of the given empty statement.
 /// </summary>
 /// <param name="emptyStatement"></param>
 public EmptyStatement Copy(IEmptyStatement emptyStatement)
 {
     return new EmptyStatement(emptyStatement);
 }
 /// <inheritdoc />
 public override Expression VisitEmptyStatement(IEmptyStatement operation, LocalBinder argument)
 {
     return(Expression.Empty());
 }
Example #47
0
 /// <summary>
 /// Visits the specified empty statement.
 /// </summary>
 /// <param name="emptyStatement">The empty statement.</param>
 public override void Visit(IEmptyStatement emptyStatement)
 {
     EmptyStatement mutableEmptyStatement = emptyStatement as EmptyStatement;
     if (mutableEmptyStatement == null) {
       this.resultStatement = emptyStatement;
       return;
     }
     this.resultStatement = this.myCodeMutator.Visit(mutableEmptyStatement);
 }