RFR: 8325859: potential information loss during type inference [v3]

Vicente Romero vromero at openjdk.org
Thu May 15 17:17:54 UTC 2025


On Thu, 15 May 2025 16:44:48 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Maybe we can replace the visitor with asking `supplimentaryIC.free(t)` ? e.g. this could maybe use recusion?
> 
> ```
> Type result = t;
> if (current.free(t)) {
>     result = types.subst(t, inferencevars, instTypes());
> }
> if (supplimentaryIC != null) {
>     return supplimentaryIC.asInstTypes(t);
>  }
> ```

right but won't this solution imply to recursively visit the whole chain of supplementaryICs? the current approach should stop as soon as there are no more supplementaryICs to visit. Actually I think that one of our performance tests failed and that was why I had to introduce this visitor if I recall correctly

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25011#discussion_r2091647347


More information about the compiler-dev mailing list