mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 19:40:37 +01:00
Use invokeinterface for methods defined in interfaces in the ASM executor
This commit is contained in:
parent
3e91cc60e4
commit
19fa8bcffc
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ methodGenerator.checkCast(Type.getType(m.getDeclaringClass()));
|
||||
+ methodGenerator.loadArg(1);
|
||||
+ methodGenerator.checkCast(Type.getType(m.getParameterTypes()[0]));
|
||||
+ methodGenerator.visitMethodInsn(INVOKEVIRTUAL, Type.getInternalName(m.getDeclaringClass()), m.getName(), Type.getMethodDescriptor(m), m.getDeclaringClass().isInterface());
|
||||
+ methodGenerator.visitMethodInsn(m.getDeclaringClass().isInterface() ? INVOKEINTERFACE : INVOKEVIRTUAL, Type.getInternalName(m.getDeclaringClass()), m.getName(), Type.getMethodDescriptor(m), m.getDeclaringClass().isInterface());
|
||||
+ if (m.getReturnType() != void.class) {
|
||||
+ methodGenerator.pop();
|
||||
+ }
|
||||
|
|
Loading…
Add table
Reference in a new issue