From 33cdae8c320955df522f62785bbe43630d9e7e8c Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 13 Oct 2018 08:28:56 +0200 Subject: [PATCH] dfa.nim: clarify exception handling --- compiler/dfa.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/dfa.nim b/compiler/dfa.nim index 016b4a5d1..04937663a 100644 --- a/compiler/dfa.nim +++ b/compiler/dfa.nim @@ -21,7 +21,10 @@ ## Contrary to popular belief, exception handling doesn't cause ## many problems for this DFA representation, ``raise`` is a statement ## that ``goes to`` the outer ``finally`` or ``except`` if there is one, -## otherwise it is the same as ``return``. +## otherwise it is the same as ``return``. Every call is treated as +## a call that can potentially ``raise``. However, without a surrounding +## ``try`` we don't emit these ``fork ReturnLabel`` instructions in order +## to speed up the dataflow analysis passes. ## ## The data structures and algorithms used here are inspired by ## "A Graph–Free Approach to Data–Flow Analysis" by Markus Mohnen.