Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 220 forks source link

Add Debug Output #6

Closed ghost closed 8 years ago

ghost commented 11 years ago

Would it be possible to add a debug output that shows us anything in the Constant Pool that is unused?

Storyyeller commented 11 years ago

Do you mean unused entries in a classfile's constant pool? Or unused constants in the assembly file?

For the first: Well it's possible, though it will require some work to ensure that every single Constant Pool reference is counted. The big question is what the point is. I think you're unlikely to find any classes with unused cp entries because compilers aren't going to generate them. So unless you have a class that was handwritten and someone intentionally added unused entries, there's not much point.

For the second: In this case it's easier to check, but again there's not much point. Unless you're deliberately adding them by assigning to raw indices, unused entries won't be generated in the output classfile. All it means is potentially some extra clutter in the assembly file.

ghost commented 11 years ago

Well the first one, more of in case something isn't added during the disassemble process

Storyyeller commented 8 years ago

This is obsolete due to the new disassembler.