RFR: 8342090: Infer::IncorporationBinaryOp::equals can produce side-effects

Vicente Romero vromero at openjdk.org
Tue Oct 22 23:20:17 UTC 2024


On Tue, 22 Oct 2024 23:09:51 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> Type inference uses a cache to store incorporation operations already done. This way we can avoid redoing operations that once done won't produce any change. This can reduce the compilation time when the number of inference variables involved is not trivial. The elements in the cache are implemented with class `com.sun.tools.javac.comp.Infer::IncorporationBinaryOp` the problem here is that the equals method of this class can produce side effects, implying that after a comparison the compared objects can mutate. This patch is fixing this issue,
> 
> TIA

tests still running

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

PR Comment: https://git.openjdk.org/jdk/pull/21651#issuecomment-2430488344


More information about the compiler-dev mailing list