On Tue, 17 Jan 2023 18:09:51 GMT, Vicente Romero <vrom...@openjdk.org> wrote:

>> Archie L. Cobbs has updated the pull request incrementally with three 
>> additional commits since the last revision:
>> 
>>  - Remove unused type variable on method visitScoped().
>>  - Remove expression type filtering; it doesn't seem to be needed.
>>  - Clean up unused import.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ThisEscapeAnalyzer.java
>  line 215:
> 
>> 213:         // Classify all ctors and methods as analyzable and/or 
>> invokable.
>> 214:         // Track which constructors and fields have warnings suppressed.
>> 215:         new TreeScanner() {
> 
> I wonder if it would be better to have this visitor be defined externally, 
> the benefit of this would be that it can be created only once instead of 
> every time we enter this method, also I think it would improve the 
> readability of this method. But I let this to your consideration

This method is only supposed to ever be entered once...  but you made me 
realize that there should probably be an assertion check for that assumption.

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

PR: https://git.openjdk.org/jdk/pull/11874

Reply via email to