Skip to content

Commit 8966886

Browse files
committed
feat: implemented typeproxy in amultiarray mtaching
1 parent 91a27bc commit 8966886

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/ftbsc/lll/proxies/impl/MethodProxy.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ protected MethodProxy(String name, int modifiers, QualifiableProxy parent, Type[
5151
* @param m the {@link Method} object corresponding to this.
5252
*/
5353
public MethodProxy(Method m) {
54-
this(m.getName(),
54+
this(
55+
m.getName(),
5556
m.getModifiers(),
5657
TypeProxy.from(m.getDeclaringClass()),
5758
Type.getArgumentTypes(m),

src/main/java/ftbsc/lll/utils/PatternMatcher.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,14 @@ && matchList(1, args, lookup.keys.toArray(), false, Object::equals)
337337
&& matchList(2, args, lookup.labels.toArray(), false, Object::equals);
338338
case AbstractInsnNode.MULTIANEWARRAY_INSN:
339339
MultiANewArrayInsnNode mana = (MultiANewArrayInsnNode) i;
340-
return args.length == 2 // TODO add proxy support
341-
&& mana.desc.equals(args[0])
340+
return args.length == 2
342341
&& args[1] instanceof Integer
343-
&& mana.dims == (Integer) args[1];
342+
&& mana.dims == (Integer) args[1]
343+
&& mana.desc.equals(
344+
args[0] instanceof TypeProxy
345+
? ((TypeProxy) args[0]).descriptor
346+
: args[0]
347+
);
344348
case AbstractInsnNode.METHOD_INSN:
345349
MethodInsnNode method = (MethodInsnNode) i;
346350
boolean methodMatch = true;

0 commit comments

Comments
 (0)