diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2014-10-31 14:16:11 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2014-10-31 14:16:11 +0000 |
| commit | b1e6a21c56c5aef62716c35546d4596e11bbbf94 (patch) | |
| tree | 2436602f1eb48f198ebab5ad389a4ea027415f8d /src/runtime/haskell/PGF/ByteCode.hs | |
| parent | 9b0f354c7cef175c172edae582dcfa48817db7ba (diff) | |
now (+) in the abstract syntax works, i.e. it knows how to deal with partial sums
Diffstat (limited to 'src/runtime/haskell/PGF/ByteCode.hs')
| -rw-r--r-- | src/runtime/haskell/PGF/ByteCode.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/haskell/PGF/ByteCode.hs b/src/runtime/haskell/PGF/ByteCode.hs index 9ac072378..579d6b3bb 100644 --- a/src/runtime/haskell/PGF/ByteCode.hs +++ b/src/runtime/haskell/PGF/ByteCode.hs @@ -32,6 +32,8 @@ data Instr | DROP {-# UNPACK #-} !Int | JUMP {-# UNPACK #-} !CodeLabel | FAIL + | PUSH_ACCUM Literal + | POP_ACCUM | ADD data IVal @@ -71,6 +73,8 @@ ppInstr (TUCK v n ) = text "TUCK " <+> ppIVal v <+> int n ppInstr (DROP n ) = text "DROP " <+> int n ppInstr (JUMP l ) = text "JUMP " <+> ppLabel l ppInstr (FAIL ) = text "FAIL" +ppInstr (PUSH_ACCUM lit) = text "PUSH_ACCUM " <+> ppLit lit +ppInstr (POP_ACCUM ) = text "POP_ACCUM" ppInstr (ADD ) = text "ADD" ppIVal (HEAP n) = text "hp" <> parens (int n) |
