RFR: 8342090: Infer::IncorporationBinaryOp::equals can produce side-effects [v2]

Vicente Romero vromero at openjdk.org
Wed Oct 23 05:22:47 UTC 2024


> 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 one additional commit since the last revision:

  stress tests

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/21651/files
  - new: https://git.openjdk.org/jdk/pull/21651/files/0285ae2c..8e5477be

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=21651&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=21651&range=00-01

  Stats: 1705 lines in 1391 files changed: 1529 ins; 6 del; 170 mod
  Patch: https://git.openjdk.org/jdk/pull/21651.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/21651/head:pull/21651

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


More information about the compiler-dev mailing list