-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More downstream stuff #31
base: nickelpro-develop
Are you sure you want to change the base?
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 theMethodHandle
constant. 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_attr
method or something.A
TableAttribute
base class is addedReferenceKind
is now anIntEnum