aboutsummaryrefslogtreecommitdiff
path: root/Sjit/Compile.dcl
diff options
context:
space:
mode:
authorCamil Staps2018-12-25 00:34:39 +0100
committerCamil Staps2018-12-25 00:34:39 +0100
commited32c6288c14d540b5c6270858bf2f8202d579e0 (patch)
tree94e3cff3630a9cfc0a5e2ec67a5b89dbab821fc5 /Sjit/Compile.dcl
parentAdd booleans, encoded as 1 and 0 (diff)
Better use of monads
Diffstat (limited to 'Sjit/Compile.dcl')
-rw-r--r--Sjit/Compile.dcl13
1 files changed, 7 insertions, 6 deletions
diff --git a/Sjit/Compile.dcl b/Sjit/Compile.dcl
index 166b5c4..7cb74e3 100644
--- a/Sjit/Compile.dcl
+++ b/Sjit/Compile.dcl
@@ -23,12 +23,13 @@ from Sjit.Syntax import :: Function
:: Program :== {!Instr}
:: CompileState =
- { vars :: !Map String Int
- , funs :: !Map String Int
- , sp :: !Int
- , pc :: !Int
- , blocks :: ![!Program!]
- , jitst :: !JITState
+ { vars :: !Map String Int
+ , funs :: !Map String Int
+ , sp :: !Int
+ , pc :: !Int
+ , blocks :: ![!Program!]
+ , new_block :: ![!Instr!]
+ , jitst :: !JITState
}
:: JITState =