RFR: 8342090: Infer::IncorporationBinaryOp::equals can produce side-effects [v8]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Oct 24 14:40:08 UTC 2024
On Thu, 24 Oct 2024 14:13:26 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
>
> Vicente Romero has updated the pull request incrementally with two additional commits since the last revision:
>
> - Update src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
>
> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
> - Update src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
>
> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore at users.noreply.github.com>
Marked as reviewed by mcimadamore (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/21651#pullrequestreview-2392873491
More information about the compiler-dev
mailing list