[commit: ghc] wip/T14373: WIP: cover case where only have pj (8305a93)

git at git.haskell.org git at git.haskell.org
Fri Dec 15 14:41:55 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14373
Link       : http://ghc.haskell.org/trac/ghc/changeset/8305a939944461392a01d55731c599a7bbe70c34/ghc

>---------------------------------------------------------------

commit 8305a939944461392a01d55731c599a7bbe70c34
Author: Gabor Greif <ggreif at gmail.com>
Date:   Fri Dec 15 15:41:34 2017 +0100

    WIP: cover case where only have pj


>---------------------------------------------------------------

8305a939944461392a01d55731c599a7bbe70c34
 compiler/codeGen/StgCmmUtils.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs
index 2e12b16..0b77bc9 100644
--- a/compiler/codeGen/StgCmmUtils.hs
+++ b/compiler/codeGen/StgCmmUtils.hs
@@ -456,9 +456,10 @@ emitSwitch :: CmmExpr                      -- Tag to switch on
            -> FCode ()                     -- code to insert before join label
            -> FCode ()
 
--- First, two rather common cases in which there is no work to do
+-- First, three rather common cases in which there is no work to do
 emitSwitch _ []         (Just code) _ _ pj = emit (fst code) >> pj
 emitSwitch _ [(_,code)] Nothing     _ _ pj = emit (fst code) >> pj
+emitSwitch _ []         Nothing     _ _ pj = pj
 
 -- Right, off we go
 emitSwitch tag_expr branches mb_deflt lo_tag hi_tag pj = do



More information about the ghc-commits mailing list