Closed zbanks closed 2 years ago
Sorry to be slow to get to this (and to totally bit rot it with by phi refactoring...) I think I like the first part, it feels like a relatively clean conceptual split. The second I'm a bit more torn about; it's probably good but I need to digest it first... I'm a bit cautious about the split given my vim grep-based workflow, but I think I'll manage. (And I'm not planning similarly invasive changes as my phi work any time soon.)
I'm going to close this PR then, to preserve a record of the two parts if we want to revisit this later. The first part I re-did & moved to #237 .
This PR has two parts:
translate.py
into a newevaluate.py
file verbatim, in the same order they originally appeared.CarryBit.add_to
&CarryBit.sub_from
were rewritten ascarry_add_to
andcarry_sub_from
and placed at the end of the file.Expression
s &Statements
into a newexpression.py
file, also in the same order they originally appeared.StackInfoBase
was added as an interface, whichStackInfo
then implements. (I thinkStackInfo
could be refactored to avoid this inheritance?)Overall, I know this is a big PR, but it splits
translate.py
up into 3 files (each >1k lines) which I think should help with maintenance?