Skip to content

[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

Closed
wants to merge 238 commits into from

Conversation

johanvos
Copy link
Contributor

No description provided.

olpaw and others added 5 commits February 15, 2019 02:16
Using `--debug-images` will include `.debug` debug info files as well as
extracted sources in the GraalVM.
@@ -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));
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

ansalond and others added 22 commits February 22, 2019 00:25
PullRequest: graal/2971
PullRequest: graal/2948
@johanvos
Copy link
Contributor Author

A clean PR for this is #1001

@cstancu cstancu closed this Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.