More downstream stuff#31
Conversation
6687eea to
abd2292
Compare
|
Second commit does exactly what it says on the tin, which is very useful for searching methods for various instructions for ins in code.find(f=lambda x: x.name in ('ldc', 'ldc_w'))vs for ins in code.find(name=('ldc','ldc_w')) |
40b82f1 to
2c4e0e2
Compare
|
Wait, I'm dumb, this checks node names not name names. Reverting. I think this needs a better solution because this operation is super common and using a lambda feels clunky. |
2c4e0e2 to
abd2292
Compare
b24d96e to
e6f7dca
Compare
The I'll probably re-organize the files a bit, such as moving The reason why I'm trying to keep all the constants unpacked in the AST is to make transformation easier. Constants are a pain, because you can't just edit what you're on, such as an Keep in mind all of this is "alpha" stage, so if you have better suggestions feel free to bring them up :) |
|
That makes perfect sense, I'll have the other attributes unroll constants as well |
This gets entries for all of the various table attributes out of the AST.
For
BootstrapMethods, it unrolls theMethodHandleconstant. Admittedly I don't understand this recommendation 100%, but I don't have a good reason not to do it either. Constants are still rolled into all other attributes though, so let me know if I should be unrolling constants across the board. If that's the case we might want to look into a more universalto_attrmethod or something.A
TableAttributebase class is addedReferenceKindis now anIntEnum