aboutsummaryrefslogtreecommitdiff
path: root/Sjit/Compile.dcl
diff options
context:
space:
mode:
Diffstat (limited to 'Sjit/Compile.dcl')
-rw-r--r--Sjit/Compile.dcl19
1 files changed, 12 insertions, 7 deletions
diff --git a/Sjit/Compile.dcl b/Sjit/Compile.dcl
index 7cb74e3..fd4b2ee 100644
--- a/Sjit/Compile.dcl
+++ b/Sjit/Compile.dcl
@@ -12,6 +12,8 @@ from Sjit.Syntax import :: Function
| Pop !Int
| Call !Int
+ | Jmp !Int
+ | JmpTrue !Int
| Ret
| Halt
@@ -20,16 +22,19 @@ from Sjit.Syntax import :: Function
| ISubRet
| IDivRet
+ | PlaceHolder !Int !Int // only used during compilation
+
:: Program :== {!Instr}
:: CompileState =
- { vars :: !Map String Int
- , funs :: !Map String Int
- , sp :: !Int
- , pc :: !Int
- , blocks :: ![!Program!]
- , new_block :: ![!Instr!]
- , jitst :: !JITState
+ { vars :: !Map String Int
+ , funs :: !Map String Int
+ , sp :: !Int
+ , pc :: !Int
+ , blocks :: ![!Program!]
+ , new_block :: ![!Instr!]
+ , placeholder :: !Int
+ , jitst :: !JITState
}
:: JITState =