Support CONSTANT_Module/CONSTANT_Package tags (#252) - #603
Open
kallal79 wants to merge 1 commit into
Open
Conversation
…er#252) with regression tests and parallel-safe compiler usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change implements full support for the two constant‑pool entries introduced in Java 9:
added CONSTANT_Module (tag 19) and CONSTANT_Package (tag 20) constants
extended ClassFile.parseCp() (first‑ and second‑pass) to recognise and resolve them
updated ClassFilePrinter so that the new entries are printed in dumps
added a new regression test, PackageModuleConstantTest, which:
dynamically compiles module-info.java and package-info.java
verifies that the resulting class files contain the module or package name in cpValue
uses an external javac invocation and relaxed matching to be safe under parallel test execution
minor fixes to existing FileTest/URLClassLoaderTest tests to ensure they run cleanly
updated output.txt with the new constant names
All existing tests continue to pass; the full build now succeeds with 1016 parallel + 16 single‑thread tests.
This addresses issue #252.