Skip to content

Remove function-wide hash set from effectiveJavaModifiers - #3122

Merged
jaschdoc merged 6 commits into
mainfrom
refactor-effective-java-modifiers
Aug 18, 2026
Merged

Remove function-wide hash set from effectiveJavaModifiers#3122
jaschdoc merged 6 commits into
mainfrom
refactor-effective-java-modifiers

Conversation

@jaschdoc

@jaschdoc jaschdoc commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

This refactoring makes each branch of the when-expression mutually exclusive instead of mutating a shared hash map. This is done to make it easier to support upcoming backing field requirements. I might be a little slower due to joining immutable sets, but it makes it easier to make it correct. However, it's not clear if this is on a hot path so the correctness is preferred. I know this is a somewhat major change to the function internals, so feel free to request changes or reject the PR.

Related to #3110
Related to #2969
Related to #2873
Depends on #3126
Depends on #3130
Closes #3124

@jaschdoc
jaschdoc force-pushed the refactor-effective-java-modifiers branch 5 times, most recently from 9c21d23 to 055bd7b Compare August 7, 2026 09:36
@jaschdoc
jaschdoc force-pushed the refactor-effective-java-modifiers branch from b28c758 to 03f0ac3 Compare August 7, 2026 12:57
@jaschdoc
jaschdoc marked this pull request as ready for review August 17, 2026 10:28
@jaschdoc
jaschdoc requested a review from troelsbjerre as a code owner August 17, 2026 10:28
@jaschdoc
jaschdoc force-pushed the refactor-effective-java-modifiers branch from 03f0ac3 to 7c70e3f Compare August 17, 2026 10:28
@jaschdoc
jaschdoc marked this pull request as draft August 17, 2026 11:04
@jaschdoc
jaschdoc marked this pull request as ready for review August 17, 2026 11:08
@jaschdoc
jaschdoc marked this pull request as draft August 17, 2026 11:10
This refactoring makes each branch of the when-expression mutually exclusive instead of mutating a shared hash map.
This is done to make it easier to support upcoming backing field requirements.
For Kotlin sources, the JvmStatic annotation was not resolved if it were (type-) aliased.
This commit ensures it is always resolved.
@jaschdoc
jaschdoc force-pushed the refactor-effective-java-modifiers branch from f1ba010 to 362ac6b Compare August 17, 2026 13:08
@jaschdoc
jaschdoc marked this pull request as ready for review August 17, 2026 13:13
@jaschdoc
jaschdoc merged commit 491bd2e into main Aug 18, 2026
27 checks passed
@jaschdoc
jaschdoc deleted the refactor-effective-java-modifiers branch August 18, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolver.effectiveJavaModifiers does not add the JAVA_STATIC for JvmStatic annotation

2 participants