Integrated: 8342090: Infer::IncorporationBinaryOp::equals can produce side-effects
Vicente Romero
vromero at openjdk.org
Thu Oct 24 17:28: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
This pull request has now been integrated.
Changeset: d1540e2a
Author: Vicente Romero <vromero at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d1540e2a49c7a41eb771fc9896c367187d070dec
Stats: 127 lines in 4 files changed: 92 ins; 16 del; 19 mod
8342090: Infer::IncorporationBinaryOp::equals can produce side-effects
8288590: javac failure: incompatible types: cannot infer type arguments due to Object.hashCode collision
Co-authored-by: Maurizio Cimadamore <mcimadamore at openjdk.org>
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/21651
More information about the compiler-dev
mailing list