Skip to content

GROOVY-12022: replace indy code for array access in static compilation#2546

Open
blackdrag wants to merge 3 commits into
masterfrom
feature/GROOVY-12022/deprecate_IndyStaticTypesMultiTypeDispatcher
Open

GROOVY-12022: replace indy code for array access in static compilation#2546
blackdrag wants to merge 3 commits into
masterfrom
feature/GROOVY-12022/deprecate_IndyStaticTypesMultiTypeDispatcher

Conversation

@blackdrag
Copy link
Copy Markdown
Contributor

replace indy code for array access in static compilation mode with existing code in BytecodeInterface8 and deprecate now surplus IndyStaticTypesMultiTypeDispatcher. Performance wise there is no gain to use indy here and it simplifies code paths and JIT work

blackdrag added 2 commits May 19, 2026 08:44
…n mode with existing code in BytecodeInterface8 and deprecate now surplus IndyStaticTypesMultiTypeDispatcher. Performance wise there is no gain to use indy here and it simplifies code paths and JIT work
… old invokedynamic instruction is no longer valid
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.1517%. Comparing base (f1f1efa) to head (1c2bd18).
⚠️ Report is 17 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##               master      #2546        +/-   ##
==================================================
- Coverage     68.1956%   68.1517%   -0.0439%     
- Complexity      32936      33102       +166     
==================================================
  Files            1503       1508         +5     
  Lines          125706     126145       +439     
  Branches        22743      22886       +143     
==================================================
+ Hits            85726      85970       +244     
- Misses          32422      32548       +126     
- Partials         7558       7627        +69     
Files with missing lines Coverage Δ
...sm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java 0.0000% <ø> (-100.0000%) ⬇️
...y/classgen/asm/sc/StaticTypesWriterController.java 91.2500% <100.0000%> (-0.3163%) ⬇️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR (GROOVY-12022) simplifies static compilation bytecode generation for array access by replacing the indy-based array access path with the existing BytecodeInterface8 helpers, and deprecates the now-surplus indy static-types dispatcher.

Changes:

  • Update static compilation bytecode generation to always use StaticTypesBinaryExpressionMultiTypeDispatcher (removing the indy-specific dispatcher selection).
  • Adjust bytecode-oriented tests to expect BytecodeInterface8.*ArrayGet/*ArraySet invocations instead of invokedynamic.
  • Deprecate IndyStaticTypesMultiTypeDispatcher now that it is no longer used.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/test/groovy/org/codehaus/groovy/classgen/asm/sc/StaticCompilationTest.groovy Updates expected bytecode for static array set to use BytecodeInterface8.intArraySet.
src/test/groovy/org/codehaus/groovy/classgen/asm/sc/CombinedIndyAndStaticCompilationTest.groovy Strengthens array read/write assertions to check for BytecodeInterface8 array helpers across primitive and Object arrays.
src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.java Removes indy-based binary expression dispatcher selection; always uses the static multi-type dispatcher.
src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java Marks the indy static-types dispatcher as deprecated.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented May 23, 2026

✅ All tests passed ✅

🏷️ Commit: 1c2bd18
▶️ Tests: 4168 executed
⚪️ Checks: 48/48 completed


Learn more about TestLens at testlens.app.

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.

3 participants