Added some more to the comment of binExprToValues
This commit is contained in:
parent
cd47f7dde3
commit
d41db9bbb8
2 changed files with 3 additions and 1 deletions
|
|
@ -211,6 +211,8 @@ compile (Program prgE) = do
|
||||||
binExprToValues e1 e2 = case (e1, e2) of
|
binExprToValues e1 e2 = case (e1, e2) of
|
||||||
-- instead of declaring variables for working on ints,
|
-- instead of declaring variables for working on ints,
|
||||||
-- we can directly pass them to their functions.
|
-- we can directly pass them to their functions.
|
||||||
|
-- This optimization removes the need to declare
|
||||||
|
-- roughly 50% of variables
|
||||||
(EInt i1, EInt i2) -> return (VInteger i1, VInteger i2)
|
(EInt i1, EInt i2) -> return (VInteger i1, VInteger i2)
|
||||||
(EInt i, e) -> do
|
(EInt i, e) -> do
|
||||||
go e
|
go e
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
main = ((2 * (123 + 4214 % (1230)) - 1231) / 314)
|
main = ((2 * (123 + 4214 % (1230)) - 1231) / 2) * 412412
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue