diff options
Diffstat (limited to 'Sjit/Run.icl')
-rw-r--r-- | Sjit/Run.icl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Sjit/Run.icl b/Sjit/Run.icl index e3e623f..ad03e02 100644 --- a/Sjit/Run.icl +++ b/Sjit/Run.icl @@ -33,14 +33,14 @@ where [r] -> r _ -> abort (toString (length stack) +++ " values left on stack\n") - IAddRet -> case stack of - [ret:a:b:stack] -> exec ret [a:a+b:stack] - IMulRet -> case stack of - [ret:a:b:stack] -> exec ret [a:a*b:stack] - ISubRet -> case stack of - [ret:a:b:stack] -> exec ret [a:a-b:stack] - IDivRet -> case stack of - [ret:a:b:stack] -> exec ret [a:a/b:stack] + IAdd -> case stack of + [a:b:stack] -> exec (i+1) [a+b:stack] + IMul -> case stack of + [a:b:stack] -> exec (i+1) [a*b:stack] + ISub -> case stack of + [a:b:stack] -> exec (i+1) [a-b:stack] + IDiv -> case stack of + [a:b:stack] -> exec (i+1) [a/b:stack] get_program :: !CompileState -> Program get_program cs |