-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[GR-62356] Replace ASM with ClassFile API #10758
base: master
Are you sure you want to change the base?
Conversation
@liach could you please review this PR and see if there is anything that can be improved? |
.../src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/CustomizedBytecodePattern.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/DynamicConstantTest.java
Outdated
Show resolved
Hide resolved
compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test/DynamicConstantTest.java
Outdated
Show resolved
Hide resolved
.trying(tryBlock -> { | ||
tryBlock | ||
.iload(1) | ||
.invokestatic(classSharedExceptionHandlerClass, "foo", MethodTypeDesc.of(CD_int, CD_int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can cache this MethodTypeDesc in a variable and reuse that variable. MethodTypeDesc caches its descriptor string, so reusing the same instance is actually helpful to the ClassFile API's generation.
This PR replaces ASM usage with ClassFile API in Graal unit tests. There are three kind of usages:
CustomizedBytecodePatternTest
is now an interface and allows multiple definition in subclass, see jdk.graal.compiler.core.test.ResolveDynamicConstantTest