diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-09-18 13:32:04 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-09-18 13:32:04 +0000 |
commit | 656e9d6b1db053c88ba1518b6095060347e09418 (patch) | |
tree | d49e31cdb0bdfd918fbc4dce77f37c2839490a03 /compiler/ghci/ByteCodeInstr.lhs | |
parent | ba67234542412c2ca6656dbeadb7d225bc94d4b2 (diff) | |
download | haskell-656e9d6b1db053c88ba1518b6095060347e09418.tar.gz |
implement case-on-Word in the byte code generator/interpreter (#2881)
Diffstat (limited to 'compiler/ghci/ByteCodeInstr.lhs')
-rw-r--r-- | compiler/ghci/ByteCodeInstr.lhs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/ghci/ByteCodeInstr.lhs b/compiler/ghci/ByteCodeInstr.lhs index 20828266fb..b83006bd45 100644 --- a/compiler/ghci/ByteCodeInstr.lhs +++ b/compiler/ghci/ByteCodeInstr.lhs @@ -108,6 +108,8 @@ data BCInstr | LABEL LocalLabel | TESTLT_I Int LocalLabel | TESTEQ_I Int LocalLabel + | TESTLT_W Word LocalLabel + | TESTEQ_W Word LocalLabel | TESTLT_F Float LocalLabel | TESTEQ_F Float LocalLabel | TESTLT_D Double LocalLabel @@ -205,6 +207,8 @@ instance Outputable BCInstr where ppr (LABEL lab) = text "__" <> ppr lab <> colon ppr (TESTLT_I i lab) = text "TESTLT_I" <+> int i <+> text "__" <> ppr lab ppr (TESTEQ_I i lab) = text "TESTEQ_I" <+> int i <+> text "__" <> ppr lab + ppr (TESTLT_W i lab) = text "TESTLT_W" <+> int (fromIntegral i) <+> text "__" <> ppr lab + ppr (TESTEQ_W i lab) = text "TESTEQ_W" <+> int (fromIntegral i) <+> text "__" <> ppr lab ppr (TESTLT_F f lab) = text "TESTLT_F" <+> float f <+> text "__" <> ppr lab ppr (TESTEQ_F f lab) = text "TESTEQ_F" <+> float f <+> text "__" <> ppr lab ppr (TESTLT_D d lab) = text "TESTLT_D" <+> double d <+> text "__" <> ppr lab @@ -265,6 +269,8 @@ bciStackUse (UNPACK sz) = fromIntegral sz bciStackUse LABEL{} = 0 bciStackUse TESTLT_I{} = 0 bciStackUse TESTEQ_I{} = 0 +bciStackUse TESTLT_W{} = 0 +bciStackUse TESTEQ_W{} = 0 bciStackUse TESTLT_F{} = 0 bciStackUse TESTEQ_F{} = 0 bciStackUse TESTLT_D{} = 0 |