Please sign in to comment.
Push/Enter and Constant Propagation for Michelson (#305)
* added TODO comment * added multi-lambda, and removed some undefined * added body of the logic for proper application * major changes, won't compile, becoming closer to the real stack type * added a new stack type and some abstarctions. * made new position and called it lookup * got utils to compile * removed last inexhaustive call in Util * got prims and datatypes to compile * got the code to compile * some paired programming work, got fully applied functions working * started more work on the parital application case * did more of the lambda case, and made helper stack functions * added a stack file, which other files depend on, isntead of spreading in types and utils * updated the document and ran precommit * changed genFunc to instToStackEff * added a few more stack operations and finished the under applied case (very error prone!) * added comments on what to do for the over applied case * Notes from discussion * updated vstack to have a set of values it could be for future renaming * Rename file * made the code compile * Rework lambda compilation * Update recursive application handling * Inline primitives * forgot to commit Contract * Promoted the values prim values take into really being on the stack * Autoformat * responded to suggetsions * made evaluateAndPushArgs proper add names to already named variables * removed anove int declaration * commented on some WIP, and did a naive move for constants * propagated changes from the VStack allowing lambdas to go through it * added semigroup and monoid instance to the virtural stack * modified evaluateAndPushArgs to act properly when an arg is a lambda * handled the case where all arguments are constants * ran the formatter * added type to returnFromPi Co-authored-by: Christopher Goes <firstname.lastname@example.org>
- Loading branch information
Showing with 992 additions and 317 deletions.
- +42 −1 doc/Code/Juvix.org
- +2 −0 package.yaml
- +12 −6 src/Juvix/Backends/Michelson/Compilation.hs
- +35 −31 src/Juvix/Backends/Michelson/Compilation/Checks.hs
- +25 −7 src/Juvix/Backends/Michelson/Compilation/Datatypes.hs
- +171 −0 src/Juvix/Backends/Michelson/Compilation/Lambda.hs
- +27 −56 src/Juvix/Backends/Michelson/Compilation/Prim.hs
- +232 −128 src/Juvix/Backends/Michelson/Compilation/Term.hs
- +42 −9 src/Juvix/Backends/Michelson/Compilation/Type.hs
- +16 −13 src/Juvix/Backends/Michelson/Compilation/Types.hs
- +100 −50 src/Juvix/Backends/Michelson/Compilation/Util.hs
- +244 −0 src/Juvix/Backends/Michelson/Compilation/VirtualStack.hs
- +11 −0 src/Juvix/Backends/Michelson/Contract.hs
- +17 −9 src/Juvix/Backends/Michelson/Optimisation.hs
- +2 −1 src/Juvix/Core/Erased/Types.hs
- +4 −0 src/Juvix/Core/ErasedAnn/Erasure.hs
- +6 −0 src/Juvix/Core/ErasedAnn/Types.hs
- +4 −6 test/Backends/Michelson.hs
Oops, something went wrong.