From ce2d8254c2130bd61fceffaeae57caea51b9e24a Mon Sep 17 00:00:00 2001 From: Shao Cheng Date: Tue, 3 Apr 2018 00:40:44 +0800 Subject: [PATCH] Previous TTG approach of IR is a failure. Prep for a lower tech version that works --- asterius/src/Asterius/IR.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/asterius/src/Asterius/IR.hs b/asterius/src/Asterius/IR.hs index e640db1d..2374a825 100644 --- a/asterius/src/Asterius/IR.hs +++ b/asterius/src/Asterius/IR.hs @@ -250,9 +250,11 @@ marshalCmmBranch mod_sym func_sym exit_node = , trueDest = encodeLabel mod_sym func_sym cml_true , falseDest = encodeLabel mod_sym func_sym cml_false } - GHC.CmmSwitch _ _ -> + GHC.CmmSwitch _ _ -> do + MarshalContext {..} <- ask pure - SwitchBranch {switch = ExpressionStub, defDest = undefined, dests = []} + SwitchBranch + {switch = ExpressionStub, defDest = unreachableBlock, dests = []} GHC.CmmCall {..} -> pure CallBranch {callee = ExpressionStub} GHC.CmmForeignCall {} -> pure ForeignCallStub