essential-contributions / pint

Pint, the constraint-based programming language for declarative blockchains
Apache License 2.0
14 stars 0 forks source link

Introduce `PredKey` and a slotmap for `Contract::preds`. #788

Closed otrho closed 1 month ago

otrho commented 1 month ago

And predicates are now almost exclusively referred to by key, rather than by name.

This is the next task for #774. It's still a bit clumsy in areas, especially some parts of asm_gen where functions often take a predicate key and a predicate reference, but this is related to getting the size of types which should no longer need the predicate reference once we move enums from Prediate to Contract.

otrho commented 1 month ago

I updated some tests, purely to re-order predicates and they're now printed in declaration order rather than alphabetical.