On Mon, 26 Jan 2026 12:13:30 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ExhaustivenessComputer.java
>> line 691:
>>
>>> 689: }
>>> 690:
>>> 691: protected void checkTimeout() {
>>
>> This is probably no longer a good name for this method.
>>
>> More seriously, I have a question as to why this method is only checked
>> (AFAICS) from `isBpCovered`. I would have expected it to be more directly
>> tied to `computeMissingPatternDescriptions` ?
>
> Maybe the intent is that you don't want to just check the "depth" of the
> check, but also the "width" -- e.g. if there's few nested record patterns,
> but each has a huge number of components.
Also, `isBpCovered` seems to be called by routines (like `reduceRecordPattern`)
that do not seem related to the new logic (which is what got me suspicious
about the location of the update to begin with). Which has (at least in theory)
potential for `TooManyChecksException` to trigger in places where it's not
expected? (but maybe that's handled by the special value `-1` which is
carefully set after the new logic runs)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27256#discussion_r2727385802