Integrated: 8357185: Redundant local variables with unconditionally matching primitive patterns
Chen Liang
liach at openjdk.org
Wed Jul 9 12:16:48 UTC 2025
On Wed, 2 Jul 2025 23:06:42 GMT, Chen Liang <liach at openjdk.org> wrote:
> A commit in the implementation of JEP 455, https://github.com/openjdk/jdk/pull/15638/commits/ceee1e4c08457a0793fdfb556db99e057a947af1, added redundant synthetic local variable for trivial `instanceof int`-ish type conversion operations in the javac AST. Such conversions have been present since the introduction of record patterns, and previously they consistently lower to the part before `instanceof`. With this change, the introduced redundant variable is visible in the class file, as seen in the JBS issue.
>
> Testing: langtools/tools/javac
This pull request has now been integrated.
Changeset: d886ae12
Author: Chen Liang <liach at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d886ae12a2ee3ce519c736d8950a17a0ce63ca78
Stats: 161 lines in 4 files changed: 124 ins; 17 del; 20 mod
8357185: Redundant local variables with unconditionally matching primitive patterns
Reviewed-by: jlahoda, abimpoudis
-------------
PR: https://git.openjdk.org/jdk/pull/26107
More information about the compiler-dev
mailing list