It would be good if someone else looking at this code had some idea what everything was supposed to do.
I'm about to reuse it to display Key contents
I'd like to remove all the PACT types from the constant output, so lets let each type handle displaying the type.
Lets me remove a lot of string() conversions
Involves updating Packfile.Subroutine to store the sig and disasm to print it.
This tracks labels based on Subroutine identity instead of name, which is far more reliable. This also means that we handle labels for multis correctly now!
Oh, it does it wrong, but it at least shows them
Probably more intelligible than the dumper output.
It's just the real guts of disasm pulled out into a 'library'. Not a good interface right now, but it's enough that I can start trying to test this mess.
Forgot to add them to the Op before using them to parse the other arguments.
This is much better than parsing everything and then ignoring the result.
Since annotations are scoped by bytecode index, they remain active across subroutine boundries.
Since we check annotations before updating the current sub (since the sub needs to add all the active annotations anyway), remove useless annotations from the end of the old sub.
This lets me use _dumper to see if I'm building what I think I'm building. Of course, I'm not...
I was referring to it when writing parse_arg, but now that's mostly done.
Add a constructor that understands native keys and use it when disassembling.
Winxed (experimentally) allows :type variable(arg) for var variable = new type(arg). It seems far more readable.
Very hacky way of doing it, but gives enough information to figure out what's going on.
This mattered less when it was just a pile of notes, but now that we're getting real code in here, we should make it official.
Now we can actually display keys instead of just giving up. whiteknight++
Keys can refer to registers that won't exist in the disassembler code. This is... bad, to say the least. For now, just disable printing them. Long term, we're going to need better key introspection.
90% of the code uses tabs. Fix the other 10%. There's more than one person editing now. I suppose some thought should go into code standards soon.
…Use that new function to print PMC values inline when printing bytecode.
…print out where the individual subroutines start/stop. This helps give us some valuable landmarks while reading the bytecode dump