1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-07 07:28:57 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Andy McFadden
e8ae534879 Instruction operand editor rework, part 2
Implemented local variable editing.  Operands that have a local
variable reference, or are eligible to have one, can now be edited
directly from the instruction operand edit dialog.

Also, updated the code list double-click handler so that, if you
double-click on the opcode of an instruction that uses a local
variable reference, the selection and view will jump to the place
where that variable was defined.

Also, tweaked the way the References window refers to references
to an address that didn't use a symbol at that address.  Updated
the explanation in the manual, which was a bit confusing.

Also, fixed some odds and ends in the manual.

Also, fixed a nasty infinite recursion bug (issue #47).
2019-09-07 20:56:43 -07:00
Andy McFadden
9a61a852ad Add a "move table" button
A simple if slightly awkward way to reposition a local variable
table.
2019-09-01 16:40:54 -07:00
Andy McFadden
d542a809f8 Implement local variables for ACME
Unlike 64tass and Merlin, which allow you to redefine symbols, ACME
uses "zones" that provide scope for local variables.  This means
that, at the point of a local variable table definition, we have to
start a new zone and output the full set of active symbols, not just
the newly-defined ones.  (If you set the "clear previous" flag in
the LvTable there's no difference.)

We could do a bit better by only outputting the symbols that are
actually used within the zone, similar to what we do for global
project/platform symbols, but that's a bunch of work for questionable
benefit.
2019-09-01 10:55:19 -07:00
Andy McFadden
c698048001 Handle variable labels that are duplicates of non-variables
After thrashing around a bit, I had to choose between making the
uniquifier more complicated, or making de-duplication a separate
step.  Since I don't really expect duplicates to be a thing, I went
with the latter.

Updated the regression test.
2019-08-31 21:54:20 -07:00
Andy McFadden
963b351a52 Add 2019-local-variables test
This hits most of the edge cases, but doesn't exercise the two
duplicate name situations (var name same as user label, var name
same as project/platform symbol).

Also, fixed a bug in the EditDefSymbol uniqueness check where it
was comparing a symbol to itself.
2019-08-31 20:40:38 -07:00
Andy McFadden
02c79db749 Add local variable uniquification
For ACME and cc65, enable uniqification.  This works with my basic
tests, but there are a lot of potential edge cases.
2019-08-31 14:19:50 -07:00
Andy McFadden
6a2532588b Local variables mostly work
Variables are now handled properly end-to-end, except for label
uniquification.  So cc65 and ACME can't yet handle a file that
redefines a local variable.

This required a bunch of plumbing, but I think it came out okay.
2019-08-30 18:39:29 -07:00