mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-20 04:09:45 +00:00
Fix wrong asm types being used for TypeInsnNodes
This commit is contained in:
1 parent
ed155c644c
commit
1ba2172e8a
3 files changed
+8
-8
No files matched your search
+2
-2
@@ -1,6 +1,6 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.5:dev")
|
||||
compile("com.github.GTNewHorizons:NotEnoughItems:2.3.5-GTNH:dev")
|
||||
compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.7:dev")
|
||||
compile("com.github.GTNewHorizons:NotEnoughItems:2.3.20-GTNH:dev")
|
||||
}
|
||||
@@ -446,7 +446,7 @@ object ASMMixinCompiler
|
||||
}
|
||||
|
||||
def staticTransform(mnode: MethodNode, base: MethodNode) {
|
||||
val stack = new StackAnalyser(getType(cnode.name), base)
|
||||
val stack = new StackAnalyser(getType(Type.getObjectType(cnode.name).getDescriptor), base)
|
||||
val insnList = mnode.instructions
|
||||
var insn = insnList.getFirst
|
||||
|
||||
@@ -478,7 +478,7 @@ object ASMMixinCompiler
|
||||
//cast to parent class and call
|
||||
val mType = Type.getMethodType(minsn.desc)
|
||||
val instanceEntry = stack.peek(width(mType.getArgumentTypes))
|
||||
insnList.insert(instanceEntry.insn, new TypeInsnNode(CHECKCAST, cnode.superName))
|
||||
insnList.insert(instanceEntry.insn, new TypeInsnNode(CHECKCAST, Type.getObjectType(cnode.superName).getDescriptor))
|
||||
minsn.owner = cnode.superName
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,10 +283,10 @@ class StackAnalyser(val owner:Type, val m:MethodNode)
|
||||
}
|
||||
case tinsn:TypeInsnNode => ainsn.getOpcode match
|
||||
{
|
||||
case NEW => push(New(getType(tinsn.desc)))
|
||||
case NEWARRAY => push(NewArray(pop(), getType(tinsn.desc)))
|
||||
case ANEWARRAY => push(NewArray(pop(), getType("["+tinsn.desc)))
|
||||
case CHECKCAST => push(Cast(pop(), getType(tinsn.desc)))
|
||||
case NEW => push(New(getObjectType(tinsn.desc)))
|
||||
case NEWARRAY => push(NewArray(pop(), getObjectType(tinsn.desc)))
|
||||
case ANEWARRAY => push(NewArray(pop(), getObjectType("["+tinsn.desc)))
|
||||
case CHECKCAST => push(Cast(pop(), getObjectType(tinsn.desc)))
|
||||
case INSTANCEOF => push(UnaryOp(INSTANCEOF, pop()))
|
||||
}
|
||||
case mainsn:MultiANewArrayInsnNode =>
|
||||
|
||||
Reference in new issue
Block a user