Ejemplo n.º 1
0
        public override void TraverseChildren(IRethrowStatement rethrowStatement)
        {
            var exceptionExpr = Bpl.Expr.Ident(this.sink.LocalExcVariable);

            AddRecordCall("<rethrown exception>", sink.Heap.RefType, exceptionExpr);
            StmtBuilder.Add(TranslationHelper.BuildAssignCmd(Bpl.Expr.Ident(this.sink.Heap.ExceptionVariable), exceptionExpr));
            PropagateException();
        }
Ejemplo n.º 2
0
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     if (Process(rethrowStatement))
     {
         visitor.Visit(rethrowStatement);
     }
     base.Visit(rethrowStatement);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Traverses the rethrow statement.
 /// </summary>
 public virtual void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     Contract.Requires(rethrowStatement != null);
       this.TraverseChildren((IStatement)rethrowStatement);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Performs some computation with the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual void Visit(IRethrowStatement rethrowStatement)
 {
 }
Ejemplo n.º 5
0
        public override void TraverseChildren(IRethrowStatement rethrowStatement)
{ MethodEnter(rethrowStatement);
            base.TraverseChildren(rethrowStatement);
     MethodExit();   }
Ejemplo n.º 6
0
 public override void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     this.exceptionsThrown.Add(this.currentCatchClauseExceptionType);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Returns a shallow copy of the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public RethrowStatement Copy(IRethrowStatement rethrowStatement)
 {
     return new RethrowStatement(rethrowStatement);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Visits the specified rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement">The rethrow statement.</param>
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     RethrowStatement mutableRethrowStatement = rethrowStatement as RethrowStatement;
     if (alwaysMakeACopy || mutableRethrowStatement == null) mutableRethrowStatement = new RethrowStatement(rethrowStatement);
     this.resultStatement = this.myCodeMutator.Visit(mutableRethrowStatement);
 }
Ejemplo n.º 9
0
 public override void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     this.sourceEmitterOutput.WriteLine("throw;", true);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Generates IL for the specified rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement">The rethrow statement.</param>
 public override void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     this.EmitSequencePoint(rethrowStatement.Locations);
       this.generator.Emit(OperationCode.Rethrow);
       this.lastStatementWasUnconditionalTransfer = true;
 }
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     if(Process(rethrowStatement)){visitor.Visit(rethrowStatement);}
     base.Visit(rethrowStatement);
 }
 public override void TraverseChildren(IRethrowStatement rethrowStatement) {
   StmtBuilder.Add(TranslationHelper.BuildAssignCmd(Bpl.Expr.Ident(this.sink.Heap.ExceptionVariable), Bpl.Expr.Ident(this.sink.LocalExcVariable)));
   RaiseException();
 }
Ejemplo n.º 13
0
 public void visit(IRethrowStatement value)
 {
     throw new System.NotSupportedException(value.GetType().ToString());
 }
Ejemplo n.º 14
0
 public void Visit(IRethrowStatement rethrowStatement)
 {
     this.result = this.rewriter.Rewrite(rethrowStatement);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Rewrites the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual IStatement Rewrite(IRethrowStatement rethrowStatement)
 {
     var mutableRethrowStatement = rethrowStatement as RethrowStatement;
       if (mutableRethrowStatement == null) return rethrowStatement;
       this.RewriteChildren(mutableRethrowStatement);
       return mutableRethrowStatement;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Performs some computation with the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual void Visit(IRethrowStatement rethrowStatement)
 {
     this.Visit((IStatement)rethrowStatement);
 }
Ejemplo n.º 17
0
 public void Visit(IRethrowStatement rethrowStatement)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 18
0
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     allElements.Add(new InvokInfo(Traverser, "IRethrowStatement", rethrowStatement));
 }
Ejemplo n.º 19
0
 public virtual void onASTElement(IRethrowStatement rethrowStatement) { }
Ejemplo n.º 20
0
 public void visit(IRethrowStatement value)
 {
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Returns a deep copy of the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public RethrowStatement Copy(IRethrowStatement rethrowStatement)
 {
     var mutableCopy = this.shallowCopier.Copy(rethrowStatement);
       return mutableCopy;
 }
 /// <summary>
 /// Rewrites the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual IStatement Rewrite(IRethrowStatement rethrowStatement)
 {
     return rethrowStatement;
 }
Ejemplo n.º 23
0
 public void Visit(IRethrowStatement rethrowStatement)
 {
     this.result = this.copier.Copy(rethrowStatement);
 }
 public override void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     StmtBuilder.Add(TranslationHelper.BuildAssignCmd(Bpl.Expr.Ident(this.sink.Heap.ExceptionVariable), Bpl.Expr.Ident(this.sink.LocalExcVariable)));
     RaiseException();
 }
Ejemplo n.º 25
0
 public virtual void onASTElement(IRethrowStatement rethrowStatement)
 {
 }
Ejemplo n.º 26
0
    /// <summary>
    /// Returns a shallow copy of the rethrow statement.
    /// </summary>
    /// <param name="rethrowStatement"></param>
    public RethrowStatement Copy(IRethrowStatement rethrowStatement) {
      Contract.Requires(rethrowStatement != null);
      Contract.Ensures(Contract.Result<RethrowStatement>() != null);

      return new RethrowStatement(rethrowStatement);
    }
Ejemplo n.º 27
0
 //^ ensures this.path.Count == old(this.path.Count);
 /// <summary>
 /// Traverses the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual void Visit(IRethrowStatement rethrowStatement)
 {
     if (this.stopTraversal) return;
       //^ int oldCount = this.path.Count;
       this.path.Push(rethrowStatement);
       //^ 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();
 }
Ejemplo n.º 28
0
    /// <summary>
    /// Returns a deep copy of the rethrow statement.
    /// </summary>
    /// <param name="rethrowStatement"></param>
    public RethrowStatement Copy(IRethrowStatement rethrowStatement) {
      Contract.Requires(rethrowStatement != null);
      Contract.Ensures(Contract.Result<RethrowStatement>() != null);

      var mutableCopy = this.shallowCopier.Copy(rethrowStatement);
      return mutableCopy;
    }
Ejemplo n.º 29
0
 /// <summary>
 /// Traverses the rethrow statement.
 /// </summary>
 public void Traverse(IRethrowStatement rethrowStatement)
 {
     Contract.Requires(rethrowStatement != null);
       if (this.preorderVisitor != null) this.preorderVisitor.Visit(rethrowStatement);
       if (this.StopTraversal) return;
       this.TraverseChildren(rethrowStatement);
       if (this.StopTraversal) return;
       if (this.postorderVisitor != null) this.postorderVisitor.Visit(rethrowStatement);
 }
 public override void TraverseChildren(IRethrowStatement rethrowStatement) {
   this.exceptionsThrown.Add(this.currentCatchClauseExceptionType);
 }
Ejemplo n.º 31
0
 public void Visit(IRethrowStatement rethrowStatement)
 {
     this.traverser.Traverse(rethrowStatement);
 }
 /// <summary>
 /// Performs some computation with the rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public virtual void Visit(IRethrowStatement rethrowStatement)
 {
 }
Ejemplo n.º 33
0
 public void Visit(IRethrowStatement rethrowStatement)
 {
     Contract.Requires(rethrowStatement != null);
       throw new NotImplementedException();
 }
Ejemplo n.º 34
0
 public override void visit(IRethrowStatement value)
 {
     il.Emit(OpCodes.Rethrow);
 }
 public virtual void visit(IRethrowStatement value)
 {
 }
Ejemplo n.º 36
0
 public override void TraverseChildren(IRethrowStatement rethrowStatement) {
   this.sourceEmitterOutput.WriteLine("throw;", true);
 }
Ejemplo n.º 37
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="rethrowStatement"></param>
 public RethrowStatement(IRethrowStatement rethrowStatement)
   : base(rethrowStatement) {
 }
Ejemplo n.º 38
0
 /// <summary>
 /// Visits the specified rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement">The rethrow statement.</param>
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     RethrowStatement mutableRethrowStatement = new RethrowStatement(rethrowStatement);
     this.resultStatement = this.myCodeCopier.DeepCopy(mutableRethrowStatement);
 }
Ejemplo n.º 39
0
 public override void TraverseChildren(IRethrowStatement rethrowStatement)
 {
     MethodEnter(rethrowStatement);
     base.TraverseChildren(rethrowStatement);
     MethodExit();
 }
Ejemplo n.º 40
0
 /// <summary>
 /// Visits the specified rethrow statement.
 /// </summary>
 /// <param name="rethrowStatement">The rethrow statement.</param>
 public override void Visit(IRethrowStatement rethrowStatement)
 {
     RethrowStatement mutableRethrowStatement = rethrowStatement as RethrowStatement;
     if (mutableRethrowStatement == null) {
       this.resultStatement = rethrowStatement;
       return;
     }
     this.resultStatement = this.myCodeMutator.Visit(mutableRethrowStatement);
 }