1
0
forked from GitHub/gf-core

finally proper stack unwind in the evaluator

This commit is contained in:
kr.angelov
2014-10-16 10:00:32 +00:00
parent 568aee9fc7
commit 76a448e26f
8 changed files with 176 additions and 211 deletions

View File

@@ -26,7 +26,8 @@ data Instr
| SET_PAD
| PUSH IVal
| EVAL IVal TailInfo
| DROP {-# UNPACK #-} !Int {-# UNPACK #-} !CodeLabel
| DROP {-# UNPACK #-} !Int
| JUMP {-# UNPACK #-} !CodeLabel
| FAIL
| ADD
@@ -60,7 +61,8 @@ ppInstr (SET v) = text "SET " <+> ppIVal v
ppInstr (SET_PAD ) = text "SET_PAD"
ppInstr (PUSH v) = text "PUSH " <+> ppIVal v
ppInstr (EVAL v ti) = text "EVAL " <+> ppIVal v <+> ppTailInfo ti
ppInstr (DROP n l ) = text "DROP " <+> int n <+> ppLabel l
ppInstr (DROP n ) = text "DROP " <+> int n
ppInstr (JUMP l ) = text "JUMP " <+> ppLabel l
ppInstr (FAIL ) = text "FAIL"
ppInstr (ADD ) = text "ADD"