Painless: Upgrade ASM to 7.2 (#49263)

This upgrades Painless to use the latest ASM libraries providing support up 
to Java 14. Note the library is not published with the latest versions in an 
"all" package, so we pick up each lib independently that's required. There 
were some changes to the getType method that require descriptors to be 
used in place of internal class names.
This commit is contained in:
Jack Conradson 2019-11-20 07:07:33 -08:00
parent 81548df2d9
commit a780ec14f0
8 changed files with 13 additions and 5 deletions

View File

@ -32,7 +32,11 @@ testClusters.integTest {
dependencies {
compile 'org.antlr:antlr4-runtime:4.5.3'
compile 'org.ow2.asm:asm-debug-all:5.1'
compile 'org.ow2.asm:asm-util:7.2'
compile 'org.ow2.asm:asm-tree:7.2'
compile 'org.ow2.asm:asm-commons:7.2'
compile 'org.ow2.asm:asm-analysis:7.2'
compile 'org.ow2.asm:asm:7.2'
compile project('spi')
}

View File

@ -0,0 +1 @@
fa637eb67eb7628c915d73762b681ae7ff0b9731

View File

@ -0,0 +1 @@
b6e6abe057f23630113f4167c34bda7086691258

View File

@ -0,0 +1 @@
ca2954e8d92a05bacc28ff465b25c70e0f512497

View File

@ -1 +0,0 @@
dde860d586960d55a87cd52c4fc1f5059c89cbc6

View File

@ -0,0 +1 @@
3a23cc36edaf8fc5a89cb100182758ccb5991487

View File

@ -0,0 +1 @@
a3ae34e57fa8a4040e28247291d0cc3d6b8c7bcf

View File

@ -196,7 +196,7 @@ public final class PainlessScriptEngine implements ScriptEngine {
for (int count = 0; count < newFactory.getParameterTypes().length; ++count) {
constructor.loadThis();
constructor.loadArg(count);
constructor.putField(Type.getType(className), "$arg" + count, Type.getType(newFactory.getParameterTypes()[count]));
constructor.putField(Type.getType("L" + className + ";"), "$arg" + count, Type.getType(newFactory.getParameterTypes()[count]));
}
constructor.returnValue();
@ -230,7 +230,7 @@ public final class PainlessScriptEngine implements ScriptEngine {
for (int count = 0; count < newFactory.getParameterTypes().length; ++count) {
adapter.loadThis();
adapter.getField(Type.getType(className), "$arg" + count, Type.getType(newFactory.getParameterTypes()[count]));
adapter.getField(Type.getType("L" + className + ";"), "$arg" + count, Type.getType(newFactory.getParameterTypes()[count]));
}
adapter.loadArgs();
@ -243,7 +243,7 @@ public final class PainlessScriptEngine implements ScriptEngine {
loader.defineFactory(className.replace('/', '.'), writer.toByteArray());
return Type.getType(className);
return Type.getType("L" + className + ";");
}
/**