forked from nim-works/nimskull
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of leaving the implementation of `finally` and the exception stack to the code generators (or a theoretical MIR pass), `mirgen` now does the lowering itself. This means turning `finally` into what is effectively a block + try/except + dispatcher, which is the same thing that `ccgflow` already did (just with access to the original structure, which makes the translation much simpler). Emitting the calls to the exception runtime is also moved to `mirgen`. In order to be able to continue raising an in-flight instruction (a re-raise statement can only raise a *caught* exception), the `mResumeRaising` magic is introduced. `mnkRaise` should eventually become low-level enough for the magic is no longer necessary.
- Loading branch information
Showing
3 changed files
with
291 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.