summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-10-13 08:28:56 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-13 08:28:56 +0200
commit33cdae8c320955df522f62785bbe43630d9e7e8c (patch)
tree1c4da7f41d0b176aa6ed2ea10bd97ce78641cbbc
parentfcca59e415fe2f3ccbd5c4a977b65305e80f83e8 (diff)
downloadNim-33cdae8c320955df522f62785bbe43630d9e7e8c.tar.gz
dfa.nim: clarify exception handling
-rw-r--r--compiler/dfa.nim5
1 files changed, 4 insertions, 1 deletions
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.