[
https://issues.apache.org/jira/browse/GROOVY-12022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081955#comment-18081955
]
ASF GitHub Bot commented on GROOVY-12022:
-----------------------------------------
testlens-app[bot] commented on PR #2546:
URL: https://github.com/apache/groovy/pull/2546#issuecomment-4485301204
## 🚨 TestLens detected 16 failed tests 🚨
Here is what you can do:
1) Inspect the test failures carefully.
2) If you are convinced that some of the tests are flaky, you can mute them
below.
3) Finally, trigger a rerun by checking the rerun checkbox.
### Test Summary
| Check | Project/Task | Test | Runs |
|---|---|---|---|
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [1]
\"byte\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [2]
\"short\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [3]
\"int\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [4]
\"long\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [5]
\"float\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [6]
\"double\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [7]
\"boolean\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) > [8]
\"char\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[1] \"byte\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[2] \"short\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[3] \"int\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[4] \"long\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[5] \"float\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[6] \"double\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[7] \"boolean\" | ❌ |
| [Build and test / lts \(17,
macos-latest\)](https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546)
| :test | CombinedIndyAndStaticCompilationTest > testArrayWrite\(String\) >
[8] \"char\" | ❌ |
🏷️ Commit: fae421bd9a51e5044202281d18e05a2e554804e8
▶️ Tests: 23729 executed
🟡 Checks: 0/28 completed
### Test Failures (first 5 of 16)
<details>
<summary><strong>CombinedIndyAndStaticCompilationTest >
testArrayRead(String) > [1] "byte"</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546">Build
and test / lts (17, macos-latest)</a>)</summary>
```
Assertion failed:
assert bytecode.indexOf('INVOKEDYNAMIC', offset) > offset
| | | | |
| -1 72 | 72
| false
// class version 61.0 (61)
// access flags 0x21
public class script extends groovy/lang/Script {
// compiled from: script
// access flags 0x100A
private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo;
$staticClassInfo
// access flags 0x1089
public static transient synthetic Z __$stMC
@Lgroovy/transform/Internal;()
// access flags 0x1
public <init>()V
L0
ALOAD 0
INVOKESPECIAL groovy/lang/Script.<init> ()V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1
public <init>(Lgroovy/lang/Binding;)V
L0
ALOAD 0
ALOAD 1
INVOKESPECIAL groovy/lang/Script.<init> (Lgroovy/lang/Binding;)V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
LOCALVARIABLE context Lgroovy/lang/Binding; L0 L1 1
MAXSTACK = 2
MAXLOCALS = 2
// access flags 0x89
public static varargs main([Ljava/lang/String;)V
@Lgroovy/transform/Generated;()
L0
LDC Lorg/codehaus/groovy/runtime/InvokerHelper;.class
LDC Lscript;.class
ALOAD 0
INVOKEDYNAMIC
invoke(Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/Object;
[
// handle kind 0x6 : INVOKESTATIC
org/codehaus/groovy/vmplugin/v8/IndyInterface.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite;
// arguments:
"runScript",
0
]
POP
RETURN
L1
LOCALVARIABLE args [Ljava/lang/String; L0 L1 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x1
public run()Ljava/lang/Object;
@Lgroovy/transform/Generated;()
L0
ACONST_NULL
ARETURN
L1
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
--BEGIN--
// access flags 0x1
public test()V
L0
LINENUMBER 4 L0
BIPUSH 10
NEWARRAY T_BYTE
ASTORE 1
L1
LINENUMBER 5 L1
ALOAD 1
ICONST_0
INVOKESTATIC org/codehaus/groovy/runtime/BytecodeInterface8.bArrayGet
([BI)B
ISTORE 2
L2
LINENUMBER 6 L2
RETURN
LOCALVARIABLE this Lscript; L0 L2 0
LOCALVARIABLE array [B L1 L2 1
LOCALVARIABLE x B L2 L2 2
MAXSTACK = 2
MAXLOCALS = 3
--END--
// access flags 0x1004
protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
LDC Lscript;.class
IF_ACMPEQ L0
ALOAD 0
INVOKESTATIC
org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass
(Ljava/lang/Object;)Lgroovy/lang/MetaClass;
ARETURN
L0
FRAME SAME
GETSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
ASTORE 1
ALOAD 1
IFNONNULL L1
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo
(Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
DUP
ASTORE 1
PUTSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
L1
FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
ALOAD 1
INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass
()Lgroovy/lang/MetaClass;
ARETURN
MAXSTACK = 2
MAXLOCALS = 2
}
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at
org.codehaus.groovy.classgen.asm.sc.CombinedIndyAndStaticCompilationTest.testArrayRead(CombinedIndyAndStaticCompilationTest.groovy:47)
```
</details>
<details>
<summary><strong>CombinedIndyAndStaticCompilationTest >
testArrayRead(String) > [2] "short"</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546">Build
and test / lts (17, macos-latest)</a>)</summary>
```
Assertion failed:
assert bytecode.indexOf('INVOKEDYNAMIC', offset) > offset
| | | | |
| -1 72 | 72
| false
// class version 61.0 (61)
// access flags 0x21
public class script extends groovy/lang/Script {
// compiled from: script
// access flags 0x100A
private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo;
$staticClassInfo
// access flags 0x1089
public static transient synthetic Z __$stMC
@Lgroovy/transform/Internal;()
// access flags 0x1
public <init>()V
L0
ALOAD 0
INVOKESPECIAL groovy/lang/Script.<init> ()V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1
public <init>(Lgroovy/lang/Binding;)V
L0
ALOAD 0
ALOAD 1
INVOKESPECIAL groovy/lang/Script.<init> (Lgroovy/lang/Binding;)V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
LOCALVARIABLE context Lgroovy/lang/Binding; L0 L1 1
MAXSTACK = 2
MAXLOCALS = 2
// access flags 0x89
public static varargs main([Ljava/lang/String;)V
@Lgroovy/transform/Generated;()
L0
LDC Lorg/codehaus/groovy/runtime/InvokerHelper;.class
LDC Lscript;.class
ALOAD 0
INVOKEDYNAMIC
invoke(Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/Object;
[
// handle kind 0x6 : INVOKESTATIC
org/codehaus/groovy/vmplugin/v8/IndyInterface.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite;
// arguments:
"runScript",
0
]
POP
RETURN
L1
LOCALVARIABLE args [Ljava/lang/String; L0 L1 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x1
public run()Ljava/lang/Object;
@Lgroovy/transform/Generated;()
L0
ACONST_NULL
ARETURN
L1
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
--BEGIN--
// access flags 0x1
public test()V
L0
LINENUMBER 4 L0
BIPUSH 10
NEWARRAY T_SHORT
ASTORE 1
L1
LINENUMBER 5 L1
ALOAD 1
ICONST_0
INVOKESTATIC org/codehaus/groovy/runtime/BytecodeInterface8.sArrayGet
([SI)S
ISTORE 2
L2
LINENUMBER 6 L2
RETURN
LOCALVARIABLE this Lscript; L0 L2 0
LOCALVARIABLE array [S L1 L2 1
LOCALVARIABLE x S L2 L2 2
MAXSTACK = 2
MAXLOCALS = 3
--END--
// access flags 0x1004
protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
LDC Lscript;.class
IF_ACMPEQ L0
ALOAD 0
INVOKESTATIC
org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass
(Ljava/lang/Object;)Lgroovy/lang/MetaClass;
ARETURN
L0
FRAME SAME
GETSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
ASTORE 1
ALOAD 1
IFNONNULL L1
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo
(Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
DUP
ASTORE 1
PUTSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
L1
FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
ALOAD 1
INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass
()Lgroovy/lang/MetaClass;
ARETURN
MAXSTACK = 2
MAXLOCALS = 2
}
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at
org.codehaus.groovy.classgen.asm.sc.CombinedIndyAndStaticCompilationTest.testArrayRead(CombinedIndyAndStaticCompilationTest.groovy:47)
```
</details>
<details>
<summary><strong>CombinedIndyAndStaticCompilationTest >
testArrayRead(String) > [3] "int"</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546">Build
and test / lts (17, macos-latest)</a>)</summary>
```
Assertion failed:
assert bytecode.indexOf('INVOKEDYNAMIC', offset) > offset
| | | | |
| -1 72 | 72
| false
// class version 61.0 (61)
// access flags 0x21
public class script extends groovy/lang/Script {
// compiled from: script
// access flags 0x100A
private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo;
$staticClassInfo
// access flags 0x1089
public static transient synthetic Z __$stMC
@Lgroovy/transform/Internal;()
// access flags 0x1
public <init>()V
L0
ALOAD 0
INVOKESPECIAL groovy/lang/Script.<init> ()V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1
public <init>(Lgroovy/lang/Binding;)V
L0
ALOAD 0
ALOAD 1
INVOKESPECIAL groovy/lang/Script.<init> (Lgroovy/lang/Binding;)V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
LOCALVARIABLE context Lgroovy/lang/Binding; L0 L1 1
MAXSTACK = 2
MAXLOCALS = 2
// access flags 0x89
public static varargs main([Ljava/lang/String;)V
@Lgroovy/transform/Generated;()
L0
LDC Lorg/codehaus/groovy/runtime/InvokerHelper;.class
LDC Lscript;.class
ALOAD 0
INVOKEDYNAMIC
invoke(Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/Object;
[
// handle kind 0x6 : INVOKESTATIC
org/codehaus/groovy/vmplugin/v8/IndyInterface.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite;
// arguments:
"runScript",
0
]
POP
RETURN
L1
LOCALVARIABLE args [Ljava/lang/String; L0 L1 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x1
public run()Ljava/lang/Object;
@Lgroovy/transform/Generated;()
L0
ACONST_NULL
ARETURN
L1
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
--BEGIN--
// access flags 0x1
public test()V
L0
LINENUMBER 4 L0
BIPUSH 10
NEWARRAY T_INT
ASTORE 1
L1
LINENUMBER 5 L1
ALOAD 1
ICONST_0
INVOKESTATIC
org/codehaus/groovy/runtime/BytecodeInterface8.intArrayGet ([II)I
ISTORE 2
L2
LINENUMBER 6 L2
RETURN
LOCALVARIABLE this Lscript; L0 L2 0
LOCALVARIABLE array [I L1 L2 1
LOCALVARIABLE x I L2 L2 2
MAXSTACK = 2
MAXLOCALS = 3
--END--
// access flags 0x1004
protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
LDC Lscript;.class
IF_ACMPEQ L0
ALOAD 0
INVOKESTATIC
org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass
(Ljava/lang/Object;)Lgroovy/lang/MetaClass;
ARETURN
L0
FRAME SAME
GETSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
ASTORE 1
ALOAD 1
IFNONNULL L1
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo
(Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
DUP
ASTORE 1
PUTSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
L1
FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
ALOAD 1
INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass
()Lgroovy/lang/MetaClass;
ARETURN
MAXSTACK = 2
MAXLOCALS = 2
}
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at
org.codehaus.groovy.classgen.asm.sc.CombinedIndyAndStaticCompilationTest.testArrayRead(CombinedIndyAndStaticCompilationTest.groovy:47)
```
</details>
<details>
<summary><strong>CombinedIndyAndStaticCompilationTest >
testArrayRead(String) > [4] "long"</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546">Build
and test / lts (17, macos-latest)</a>)</summary>
```
Assertion failed:
assert bytecode.indexOf('INVOKEDYNAMIC', offset) > offset
| | | | |
| -1 72 | 72
| false
// class version 61.0 (61)
// access flags 0x21
public class script extends groovy/lang/Script {
// compiled from: script
// access flags 0x100A
private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo;
$staticClassInfo
// access flags 0x1089
public static transient synthetic Z __$stMC
@Lgroovy/transform/Internal;()
// access flags 0x1
public <init>()V
L0
ALOAD 0
INVOKESPECIAL groovy/lang/Script.<init> ()V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1
public <init>(Lgroovy/lang/Binding;)V
L0
ALOAD 0
ALOAD 1
INVOKESPECIAL groovy/lang/Script.<init> (Lgroovy/lang/Binding;)V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
LOCALVARIABLE context Lgroovy/lang/Binding; L0 L1 1
MAXSTACK = 2
MAXLOCALS = 2
// access flags 0x89
public static varargs main([Ljava/lang/String;)V
@Lgroovy/transform/Generated;()
L0
LDC Lorg/codehaus/groovy/runtime/InvokerHelper;.class
LDC Lscript;.class
ALOAD 0
INVOKEDYNAMIC
invoke(Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/Object;
[
// handle kind 0x6 : INVOKESTATIC
org/codehaus/groovy/vmplugin/v8/IndyInterface.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite;
// arguments:
"runScript",
0
]
POP
RETURN
L1
LOCALVARIABLE args [Ljava/lang/String; L0 L1 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x1
public run()Ljava/lang/Object;
@Lgroovy/transform/Generated;()
L0
ACONST_NULL
ARETURN
L1
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
--BEGIN--
// access flags 0x1
public test()V
L0
LINENUMBER 4 L0
BIPUSH 10
NEWARRAY T_LONG
ASTORE 1
L1
LINENUMBER 5 L1
ALOAD 1
ICONST_0
INVOKESTATIC org/codehaus/groovy/runtime/BytecodeInterface8.lArrayGet
([JI)J
LSTORE 2
L2
LINENUMBER 6 L2
RETURN
LOCALVARIABLE this Lscript; L0 L2 0
LOCALVARIABLE array [J L1 L2 1
LOCALVARIABLE x J L2 L2 2
MAXSTACK = 2
MAXLOCALS = 4
--END--
// access flags 0x1004
protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
LDC Lscript;.class
IF_ACMPEQ L0
ALOAD 0
INVOKESTATIC
org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass
(Ljava/lang/Object;)Lgroovy/lang/MetaClass;
ARETURN
L0
FRAME SAME
GETSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
ASTORE 1
ALOAD 1
IFNONNULL L1
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo
(Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
DUP
ASTORE 1
PUTSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
L1
FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
ALOAD 1
INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass
()Lgroovy/lang/MetaClass;
ARETURN
MAXSTACK = 2
MAXLOCALS = 2
}
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at
org.codehaus.groovy.classgen.asm.sc.CombinedIndyAndStaticCompilationTest.testArrayRead(CombinedIndyAndStaticCompilationTest.groovy:47)
```
</details>
<details>
<summary><strong>CombinedIndyAndStaticCompilationTest >
testArrayRead(String) > [5] "float"</strong> (:test in <a
href="https://github.com/apache/groovy/actions/runs/26081076480/job/76682638820?pr=2546">Build
and test / lts (17, macos-latest)</a>)</summary>
```
Assertion failed:
assert bytecode.indexOf('INVOKEDYNAMIC', offset) > offset
| | | | |
| -1 72 | 72
| false
// class version 61.0 (61)
// access flags 0x21
public class script extends groovy/lang/Script {
// compiled from: script
// access flags 0x100A
private static synthetic Lorg/codehaus/groovy/reflection/ClassInfo;
$staticClassInfo
// access flags 0x1089
public static transient synthetic Z __$stMC
@Lgroovy/transform/Internal;()
// access flags 0x1
public <init>()V
L0
ALOAD 0
INVOKESPECIAL groovy/lang/Script.<init> ()V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
// access flags 0x1
public <init>(Lgroovy/lang/Binding;)V
L0
ALOAD 0
ALOAD 1
INVOKESPECIAL groovy/lang/Script.<init> (Lgroovy/lang/Binding;)V
L1
RETURN
LOCALVARIABLE this Lscript; L0 L1 0
LOCALVARIABLE context Lgroovy/lang/Binding; L0 L1 1
MAXSTACK = 2
MAXLOCALS = 2
// access flags 0x89
public static varargs main([Ljava/lang/String;)V
@Lgroovy/transform/Generated;()
L0
LDC Lorg/codehaus/groovy/runtime/InvokerHelper;.class
LDC Lscript;.class
ALOAD 0
INVOKEDYNAMIC
invoke(Ljava/lang/Class;Ljava/lang/Class;[Ljava/lang/String;)Ljava/lang/Object;
[
// handle kind 0x6 : INVOKESTATIC
org/codehaus/groovy/vmplugin/v8/IndyInterface.bootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite;
// arguments:
"runScript",
0
]
POP
RETURN
L1
LOCALVARIABLE args [Ljava/lang/String; L0 L1 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x1
public run()Ljava/lang/Object;
@Lgroovy/transform/Generated;()
L0
ACONST_NULL
ARETURN
L1
LOCALVARIABLE this Lscript; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
--BEGIN--
// access flags 0x1
public test()V
L0
LINENUMBER 4 L0
BIPUSH 10
NEWARRAY T_FLOAT
ASTORE 1
L1
LINENUMBER 5 L1
ALOAD 1
ICONST_0
INVOKESTATIC org/codehaus/groovy/runtime/BytecodeInterface8.fArrayGet
([FI)F
FSTORE 2
L2
LINENUMBER 6 L2
RETURN
LOCALVARIABLE this Lscript; L0 L2 0
LOCALVARIABLE array [F L1 L2 1
LOCALVARIABLE x F L2 L2 2
MAXSTACK = 2
MAXLOCALS = 3
--END--
// access flags 0x1004
protected synthetic $getStaticMetaClass()Lgroovy/lang/MetaClass;
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
LDC Lscript;.class
IF_ACMPEQ L0
ALOAD 0
INVOKESTATIC
org/codehaus/groovy/runtime/ScriptBytecodeAdapter.initMetaClass
(Ljava/lang/Object;)Lgroovy/lang/MetaClass;
ARETURN
L0
FRAME SAME
GETSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
ASTORE 1
ALOAD 1
IFNONNULL L1
ALOAD 0
INVOKEVIRTUAL java/lang/Object.getClass ()Ljava/lang/Class;
INVOKESTATIC org/codehaus/groovy/reflection/ClassInfo.getClassInfo
(Ljava/lang/Class;)Lorg/codehaus/groovy/reflection/ClassInfo;
DUP
ASTORE 1
PUTSTATIC script.$staticClassInfo :
Lorg/codehaus/groovy/reflection/ClassInfo;
L1
FRAME APPEND [org/codehaus/groovy/reflection/ClassInfo]
ALOAD 1
INVOKEVIRTUAL org/codehaus/groovy/reflection/ClassInfo.getMetaClass
()Lgroovy/lang/MetaClass;
ARETURN
MAXSTACK = 2
MAXLOCALS = 2
}
at
org.codehaus.groovy.runtime.InvokerHelper.createAssertError(InvokerHelper.java:400)
at
org.codehaus.groovy.classgen.asm.sc.CombinedIndyAndStaticCompilationTest.testArrayRead(CombinedIndyAndStaticCompilationTest.groovy:47)
```
</details>
### Muted Tests
> [!NOTE]
> Checks are currently running using the configuration below.
Select tests to mute in this pull request:
🔲 CombinedIndyAndStaticCompilationTest > testArrayRead\(String\) <!
> deprecate IndyStaticTypesMultiTypeDispatcher
> --------------------------------------------
>
> Key: GROOVY-12022
> URL: https://issues.apache.org/jira/browse/GROOVY-12022
> Project: Groovy
> Issue Type: Bug
> Reporter: Jochen Theodorou
> Assignee: Jochen Theodorou
> Priority: Minor
>
> In IndyStaticTypesMultiTypeDispatcher.java (lines 95-99), the get and set
> names are swapped for float and boolean arrays (using name "get" for a
> descriptor that returns void and takes a value).
> The code works because the IndyInterface.staticArrayAccess bootstrap method
> ignores the name parameter and uses the parameter count of the MethodType
> instead.
> But in general I see no reason to use invokedynamic here. The non-indy code
> uses BytecodeInterface8 to access the specific code paths for array access
> and should be faster than the indy version since it is a "simple" static
> method invocation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)