Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openjdk/jdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7d2a7ce2
Choose a base ref
...
head repository: openjdk/jdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bcdf0f11
Choose a head ref
  • 19 commits
  • 106 files changed
  • 1 contributor

Commits on May 25, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    890b208 View commit details
  2. fixed benchmarks

    asotona committed May 25, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    fef1d37 View commit details
  3. fixing classfile tests

    asotona committed May 25, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    da40926 View commit details

Commits on May 26, 2023

  1. fixed classfile tests

    asotona committed May 26, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    74d5c58 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    e62a654 View commit details
  3. fixing codebase and tests

    asotona committed May 26, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    01766ca View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    098e71b View commit details
  5. moving Options up the Context

    asotona committed May 26, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    4456ca7 View commit details

Commits on May 29, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    54b1746 View commit details
  2. fixed jdk/classfile tests

    asotona committed May 29, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    535b39d View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    robjtede Rob Ede
    Copy the full SHA
    7f722a8 View commit details
  4. fixed tests

    asotona committed May 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    200f28b View commit details
  5. added test for StackMapsOption.ALWAYS_GENERATE_STACK_MAPS

    fixed DirectCodeBuilder and added fast bypass when stack map is not needed
    asotona committed May 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d86d093 View commit details

Commits on May 31, 2023

  1. implementation of Classfile::withOptions(Option... options)

    ClassfileImpl made immutable
    "options" use across implementation renamed to "context"
    asotona committed May 31, 2023
    Copy the full SHA
    b7e42aa View commit details
  2. Copy the full SHA
    5ba6ffc View commit details
  3. Copy the full SHA
    f705d5a View commit details
  4. Copy the full SHA
    19bb14e View commit details

Commits on Jun 1, 2023

  1. fixed javadoc

    asotona committed Jun 1, 2023
    Copy the full SHA
    72391bb View commit details
  2. Copy the full SHA
    bcdf0f1 View commit details
Showing with 1,384 additions and 1,101 deletions.
  1. +2 −2 src/java.base/share/classes/java/lang/Module.java
  2. +0 −19 src/java.base/share/classes/jdk/internal/classfile/ClassModel.java
  3. +1 −1 src/java.base/share/classes/jdk/internal/classfile/ClassReader.java
  4. +505 −451 src/java.base/share/classes/jdk/internal/classfile/Classfile.java
  5. +1 −1 src/java.base/share/classes/jdk/internal/classfile/ClassfileTransform.java
  6. +1 −1 src/java.base/share/classes/jdk/internal/classfile/PseudoInstruction.java
  7. +1 −1 src/java.base/share/classes/jdk/internal/classfile/attribute/LineNumberTableAttribute.java
  8. +1 −1 src/java.base/share/classes/jdk/internal/classfile/attribute/LocalVariableTableAttribute.java
  9. +1 −1 src/java.base/share/classes/jdk/internal/classfile/attribute/LocalVariableTypeTableAttribute.java
  10. +3 −3 src/java.base/share/classes/jdk/internal/classfile/components/ClassRemapper.java
  11. +18 −14 src/java.base/share/classes/jdk/internal/classfile/components/snippet-files/PackageSnippets.java
  12. +8 −15 src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantPoolBuilder.java
  13. +3 −1 src/java.base/share/classes/jdk/internal/classfile/impl/AbstractDirectBuilder.java
  14. +1 −1 src/java.base/share/classes/jdk/internal/classfile/impl/BoundAttribute.java
  15. +11 −5 src/java.base/share/classes/jdk/internal/classfile/impl/BufWriterImpl.java
  16. +4 −1 src/java.base/share/classes/jdk/internal/classfile/impl/BufferedCodeBuilder.java
  17. +4 −1 src/java.base/share/classes/jdk/internal/classfile/impl/BufferedFieldBuilder.java
  18. +7 −4 src/java.base/share/classes/jdk/internal/classfile/impl/BufferedMethodBuilder.java
  19. +4 −4 src/java.base/share/classes/jdk/internal/classfile/impl/ChainedClassBuilder.java
  20. +6 −17 src/java.base/share/classes/jdk/internal/classfile/impl/ClassImpl.java
  21. +6 −6 src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java
  22. +140 −0 src/java.base/share/classes/jdk/internal/classfile/impl/ClassfileImpl.java
  23. +5 −2 src/java.base/share/classes/jdk/internal/classfile/impl/CodeImpl.java
  24. +9 −8 src/java.base/share/classes/jdk/internal/classfile/impl/DirectClassBuilder.java
  25. +42 −24 src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java
  26. +2 −1 src/java.base/share/classes/jdk/internal/classfile/impl/DirectFieldBuilder.java
  27. +4 −3 src/java.base/share/classes/jdk/internal/classfile/impl/DirectMethodBuilder.java
  28. +0 −82 src/java.base/share/classes/jdk/internal/classfile/impl/Options.java
  29. +1 −14 src/java.base/share/classes/jdk/internal/classfile/impl/SplitConstantPool.java
  30. +24 −19 src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java
  31. +1 −1 src/java.base/share/classes/jdk/internal/classfile/instruction/CharacterRange.java
  32. +1 −1 src/java.base/share/classes/jdk/internal/classfile/instruction/LineNumber.java
  33. +1 −1 src/java.base/share/classes/jdk/internal/classfile/instruction/LocalVariable.java
  34. +1 −1 src/java.base/share/classes/jdk/internal/classfile/instruction/LocalVariableType.java
  35. +27 −26 src/java.base/share/classes/jdk/internal/classfile/package-info.java
  36. +19 −16 src/java.base/share/classes/jdk/internal/classfile/snippet-files/PackageSnippets.java
  37. +2 −2 src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java
  38. +3 −2 src/java.base/share/classes/jdk/internal/module/ModuleInfoExtender.java
  39. +1 −1 src/jdk.jartool/share/classes/sun/tools/jar/FingerPrint.java
  40. +1 −1 src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java
  41. +2 −2 src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/AbstractPlugin.java
  42. +9 −8 src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/StripJavaDebugAttributesPlugin.java
  43. +3 −3 src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
  44. +3 −1 src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/VersionPropsPlugin.java
  45. +4 −3 src/jdk.jshell/share/classes/jdk/jshell/execution/LocalExecutionControl.java
  46. +1 −1 test/jdk/java/lang/module/ModuleDescriptorTest.java
  47. +12 −8 test/jdk/jdk/classfile/AdaptCodeTest.java
  48. +20 −15 test/jdk/jdk/classfile/AdvancedTransformationsTest.java
  49. +1 −1 test/jdk/jdk/classfile/AnnotationModelTest.java
  50. +6 −4 test/jdk/jdk/classfile/AnnotationTest.java
  51. +1 −1 test/jdk/jdk/classfile/ArrayTest.java
  52. +3 −2 test/jdk/jdk/classfile/BSMTest.java
  53. +3 −2 test/jdk/jdk/classfile/BasicBlockTest.java
  54. +3 −2 test/jdk/jdk/classfile/BoundAttributeTest.java
  55. +12 −12 test/jdk/jdk/classfile/BuilderBlockTest.java
  56. +3 −4 test/jdk/jdk/classfile/BuilderParamTest.java
  57. +4 −4 test/jdk/jdk/classfile/BuilderTryCatchTest.java
  58. +3 −2 test/jdk/jdk/classfile/ClassBuildingTest.java
  59. +3 −3 test/jdk/jdk/classfile/ClassHierarchyInfoTest.java
  60. +2 −1 test/jdk/jdk/classfile/ClassPrinterTest.java
  61. +2 −1 test/jdk/jdk/classfile/ConstantPoolCopyTest.java
  62. +16 −12 test/jdk/jdk/classfile/CorpusTest.java
  63. +15 −9 test/jdk/jdk/classfile/DiscontinuedInstructionsTest.java
  64. +3 −2 test/jdk/jdk/classfile/FilterDeadLabelsTest.java
  65. +3 −2 test/jdk/jdk/classfile/LDCTest.java
  66. +4 −4 test/jdk/jdk/classfile/LimitsTest.java
  67. +3 −2 test/jdk/jdk/classfile/LowAdaptTest.java
  68. +1 −1 test/jdk/jdk/classfile/LowJCovAttributeTest.java
  69. +1 −1 test/jdk/jdk/classfile/LowModuleTest.java
  70. +14 −11 test/jdk/jdk/classfile/LvtTest.java
  71. +2 −2 test/jdk/jdk/classfile/MassAdaptCopyCodeTest.java
  72. +4 −3 test/jdk/jdk/classfile/MassAdaptCopyPrimitiveMatchCodeTest.java
  73. +7 −5 test/jdk/jdk/classfile/ModuleBuilderTest.java
  74. +3 −3 test/jdk/jdk/classfile/OneToOneTest.java
  75. +2 −2 test/jdk/jdk/classfile/OpcodesValidationTest.java
  76. +1 −1 test/jdk/jdk/classfile/PrimitiveClassConstantTest.java
  77. +53 −43 test/jdk/jdk/classfile/ShortJumpsFixTest.java
  78. +1 −1 test/jdk/jdk/classfile/SignaturesTest.java
  79. +69 −0 test/jdk/jdk/classfile/SnippetsTest.java
  80. +25 −16 test/jdk/jdk/classfile/StackMapsTest.java
  81. +2 −2 test/jdk/jdk/classfile/StackTrackerTest.java
  82. +1 −1 test/jdk/jdk/classfile/StreamedVsListTest.java
  83. +1 −1 test/jdk/jdk/classfile/SwapTest.java
  84. +3 −2 test/jdk/jdk/classfile/TempConstantPoolBuilderTest.java
  85. +10 −7 test/jdk/jdk/classfile/TestRecordComponent.java
  86. +12 −9 test/jdk/jdk/classfile/TransformTests.java
  87. +3 −3 test/jdk/jdk/classfile/Utf8EntryTest.java
  88. +5 −4 test/jdk/jdk/classfile/VerifierSelfTest.java
  89. +2 −2 test/jdk/jdk/classfile/WriteTest.java
  90. +7 −5 test/jdk/jdk/classfile/examples/AnnotationsExamples.java
  91. +18 −18 test/jdk/jdk/classfile/examples/ExampleGallery.java
  92. +1 −1 test/jdk/jdk/classfile/examples/ExperimentalTransformExamples.java
  93. +4 −3 test/jdk/jdk/classfile/examples/ModuleExamples.java
  94. +6 −5 test/jdk/jdk/classfile/examples/TransformExamples.java
  95. +1 −1 test/jdk/jdk/classfile/helpers/RebuildingTransformation.java
  96. +28 −22 test/jdk/jdk/classfile/helpers/Transforms.java
  97. +1 −1 test/lib/jdk/test/lib/util/ModuleInfoWriter.java
  98. +2 −1 test/micro/org/openjdk/bench/jdk/classfile/AdHocAdapt.java
  99. +5 −1 test/micro/org/openjdk/bench/jdk/classfile/GenerateStackMaps.java
  100. +9 −6 test/micro/org/openjdk/bench/jdk/classfile/ParseOptions.java
  101. +4 −2 test/micro/org/openjdk/bench/jdk/classfile/ReadDeep.java
  102. +6 −3 test/micro/org/openjdk/bench/jdk/classfile/ReadMetadata.java
  103. +25 −24 test/micro/org/openjdk/bench/jdk/classfile/RebuildMethodBodies.java
  104. +2 −1 test/micro/org/openjdk/bench/jdk/classfile/RepeatedModelTraversal.java
  105. +25 −19 test/micro/org/openjdk/bench/jdk/classfile/Transforms.java
  106. +2 −2 test/micro/org/openjdk/bench/jdk/classfile/Write.java
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/Module.java
Original file line number Diff line number Diff line change
@@ -1590,8 +1590,8 @@ private Class<?> loadModuleInfoClass() {
*/
private Class<?> loadModuleInfoClass(InputStream in) throws IOException {
final String MODULE_INFO = "module-info";
byte[] bytes = Classfile.parse(in.readAllBytes(),
Classfile.Option.constantPoolSharing(false)).transform((clb, cle) -> {
var cc = Classfile.of(Classfile.ConstantPoolSharingOption.DO_NOT_SHARE_CONSTANT_POOL);
byte[] bytes = cc.transform(cc.parse(in.readAllBytes()), (clb, cle) -> {
switch (cle) {
case AccessFlags af -> clb.withFlags(AccessFlag.INTERFACE,
AccessFlag.ABSTRACT, AccessFlag.SYNTHETIC);
19 changes: 0 additions & 19 deletions src/java.base/share/classes/jdk/internal/classfile/ClassModel.java
Original file line number Diff line number Diff line change
@@ -72,25 +72,6 @@ public sealed interface ClassModel
/** {@return the interfaces implemented by this class} */
List<ClassEntry> interfaces();

/**
* Transform this classfile into a new classfile with the aid of a
* {@link ClassTransform}. The transform will receive each element of
* this class, as well as a {@link ClassBuilder} for building the new class.
* The transform is free to preserve, remove, or replace elements as it
* sees fit.
*
* @implNote
* <p>This method behaves as if:
* {@snippet lang=java :
* Classfile.build(thisClass(), ConstantPoolBuilder.of(this),
* b -> b.transform(this, transform));
* }
*
* @param transform the transform
* @return the bytes of the new class
*/
byte[] transform(ClassTransform transform);

/** {@return whether this class is a module descriptor} */
boolean isModuleInfo();

Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ public sealed interface ClassReader extends ConstantPool

/**
* {@return the table of custom attribute mappers} This is derived from
* the processing option {@link Classfile.Option#attributeMapper(Function)}.
* the processing option {@link Classfile.AttributeMapperOption}.
*/
Function<Utf8Entry, AttributeMapper<?>> customAttributes();

Loading