On Tue, 3 Oct 2023 09:08:31 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Aggelos Biboudis has updated the pull request with a new target base due to 
>> a merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains four additional 
>> commits since the last revision:
>> 
>>  - Merge branch 'master' into primitive-patterns
>>  - Implement type pairs to exactnessMethod name
>>  - Apply suggestions from code review
>>    
>>    Co-authored-by: Raffaello Giulietti <raffaello.giulie...@oracle.com>
>>  - 8303374: Compiler Implementation for Primitive types in patterns, 
>> instanceof, and switch (Preview)
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java line 3001:
> 
>> 2999:     }
>> 3000: 
>> 3001:     static class TypePairs {
> 
> I believe this could be a record between two TypeSymbols? Then you could have 
> an additional constructor that takes two types and retrieves their `tsym` and 
> call the canonical constructor (and then you can drop equals/hashcode).

Done and simplified 
https://github.com/openjdk/jdk/pull/15638/commits/ef98c040c909981077936c6ff4280b6da04b8c24.
 Do you think we can simplify further (or benefit at all) by also eliminating 
duplication between SwitchBootstrap and Lower?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15638#discussion_r1345545796

Reply via email to