summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/PGF/ByteCode.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2014-10-26 11:40:12 +0000
committerkr.angelov <kr.angelov@gmail.com>2014-10-26 11:40:12 +0000
commitefedec187cef6e422c4dbcd50454dd2e29f1a3f8 (patch)
treeb98d59e2fc86dddb3d85aae46685d6186e3b312c /src/runtime/haskell/PGF/ByteCode.hs
parent6986f1acd776e177e53332d3d1a9b4a582ceb5ef (diff)
an explicit SAVE instruction
Diffstat (limited to 'src/runtime/haskell/PGF/ByteCode.hs')
-rw-r--r--src/runtime/haskell/PGF/ByteCode.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/haskell/PGF/ByteCode.hs b/src/runtime/haskell/PGF/ByteCode.hs
index f4aebfd92..6cf7daffd 100644
--- a/src/runtime/haskell/PGF/ByteCode.hs
+++ b/src/runtime/haskell/PGF/ByteCode.hs
@@ -16,8 +16,9 @@ type CodeLabel = Int
data Instr
= CHECK_ARGS {-# UNPACK #-} !Int
- | CASE CId {-# UNPACK #-} !Int {-# UNPACK #-} !CodeLabel
+ | CASE CId {-# UNPACK #-} !CodeLabel
| CASE_LIT Literal {-# UNPACK #-} !CodeLabel
+ | SAVE {-# UNPACK #-} !Int
| ALLOC {-# UNPACK #-} !Int
| PUT_CONSTR CId
| PUT_CLOSURE {-# UNPACK #-} !CodeLabel
@@ -52,8 +53,9 @@ ppCode l [] = empty
ppCode l (is:iss) = ppLabel l <+> vcat (map ppInstr is) $$ ppCode (l+1) iss
ppInstr (CHECK_ARGS n) = text "CHECK_ARGS " <+> int n
-ppInstr (CASE id n l ) = text "CASE " <+> ppCId id <+> int n <+> ppLabel l
+ppInstr (CASE id l ) = text "CASE " <+> ppCId id <+> ppLabel l
ppInstr (CASE_LIT lit l ) = text "CASE_LIT " <+> ppLit lit <+> ppLabel l
+ppInstr (SAVE n) = text "SAVE " <+> int n
ppInstr (ALLOC n) = text "ALLOC " <+> int n
ppInstr (PUT_CONSTR id) = text "PUT_CONSTR " <+> ppCId id
ppInstr (PUT_CLOSURE l) = text "PUT_CLOSURE" <+> ppLabel l