omarandlorraine / strop

Stochastically generates machine code
MIT License
95 stars 1 forks source link

Big refactor of machine.rs #15

Closed omarandlorraine closed 2 years ago

omarandlorraine commented 2 years ago

There is a mahusive enum that defines all possible operations.

It's inflexible, it's inelegant, it's ugly.

So we're going to break the Operations enum out to variants like ConditionalBranch, DyadicAluOperation, MonadicOperations etc, and these variants will be:

This work (not strictly a refactor) will also enable the completion of some of the TODOs that there are.

omarandlorraine commented 2 years ago

To get clippy to have less to say, we're going to have to redo the way flags are treated

omarandlorraine commented 2 years ago

We need a test to make sure that an instruction's destination is never immediate.