75 references to _unstructuredExceptionHandling
Microsoft.CodeAnalysis.VisualBasic (75)
Lowering\LocalRewriter\LocalRewriter_Try.vb (1)
16Debug.Assert(_unstructuredExceptionHandling.Context Is Nothing)
Lowering\LocalRewriter\LocalRewriter_UnstructuredExceptionHandling.vb (74)
67Debug.Assert(_unstructuredExceptionHandling.Context Is Nothing) 68Debug.Assert(_unstructuredExceptionHandling.ExceptionHandlers Is Nothing) 69Debug.Assert(_unstructuredExceptionHandling.ResumeTargets Is Nothing) 70Debug.Assert(_unstructuredExceptionHandling.OnErrorResumeNextCount = 0) 71Debug.Assert(_unstructuredExceptionHandling.ActiveHandlerTemporary Is Nothing) 72Debug.Assert(_unstructuredExceptionHandling.ResumeTargetTemporary Is Nothing) 73Debug.Assert(_unstructuredExceptionHandling.CurrentStatementTemporary Is Nothing) 74Debug.Assert(_unstructuredExceptionHandling.ResumeNextLabel Is Nothing) 75Debug.Assert(_unstructuredExceptionHandling.ResumeLabel Is Nothing) 139_unstructuredExceptionHandling.Context = node 140_unstructuredExceptionHandling.ExceptionHandlers = ArrayBuilder(Of BoundGotoStatement).GetInstance() 141_unstructuredExceptionHandling.OnErrorResumeNextCount = 0 147_unstructuredExceptionHandling.ActiveHandlerTemporary = New SynthesizedLocal(_topMethod, int32, SynthesizedLocalKind.OnErrorActiveHandler, DirectCast(nodeFactory.Syntax, StatementSyntax)) 148locals.Add(_unstructuredExceptionHandling.ActiveHandlerTemporary) 149_unstructuredExceptionHandling.ResumeTargetTemporary = New SynthesizedLocal(_topMethod, int32, SynthesizedLocalKind.OnErrorResumeTarget, DirectCast(nodeFactory.Syntax, StatementSyntax)) 150locals.Add(_unstructuredExceptionHandling.ResumeTargetTemporary) 153_unstructuredExceptionHandling.CurrentStatementTemporary = New SynthesizedLocal(_topMethod, int32, SynthesizedLocalKind.OnErrorCurrentStatement, DirectCast(nodeFactory.Syntax, StatementSyntax)) 154locals.Add(_unstructuredExceptionHandling.CurrentStatementTemporary) 155_unstructuredExceptionHandling.ResumeNextLabel = New GeneratedLabelSymbol("$VB$UnstructuredExceptionHandling_ResumeNext") 156_unstructuredExceptionHandling.ResumeLabel = New GeneratedLabelSymbol("$VB$UnstructuredExceptionHandling_Resume") 157_unstructuredExceptionHandling.ResumeTargets = ArrayBuilder(Of BoundGotoStatement).GetInstance() 170If _unstructuredExceptionHandling.CurrentStatementTemporary IsNot Nothing Then 181Dim resumeSwitchJumps(1 + _unstructuredExceptionHandling.ResumeTargets.Count - 1) As BoundGotoStatement 187For i As Integer = 0 To _unstructuredExceptionHandling.ResumeTargets.Count - 1 188resumeSwitchJumps(i + 1) = _unstructuredExceptionHandling.ResumeTargets(i) 192nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=False), 193nodeFactory.Label(_unstructuredExceptionHandling.ResumeLabel), 194nodeFactory.Label(_unstructuredExceptionHandling.ResumeNextLabel), 213statements.Add(nodeFactory.AssignmentExpression(nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=True), 214If(_unstructuredExceptionHandling.CurrentStatementTemporary Is Nothing, 216nodeFactory.Local(_unstructuredExceptionHandling.CurrentStatementTemporary, isLValue:=False))).ToStatement()) 220Dim onErrorSwitchJumps(2 + _unstructuredExceptionHandling.ExceptionHandlers.Count - 1) As BoundGotoStatement 224_unstructuredExceptionHandling.ResumeNextLabel, 227For i As Integer = 0 To _unstructuredExceptionHandling.ExceptionHandlers.Count - 1 228onErrorSwitchJumps(s_activeHandler_FirstNonReservedOnErrorGotoIndex + i) = _unstructuredExceptionHandling.ExceptionHandlers(i) 238nodeFactory.Local(_unstructuredExceptionHandling.ActiveHandlerTemporary, isLValue:=False), 240nodeFactory.Local(_unstructuredExceptionHandling.ActiveHandlerTemporary, isLValue:=False), 243DirectCast(nodeFactory.Local(_unstructuredExceptionHandling.ActiveHandlerTemporary, isLValue:=False), BoundExpression)), 267nodeFactory.Local(_unstructuredExceptionHandling.ActiveHandlerTemporary, isLValue:=False), 268nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=False), 299nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=False), 306_unstructuredExceptionHandling.Context = Nothing 307_unstructuredExceptionHandling.ExceptionHandlers.Free() 308_unstructuredExceptionHandling.ExceptionHandlers = Nothing 310If _unstructuredExceptionHandling.ResumeTargets IsNot Nothing Then 311_unstructuredExceptionHandling.ResumeTargets.Free() 312_unstructuredExceptionHandling.ResumeTargets = Nothing 315_unstructuredExceptionHandling.ActiveHandlerTemporary = Nothing 316_unstructuredExceptionHandling.ResumeTargetTemporary = Nothing 317_unstructuredExceptionHandling.CurrentStatementTemporary = Nothing 318_unstructuredExceptionHandling.ResumeNextLabel = Nothing 319_unstructuredExceptionHandling.ResumeLabel = Nothing 320_unstructuredExceptionHandling.OnErrorResumeNextCount = 0 348statements.Add(nodeFactory.AssignmentExpression(nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=True), 353newErrorHandlerIndex = s_activeHandler_FirstNonReservedOnErrorGotoIndex + _unstructuredExceptionHandling.ExceptionHandlers.Count 354_unstructuredExceptionHandling.ExceptionHandlers.Add(nodeFactory.Goto(node.LabelOpt, setWasCompilerGenerated:=False)) 358newErrorHandlerIndex = s_activeHandler_FirstOnErrorResumeNextIndex - _unstructuredExceptionHandling.OnErrorResumeNextCount 363_unstructuredExceptionHandling.OnErrorResumeNextCount += 1 370statements.Add(nodeFactory.AssignmentExpression(nodeFactory.Local(_unstructuredExceptionHandling.ActiveHandlerTemporary, isLValue:=True), 409nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=False), 422statements.Add(nodeFactory.AssignmentExpression(nodeFactory.Local(_unstructuredExceptionHandling.ResumeTargetTemporary, isLValue:=True), 432statements.Add(nodeFactory.Goto(_unstructuredExceptionHandling.ResumeNextLabel)) 436statements.Add(nodeFactory.Goto(_unstructuredExceptionHandling.ResumeLabel)) 451Dim targetResumeLabel = New GeneratedUnstructuredExceptionHandlingResumeLabel(_unstructuredExceptionHandling.Context.ResumeWithoutLabelOpt) 453_unstructuredExceptionHandling.ResumeTargets.Add(New BoundGotoStatement(syntax, targetResumeLabel, Nothing)) 463statements.Add(nodeFactory.AssignmentExpression(nodeFactory.Local(_unstructuredExceptionHandling.CurrentStatementTemporary, isLValue:=True), 464nodeFactory.Literal(_unstructuredExceptionHandling.ResumeTargets.Count)).ToStatement()) 573result.Context = _unstructuredExceptionHandling.Context 574_unstructuredExceptionHandling.Context = Nothing 586_unstructuredExceptionHandling.Context = saved.Context 590Return _unstructuredExceptionHandling.Context IsNot Nothing AndAlso 591_unstructuredExceptionHandling.CurrentStatementTemporary IsNot Nothing AndAlso _currentMethodOrLambda Is _topMethod 595Return _currentMethodOrLambda Is _topMethod AndAlso _unstructuredExceptionHandling.Context IsNot Nothing AndAlso _unstructuredExceptionHandling.Context.ContainsOnError