-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[WIP] Add substitutions for annotation constructors #981
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
Conversation
…ation. PullRequest: graal/2906
Using `--debug-images` will include `.debug` debug info files as well as extracted sources in the GraalVM.
PullRequest: graal/2929
@@ -158,6 +158,11 @@ private synchronized AnnotationSubstitutionType getSubstitution(ResolvedJavaType | |||
} | |||
result.addSubstitutionMethod(originalMethod, substitutionMethod); | |||
} | |||
for (ResolvedJavaMethod originalMethod : type.getDeclaredConstructors()) { | |||
AnnotationSubstitutionMethod substitutionMethod = new AnnotationAccessorMethod(originalMethod); | |||
result.addSubstitutionField(new AnnotationSubstitutionField(result, originalMethod, snippetReflection, metaAccess)); |
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.
Why do we need the field here?
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.
We don't. I modified that substitution into a DeadNode substitution to see why this is called at runtime. However, this generates another exception during image generation:
java.lang.reflect.InaccessibleObjectException: Unable to make public final java.lang.String com.sun.proxy.jdk.proxy1.$Proxy117.value() accessible: module jdk.proxy1 does not "exports com.sun.proxy.jdk.proxy1" to unnamed module @59c38d4
In order to isolate this problem, it would be good to intercept the creation of the $Proxy implementations.
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.
This seems like another issue related to JDK 11. I would suspect it will happen here com.oracle.svm.reflect.proxy.DynamicProxySupport
and here com.oracle.svm.core.jdk.proxy.Target_java_lang_reflect_Proxy#getProxyClass0
.
Now I see that it is done for the JDK 8 only. @cstancu @Peter-B-Kessler is there any work-in-progress on proxies for JDK 11?
…what NativeImageGenerator expects.
PullRequest: graal/2920
* Share the common logic in GeneratorUtils.
…gory until removed
* Still support `--help:debug` but deprecate it.
PullRequest: graal/2971
PullRequest: graal/2977
PullRequest: graal/2948
PullRequest: graal/2945
PullRequest: graal/2884
…c libs. PullRequest: graal/2979
PullRequest: graal/2986
PullRequest: graal/2796
PullRequest: graal/2939
…68-annotationinit
…68-annotationinit
A clean PR for this is #1001 |
No description provided.