This is an automated email from the ASF dual-hosted git repository.

blackdrag pushed a commit to branch 
feature/GROOVY-12022/deprecate_IndyStaticTypesMultiTypeDispatcher
in repository https://gitbox.apache.org/repos/asf/groovy.git

commit fae421bd9a51e5044202281d18e05a2e554804e8
Author: Jochen Theodorou <[email protected]>
AuthorDate: Tue May 19 08:44:23 2026 +0200

    GROOVY-12022: 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
---
 .../classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java  | 2 ++
 .../groovy/classgen/asm/sc/StaticTypesWriterController.java       | 8 +-------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git 
a/src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java
 
b/src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java
index d58f253a20..577020185c 100644
--- 
a/src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java
+++ 
b/src/main/java/org/codehaus/groovy/classgen/asm/indy/sc/IndyStaticTypesMultiTypeDispatcher.java
@@ -36,7 +36,9 @@ import static org.objectweb.asm.Opcodes.H_INVOKESTATIC;
  * Multi type dispatcher for binary expression backend combining indy and 
static compilation
  *
  * @since 2.5.0
+ * @deprecated 6.0.0
  */
+@Deprecated(since = "6.0.0")
 public class IndyStaticTypesMultiTypeDispatcher extends 
StaticTypesBinaryExpressionMultiTypeDispatcher {
     /**
      * Creates a dispatcher that combines static compilation and indy array 
access.
diff --git 
a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.java
 
b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.java
index 5ec8a558b9..4878fbdf11 100644
--- 
a/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.java
+++ 
b/src/main/java/org/codehaus/groovy/classgen/asm/sc/StaticTypesWriterController.java
@@ -42,8 +42,6 @@ import org.codehaus.groovy.classgen.asm.StatementWriter;
 import org.codehaus.groovy.classgen.asm.TypeChooser;
 import org.codehaus.groovy.classgen.asm.UnaryExpressionHelper;
 import org.codehaus.groovy.classgen.asm.WriterController;
-import 
org.codehaus.groovy.classgen.asm.indy.sc.IndyStaticTypesMultiTypeDispatcher;
-import org.codehaus.groovy.control.CompilerConfiguration;
 import org.objectweb.asm.ClassVisitor;
 
 import static 
org.codehaus.groovy.transform.sc.StaticCompilationVisitor.isStaticallyCompiled;
@@ -91,11 +89,7 @@ public class StaticTypesWriterController extends 
DelegatingController {
         this.lambdaWriter = new StaticTypesLambdaWriter(this);
         this.methodReferenceExpressionWriter = new 
StaticTypesMethodReferenceExpressionWriter(this);
         this.unaryExpressionHelper = new 
StaticTypesUnaryExpressionHelper(this);
-
-        CompilerConfiguration config = cn.getCompileUnit().getConfig();
-        this.binaryExpressionHelper = config.isIndyEnabled()
-                ? new IndyStaticTypesMultiTypeDispatcher(this)
-                : new StaticTypesBinaryExpressionMultiTypeDispatcher(this);
+        this.binaryExpressionHelper = new 
StaticTypesBinaryExpressionMultiTypeDispatcher(this);
     }
 
     /** {@inheritDoc} */

Reply via email to