Пример #1
0
        public override BoundNode VisitThrowStatement(BoundThrowStatement node)
        {
            BoundSpillSequenceBuilder builder    = null;
            BoundExpression           expression = VisitExpression(ref builder, node.ExpressionOpt);

            return(UpdateStatement(builder, node.Update(expression, node.IsAbort)));
        }
Пример #2
0
 public override BoundNode VisitThrowStatement(BoundThrowStatement node)
 {
     if (node.ExpressionOpt != null && !node.IsAbort)
     {
         RecordThrow(node.Syntax, node.ExpressionOpt.Type);
     }
     return(base.VisitThrowStatement(node));
 }
        public override BoundNode VisitThrowStatement(BoundThrowStatement node)
        {
            if (node.ExpressionOpt != null || _currentAwaitCatchFrame == null)
            {
                return(base.VisitThrowStatement(node));
            }

            return(Rethrow(_currentAwaitCatchFrame.pendingCaughtException));
        }
Пример #4
0
        public override BoundNode VisitThrowStatement(BoundThrowStatement node)
        {
            var result = (BoundStatement)base.VisitThrowStatement(node);

            if (this.Instrument && !node.WasCompilerGenerated)
            {
                result = _instrumenter.InstrumentThrowStatement(node, result);
            }

            return(result);
        }
Пример #5
0
        internal void Parse(BoundThrowStatement boundThrowStatement)
        {
            if (boundThrowStatement == null)
            {
                throw new ArgumentNullException();
            }

            if (boundThrowStatement.ExpressionOpt != null)
            {
                this.ExpressionOpt = Deserialize(boundThrowStatement.ExpressionOpt) as Expression;
            }
        }
Пример #6
0
 private void EmitThrowStatement(BoundThrowStatement node)
 {
     EmitThrow(node.ExpressionOpt);
 }
Пример #7
0
        private void EmitThrowStatement(BoundThrowStatement node)
        {
            BoundExpression expr = node.ExpressionOpt;
            if (expr != null)
            {
                this.EmitExpression(expr, true);

                var exprType = expr.Type;
                // Expression type will be null for "throw null;".
                if (((object)exprType != null) && (exprType.TypeKind == TypeKind.TypeParameter))
                {
                    this.EmitBox(exprType, expr.Syntax);
                }
            }

            builder.EmitThrow(isRethrow: expr == null);
        }
Пример #8
0
 public override object VisitThrow(BoundThrowStatement x)
 {
     return(x.Update((BoundExpression)x.Thrown));
 }
Пример #9
0
 public virtual BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten)
 {
     return(InstrumentStatement(original, rewritten));
 }
Пример #10
0
 public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten)
 {
     return(AddSequencePoint(base.InstrumentThrowStatement(original, rewritten)));
 }
Пример #11
0
 public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten)
 {
     return(AddDynamicAnalysis(original, base.InstrumentThrowStatement(original, rewritten)));
 }
Пример #12
0
 public override BoundStatement InstrumentThrowStatement(BoundThrowStatement original, BoundStatement rewritten)
 {
     return(Previous.InstrumentThrowStatement(original, rewritten));
 }
Пример #13
0
 public override object VisitThrowStatement(BoundThrowStatement node, object arg)
 {
     VisitExpression(node.Expression);
     SetUnreachable();
     return(null);
 }