diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-02-07 22:56:36 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-02-08 10:26:00 -0500 |
commit | 3328ddb88b6eb11cb1f6e844f883e7e9d2b8f21b (patch) | |
tree | 3bb04ff1f086a95e8f93041d13a10af7ec1f9011 /compiler/cmm/MkGraph.hs | |
parent | 733e845d0f66541a06415c6b420e51fc99eb9d95 (diff) | |
download | haskell-3328ddb88b6eb11cb1f6e844f883e7e9d2b8f21b.tar.gz |
Cmm: Add support for undefined unwinding statements
And use to mark `stg_stack_underflow_frame`, which we are unable to
determine a caller from.
To simplify parsing at the moment we steal the `return` keyword to
indicate an undefined unwind value. Perhaps this should be revisited.
Reviewers: scpmw, simonmar, austin, erikd
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D2738
Diffstat (limited to 'compiler/cmm/MkGraph.hs')
-rw-r--r-- | compiler/cmm/MkGraph.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/cmm/MkGraph.hs b/compiler/cmm/MkGraph.hs index ed795a1d3e..f77392fbc2 100644 --- a/compiler/cmm/MkGraph.hs +++ b/compiler/cmm/MkGraph.hs @@ -271,8 +271,10 @@ mkJumpReturnsTo dflags f callConv actuals ret_lbl ret_off updfr_off = do mkUnsafeCall :: ForeignTarget -> [CmmFormal] -> [CmmActual] -> CmmAGraph mkUnsafeCall t fs as = mkMiddle $ CmmUnsafeForeignCall t fs as +-- | Construct a 'CmmUnwind' node for the given register and unwinding +-- expression. mkUnwind :: GlobalReg -> CmmExpr -> CmmAGraph -mkUnwind r e = mkMiddle $ CmmUnwind [(r, e)] +mkUnwind r e = mkMiddle $ CmmUnwind [(r, Just e)] -------------------------------------------------------------------------- |