A first attempt to fix [#3280], [#3310] and [#3330 ]
[#2831] needs to be fixed somewhere else, together with the bug that makes =: unusable. Those two aren’t part of this patch, at least not yet.
Main changes:
port->peep.getSize removed, we don't have just instructionsMostly directives are straight forward to parse, they either have some have no size at all, some kind of fixed size or get their size as an argument.
For things like .odd and .bndry I simply assume the worst case.
.if, .else etc get ignored, so I basically count all possible branches. That blows up the size a bit, but that’s still better than 999.
Strings get their chars counted (for .strz +'\0').
Interpreting nested .rept is the most complicated part, that’s where the recursion happens. It counts dist until it reaches .endm and multiplies it with it’s argument. This is also supported when parsing backwards.
This is a first working version for gathering feedback. I don’t want to merge this before the freeze is over.
What’s missing:
=: (not sure if I wanna add this to this patch).dw and .db from port specific getSize functions.
Diff:
Related
Bugs:
#2831For now I had to disable
.iifsyntax since it can have ops and directives on the right side.Applied in [r13187]
Related
Commit: [r13187]