diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-10-13 08:28:56 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-10-13 08:28:56 +0200 |
commit | 33cdae8c320955df522f62785bbe43630d9e7e8c (patch) | |
tree | 1c4da7f41d0b176aa6ed2ea10bd97ce78641cbbc | |
parent | fcca59e415fe2f3ccbd5c4a977b65305e80f83e8 (diff) | |
download | Nim-33cdae8c320955df522f62785bbe43630d9e7e8c.tar.gz |
dfa.nim: clarify exception handling
-rw-r--r-- | compiler/dfa.nim | 5 |
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. |