Re: RFR: 8279918: Fix various doc typos [v2]
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote: >> - Most of the typos are of a trivial kind: missing whitespace. >> - If any of the typos should be fixed in the upstream projects instead, >> please say so; I will drop those typos from the patch. >> - As I understand it, ` ` in ImageInputStream and DataInput is an irrelevant >> formatting artefact and thus can be removed. >> - `'` is an apostrophe, which does not require to be encoded. > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Additional typos javac changes look good to me. - Marked as reviewed by jlahoda (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7063
Re: RFR: 8260517: implement Sealed Classes as a standard feature in Java [v6]
On Sun, 2 May 2021 02:10:26 GMT, Vicente Romero wrote: >> Please review this PR that intents to make sealed classes a final feature in >> Java. This PR contains compiler and VM changes. In line with similar PRs, >> which has made preview features final, this one is mostly removing preview >> related comments from APIs plus options in test cases. Please also review >> the related [CSR](https://bugs.openjdk.java.net/browse/JDK-8265090) >> >> Thanks >> >> note: this PR is related to >> [PR-3528](https://github.com/openjdk/jdk/pull/3528) and must be integrated >> after it. > > Vicente Romero has updated the pull request incrementally with one additional > commit since the last revision: > > restoring jdk.internal.javac.PreviewFeature.Feature.SEALED_CLASSES, it is > needed by the build javac changes look good to me. - Marked as reviewed by jlahoda (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/3526
Re: RFR: 8246774: Record Classes (final) implementation [v6]
On Fri, 25 Sep 2020 00:41:47 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Vicente Romero has updated the pull request incrementally with one additional > commit since the last revision: > > adding missing changes to some tests Marked as reviewed by jlahoda (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/290
Re: RFR: 8246774: Record Classes (final) implementation [v3]
On Fri, 25 Sep 2020 15:47:30 GMT, Peter Levart wrote: >> [CSR: Record Classes](https://bugs.openjdk.java.net/browse/JDK-8253605) > > Hi @vicente-romero-oracle , note that besides tests, there is also a JMH > benchmark that measures the performance of > records deserialization (org.openjdk.bench.java.io.RecordDeserialization) > which forced us to modify the build procedure > for all benchmarks to include --enable-preview option in JDK 15 and backports > (see > https://bugs.openjdk.java.net/browse/JDK-8248135). If you undo this change in > JDK 16 then also the problem described in > https://bugs.openjdk.java.net/browse/JDK-8250669 and > https://bugs.openjdk.java.net/browse/JDK-8248429 will disapear. > After that, perhaps undoing the same for JDK 15 and backports together with > removing the benchmark is also possible to > resolve the issues in older releases as most developement will probably > happen in JDK 16 then and so the need for > performance testing will mostly be needed in there. We still have to figure > out how to enable having benchmarks for > preview features as in the future there most probably will be a need for that. Langtools code looks good to me. We probably can also remove the RECORDS entry from PreviewFeature.Feature. - PR: https://git.openjdk.java.net/jdk/pull/290
Re: Review Request: 8238358: Implementation of JEP 371: Hidden Classes
Hi Mandy, Regarding the javac changes - should those be switched on/off depending the Target? Or, if one compiles with e.g. --release 14, will the newly generated output still work on JDK 14? Jan On 27. 03. 20 0:57, Mandy Chung wrote: Please review the implementation of JEP 371: Hidden Classes. The main changes are in core-libs and hotspot runtime area. Small changes are made in javac, VM compiler (intrinsification of Class::isHiddenClass), JFR, JDI, and jcmd. CSR [1]has been reviewed and is in the finalized state (see specdiff and javadoc below for reference). Webrev: http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/webrev.03 Hidden class is created via `Lookup::defineHiddenClass`. From JVM's point of view, a hidden class is a normal class except the following: - A hidden class has no initiating class loader and is not registered in any dictionary. - A hidden class has a name containing an illegal character `Class::getName` returns `p.Foo/0x1234` whereas `GetClassSignature` returns "Lp/Foo.0x1234;". - A hidden class is not modifiable, i.e. cannot be redefined or retransformed. JVM TI IsModifableClass returns false on a hidden. - Final fields in a hidden class is "final". The value of final fields cannot be overriden via reflection. setAccessible(true) can still be called on reflected objects representing final fields in a hidden class and its access check will be suppressed but only have read-access (i.e. can do Field::getXXX but not setXXX). Brief summary of this patch: 1. A new Lookup::defineHiddenClass method is the API to create a hidden class. 2. A new Lookup.ClassOption enum class defines NESTMATE and STRONG option that can be specified when creating a hidden class. 3. A new Class::isHiddenClass method tests if a class is a hidden class. 4. Field::setXXX method will throw IAE on a final field of a hidden class regardless of the value of the accessible flag. 5. JVM_LookupDefineClass is the new JVM entry point for Lookup::defineClass and defineHiddenClass to create a class from the given bytes. 6. ClassLoaderData implementation is not changed. There is one primary CLD that holds the classes strongly referenced by its defining loader. There can be zero or more additional CLDs - one per weak class. 7. Nest host determination is updated per revised JVMS 5.4.4. Access control check no longer throws LinkageError but instead it will throw IAE with a clear message if a class fails to resolve/validate the nest host declared in NestHost/NestMembers attribute. 8. JFR, jcmd, JDI are updated to support hidden classes. 9. update javac LambdaToMethod as lambda proxy starts using nestmates and generate a bridge method to desuger a method reference to a protected method in its supertype in a different package This patch also updates StringConcatFactory, LambdaMetaFactory, and LambdaForms to use hidden classes. The webrev includes changes in nashorn to hidden class and I will update the webrev if JEP 372 removes it any time soon. We uncovered a bug in Lookup::defineClass spec throws LinkageError and intends to have the newly created class linked. However, the implementation in 14 does not link the class. A separate CSR [2] proposes to update the implementation to match the spec. This patch fixes the implementation. The spec update on JVM TI, JDI and Instrumentation will be done as a separate RFE [3]. This patch includes new tests for JVM TI and java.instrument that validates how the existing APIs work for hidden classes. javadoc/specdiff http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/api/ http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/specdiff/ JVMS 5.4.4 change: http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/Draft-JVMS-HiddenClasses.pdf CSR: https://bugs.openjdk.java.net/browse/JDK-8238359 Thanks Mandy [1] https://bugs.openjdk.java.net/browse/JDK-8238359 [2] https://bugs.openjdk.java.net/browse/JDK-8240338 [3] https://bugs.openjdk.java.net/browse/JDK-8230502
hg: jdk8/tl/langtools: 8028699: Compiler crash during speculative attribution of annotated type
Changeset: a746587a1ff1 Author:jlahoda Date: 2013-12-03 18:50 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/a746587a1ff1 8028699: Compiler crash during speculative attribution of annotated type Summary: Moving the checkForDeclarationAnnotations check into Attr.TypeAnnotationsValidator Reviewed-by: jjg Contributed-by: wdi...@gmail.com ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/comp/Check.java + test/tools/javac/annotations/typeAnnotations/failures/CheckForDeclAnnoNPE.java ! test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DeclarationAnnotation.java ! test/tools/javac/annotations/typeAnnotations/failures/common/arrays/DeclarationAnnotation.out
hg: jdk8/tl/langtools: 2 new changesets
Changeset: 8acb838c9b79 Author:jlahoda Date: 2013-11-26 15:27 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8acb838c9b79 8026374: javac accepts void as a method parameter Summary: Changing Check.validate to reject void types. Reviewed-by: jjg, vromero ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/comp/Check.java + test/tools/javac/declaration/method/MethodVoidParameter.java + test/tools/javac/declaration/method/MethodVoidParameter.out Changeset: 756ae3791c45 Author:jlahoda Date: 2013-11-26 15:33 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/756ae3791c45 8027789: Access method for Outer.super.m() references indirect superclass Summary: Internally convert the qualified super access to an equivalent of an unqualified super access inside the access method. Reviewed-by: vromero, jjg ! src/share/classes/com/sun/tools/javac/comp/Lower.java ! src/share/classes/com/sun/tools/javac/jvm/Gen.java + test/tools/javac/expression/_super/NonDirectSuper/Base.java + test/tools/javac/expression/_super/NonDirectSuper/NonDirectSuper.java + test/tools/javac/expression/_super/NonDirectSuper/Target11.java
hg: jdk8/tl/langtools: 6557966: Multiple upper bounds of the TypeVariable
Changeset: 7c89d200781b Author:jlahoda Date: 2013-11-20 13:44 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/7c89d200781b 6557966: Multiple upper bounds of the TypeVariable Summary: Adjusting javax.lang.model javadoc regarding IntersectionType, IntersectionType.accept now calls visitIntersection for all kinds of IntersectionTypes. Reviewed-by: darcy, vromero Contributed-by: joe.da...@oracle.com, jan.lah...@oracle.com ! src/share/classes/com/sun/tools/javac/code/Type.java ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/javax/lang/model/type/DeclaredType.java ! src/share/classes/javax/lang/model/type/IntersectionType.java ! src/share/classes/javax/lang/model/type/TypeVariable.java ! test/tools/javac/processing/model/type/IntersectionPropertiesTest.java
hg: jdk8/tl/langtools: 8027142: Invokedynamic instructions don't get line number table entries
Changeset: 6e0f31d61e56 Author:jlahoda Date: 2013-11-09 15:24 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/6e0f31d61e56 8027142: Invokedynamic instructions don't get line number table entries Summary: When emitting invokedynamic instruction, write pendingStatPos, if set, into the LineNumberTable. Invokedynamic itself does not set the pendingStatPos. Reviewed-by: jjg, jrose, ksrini, vromero ! src/share/classes/com/sun/tools/javac/jvm/Code.java ! test/tools/javac/T8019486/WrongLNTForLambdaTest.java ! test/tools/javac/lambda/TestInvokeDynamic.java
hg: jdk8/tl/langtools: 8027281: Incorrect invokespecial generated for JCK lang EXPR/expr636/expr63602m* tests
Changeset: 75c8cde12ab6 Author:jlahoda Date: 2013-11-06 17:48 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/75c8cde12ab6 8027281: Incorrect invokespecial generated for JCK lang EXPR/expr636/expr63602m* tests Summary: When invoking interface default method via a superclass, use the direct superclass in the reference. Reviewed-by: vromero, dlsmith, jjg ! src/share/classes/com/sun/tools/javac/comp/Lower.java + test/tools/javac/defaultMethods/super/TestDirectSuperInterfaceInvoke.java
hg: jdk8/tl/langtools: 8027310: Annotation Processor crashes with NPE
Changeset: 8b4e1421a9b7 Author:jlahoda Date: 2013-11-01 21:43 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8b4e1421a9b7 8027310: Annotation Processor crashes with NPE Summary: JCAnnotation.attribute is null when annotation type is unavailable Reviewed-by: jjg, jfranck ! src/share/classes/com/sun/tools/javac/comp/Attr.java + test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Processor.java + test/tools/javac/processing/errors/CrashOnNonExistingAnnotation/Source.java
hg: jdk8/tl/langtools: 2 new changesets
Changeset: abc3eaccba73 Author:jlahoda Date: 2013-10-23 23:02 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/abc3eaccba73 8027191: Fix for JDK-8026861 refers to an incorrect bug number Summary: Reverting changeset b05db8c815e8, so that it can be applied again with a correct bug number Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java - test/tools/javac/T8019486/WrongLNTForLambdaTest.java + test/tools/javac/T8019486/WrongLVTForLambdaTest.java Changeset: 864dafc5ab7a Author:jlahoda Date: 2013-10-23 07:50 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/864dafc5ab7a 8026861: Wrong LineNumberTable for variable declarations in lambdas Summary: Setting or correcting positions for many trees produced by LambdaToMethod. Reviewed-by: vromero, rfield ! src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java + test/tools/javac/T8019486/WrongLNTForLambdaTest.java - test/tools/javac/T8019486/WrongLVTForLambdaTest.java
hg: jdk8/tl/langtools: 8026508: Invokedynamic instructions don't get line number table entries
Changeset: b05db8c815e8 Author:jlahoda Date: 2013-10-23 07:50 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/b05db8c815e8 8026508: Invokedynamic instructions don't get line number table entries Summary: Setting or correcting positions for many trees produced by LambdaToMethod. Reviewed-by: vromero, rfield ! src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java + test/tools/javac/T8019486/WrongLNTForLambdaTest.java - test/tools/javac/T8019486/WrongLVTForLambdaTest.java
hg: jdk8/tl/langtools: 8026510: The name of com.sun.tools.javac.comp.Annotate.Annotator is confusing
Changeset: 19e8eebfbe52 Author:jlahoda Date: 2013-10-15 22:15 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/19e8eebfbe52 8026510: The name of com.sun.tools.javac.comp.Annotate.Annotator is confusing Summary: A mostly automated rename Annotate.Annotator->Annotate.Worker and enterAnnotation->run. Reviewed-by: emc, jjg ! src/share/classes/com/sun/tools/javac/code/SymbolMetadata.java ! src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java ! src/share/classes/com/sun/tools/javac/comp/Annotate.java ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java ! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
hg: jdk8/tl/langtools: 8026180: com.sun.source.tree.NewArrayTree refers to com.sun.tools.javac.util.List
Changeset: 79649bf21a92 Author:jlahoda Date: 2013-10-15 16:23 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/79649bf21a92 8026180: com.sun.source.tree.NewArrayTree refers to com.sun.tools.javac.util.List Summary: Correcting import in NewArrayTree, adding test protecting againts improper types in API signatures Reviewed-by: jjg ! src/share/classes/com/sun/source/tree/NewArrayTree.java + test/tools/javac/tree/NoPrivateTypesExported.java
hg: jdk8/tl/langtools: 8014016: javac is too late detecting invalid annotation usage
Changeset: 87b5bfef7edb Author:jlahoda Date: 2013-10-14 22:11 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/87b5bfef7edb 8014016: javac is too late detecting invalid annotation usage Summary: Adding new queue to Annotate for validation tasks, performing annotation validation during enter Reviewed-by: jjg, emc, jfranck ! src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java ! src/share/classes/com/sun/tools/javac/comp/Annotate.java ! src/share/classes/com/sun/tools/javac/comp/Attr.java ! src/share/classes/com/sun/tools/javac/comp/Check.java ! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java ! test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out + test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateFunctionalInterface.java + test/tools/javac/processing/errors/StopOnInapplicableAnnotations/GenerateSuperInterfaceProcessor.java + test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Processor.java + test/tools/javac/processing/errors/StopOnInapplicableAnnotations/Source.java
hg: jdk8/tl/langtools: 6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
Changeset: 872c4a898b38 Author:jlahoda Date: 2013-10-11 15:49 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/872c4a898b38 6278240: Exception from AnnotationValue.getValue() should list the found type not the required type Reviewed-by: darcy, jfranck, jjg ! src/share/classes/com/sun/tools/javac/code/Type.java ! src/share/classes/com/sun/tools/javac/comp/Annotate.java ! src/share/classes/com/sun/tools/javac/comp/MemberEnter.java + test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Processor.java + test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.java + test/tools/javac/processing/errors/EnsureAnnotationTypeMismatchException/Source.out
hg: jdk8/tl/langtools: 2 new changesets
Changeset: 0be3f1820e8b Author:jlahoda Date: 2013-10-09 13:06 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/0be3f1820e8b 8025141: java.lang.ClassFormatError: Illegal field modifiers in class (...) Summary: Should not generate non-public $assertionsDisabled field into interfaces Reviewed-by: jjg, vromero ! src/share/classes/com/sun/tools/javac/comp/Lower.java + test/tools/javac/defaultMethods/Assertions.java + test/tools/javac/defaultMethods/CannotChangeAssertionsStateAfterInitialized.java Changeset: 1b469fd31e35 Author:jlahoda Date: 2013-10-09 13:09 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/1b469fd31e35 8025087: Annotation processing api returns default modifier for interface static method Summary: ClassReader must not set Flags.DEFAULT for interface static methods Reviewed-by: vromero, jjg ! make/build.xml ! src/share/classes/com/sun/tools/javac/jvm/ClassReader.java ! src/share/classes/com/sun/tools/javac/resources/compiler.properties + test/tools/javac/defaultMethods/BadClassfile.java ! test/tools/javac/diags/examples.not-yet.txt + test/tools/javac/diags/examples/InvalidDefaultInterface/InvalidDefaultInterface.java + test/tools/javac/diags/examples/InvalidDefaultInterface/processors/CreateBadClassFile.java + test/tools/javac/diags/examples/InvalidStaticInterface/InvalidStaticInterface.java + test/tools/javac/diags/examples/InvalidStaticInterface/processors/CreateBadClassFile.java ! test/tools/javac/processing/model/element/TestExecutableElement.java
hg: jdk8/tl/langtools: 8025118: Annotation processing api returns default modifier for interface without default methods
Changeset: c13305cf8528 Author:jlahoda Date: 2013-10-04 08:29 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/c13305cf8528 8025118: Annotation processing api returns default modifier for interface without default methods Summary: TypeElement.getModifiers() should not contain Modifier.DEFAULT Reviewed-by: darcy, jjg ! src/share/classes/com/sun/tools/javac/code/Symbol.java + test/tools/javac/processing/model/element/TestTypeElement.java
hg: jdk8/tl/langtools: 8022765: Compiler crashes with exception on wrong usage of an annotation.
Changeset: b7d8b71e1658 Author:jlahoda Date: 2013-09-27 17:28 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/b7d8b71e1658 8022765: Compiler crashes with exception on wrong usage of an annotation. Summary: Error recovery for incorrect annotation attribute values - ensure the values are always attributed appropriately Reviewed-by: jfranck, jjg ! src/share/classes/com/sun/tools/javac/comp/Annotate.java ! src/share/classes/com/sun/tools/javac/comp/Attr.java + test/tools/javac/annotations/neg/8022765/T8022765.java + test/tools/javac/annotations/neg/8022765/T8022765.out + test/tools/javac/annotations/neg/8022765/VerifyAnnotationsAttributed.java
hg: jdk8/tl/langtools: 8025491: Javac regression test tools/javac/T8003967/DetectMutableStaticFields.java failing
Changeset: 9235ae08a449 Author:jlahoda Date: 2013-09-26 20:07 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/9235ae08a449 8025491: Javac regression test tools/javac/T8003967/DetectMutableStaticFields.java failing Summary: Making HtmlTree.NONENCODING_CHARS final Reviewed-by: jjg ! src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java
hg: jdk8/tl/langtools: 8023835: TreeMaker.QualIdent() too leafy
Changeset: 41599b57d262 Author:jlahoda Date: 2013-09-20 16:33 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/41599b57d262 8023835: TreeMaker.QualIdent() too leafy Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/tree/TreeMaker.java + test/tools/javac/tree/MakeQualIdent.java + test/tools/javac/tree/ScopeTest.java
hg: jdk8/tl/langtools: 8022567: Javac Should Generate Warnings For Raw Array Type
Changeset: 8d1c48de706d Author:jlahoda Date: 2013-09-19 17:05 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/8d1c48de706d 8022567: Javac Should Generate Warnings For Raw Array Type Reviewed-by: jjg ! src/share/classes/com/sun/tools/javac/comp/Check.java ! test/tools/javac/warnings/6747671/T6747671.java ! test/tools/javac/warnings/6747671/T6747671.out