-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
8294960: Convert java.base/java.lang.invoke package to use the Classfile API to generate lambdas and method handlers #12945
Conversation
…e and added test (openjdk#11)
…lang.reflect.AccesFlag in Classfile API and tests
…andleInfo implemented RebuildingTransformation and added to Transforms and CorpusTest reduced CorpusTestHelper output and adjusted TEST.properties
MethodParameterInfo name parameter changed to Optional added MethodParameterInfo::ofParameter(Optional<String>,int) implemented TemporaryConstantPool::stringEntry adjusted BoundAttribute and RebuildingTransformation test helper
EnclosingMethodAttribute factory method changed to accept Optionals added EnclosingMethodAttribute::of(ClassDesc,Optional<String>,Optional<MethodTypeDesc>) added EnclosingMethodAttribute accessor methods InnerClassInfo all factory methods changed to accept Optionals added NestHostAttribute::of(ClassDesc) added SourceIDAttribute::of(String) changes reflected in BoundAttribute and RebuildTransformation test helper
* added TypeAnnotation factory methods accepting ClassDesc and AnnotationElement... AnnotationValue.OfConstant sub-classed to allow switch pattern matching RebuildingTransformation test helper adjusted * added TypeAnnotation.TargetInfo factory methods with validity checking for multi-target types adjusted RebuildTransformation test helper
…Symbol (openjdk#13) refactored to FieldModel::fieldTypeSymbol and MethodModel::methodTypeSymbol (openjdk#13) added round testing of signatures in RebuildTransformation test helper
… a frame type. Doing so, make the chop size available to consumers of frames.
…ptor argument slots
@liach thank you for the review |
…java Co-authored-by: liach <7806504+liach@users.noreply.github.com>
@asotona This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
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.
See: #12945 (review)
src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java
Outdated
Show resolved
Hide resolved
src/java.base/share/classes/java/lang/invoke/GenerateJLIClassesHelper.java
Outdated
Show resolved
Hide resolved
@asotona this pull request can not be integrated into git checkout JDK-8294960-lambdas
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
} | ||
return cw.toByteArray(); | ||
return Classfile.of().build(ClassDesc.of("InjectedInvoker"), clb -> clb | ||
.withFlags(Classfile.ACC_PRIVATE | Classfile.ACC_SUPER) |
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.
Don't think ACC_PRIVATE
works for classes; ASM might have a workaround to apply this onto an InnerClasses
attribute, but we cannot modify the outer class to inject attributes so only adding this to inner class's InnerClasses
is meaningless.
# Conflicts: # src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java # src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
src/java.base/share/classes/java/lang/invoke/ClassSpecializer.java
Outdated
Show resolved
Hide resolved
src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
Outdated
Show resolved
Hide resolved
src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
Outdated
Show resolved
Hide resolved
…sHelper.java Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
…sHelper.java Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
…java Co-authored-by: liach <7806504+liach@users.noreply.github.com>
…nerator.java Co-authored-by: liach <7806504+liach@users.noreply.github.com>
@asotona This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Unfortunately this PR went far out of the sync to merge or rebase, so I have to close it and start a new PR with squashed and rebased changes from this one. |
Work on java.lang.invoke package conversion continues in #17108 |
java.base java.lang.invoke package heavily uses ASM to generate lambdas and method handlers
This patch converts ASM calls to Classfile API.
This PR is initially chained on 8294982: Implementation of Classfile API #10982
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/12945/head:pull/12945
$ git checkout pull/12945
Update a local copy of the PR:
$ git checkout pull/12945
$ git pull https://git.openjdk.org/jdk.git pull/12945/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12945
View PR using the GUI difftool:
$ git pr show -t 12945
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12945.diff