RFR: 8302344: Compiler Implementation for Unnamed patterns and variables (Preview) [v4]

Aggelos Biboudis abimpoudis at openjdk.org
Tue May 2 08:27:20 UTC 2023


On Fri, 28 Apr 2023 09:20:12 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update test files with JDK 8307007 bug id
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java line 746:
> 
>> 744: 
>> 745:         sealed interface PatternDescription {
>> 746:             public static PatternDescription from(Types types, Type selectorType, JCPattern pattern, Symtab syms) {
> 
> Optional comment: the fact that this factory needs so much compiler state makes me think that perhaps a better place for it would be as an instance method of Flow, rather than a static method in PatternDescription.

@lahodaj WDYT? Looks like it can be easily refactored and it is used only in one place (apart from the recursive call). I can refactor it in this PR or u can do it in #13074.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13528#discussion_r1182237560


More information about the compiler-dev mailing list