Fixed MultipartGenerator using the wrong local variable offsets when generating a passThrough method with wide data type args

This commit is contained in:
Chicken-Bones committed 2013-12-22 01:18:47 +10:00
1 parent 3b3460279f
commit a68f34f428
1 file changed
+5 -2
@@ -247,8 +247,11 @@ object ASMMixinCompiler
{
val args = getArgumentTypes(mvdesc)
val ret = getReturnType(mvdesc)
for(i <- 0 until args.length)
mv.visitVarInsn(args(i).getOpcode(ILOAD), i+1)
var localIndex = 1
args.foreach{arg =>
mv.visitVarInsn(arg.getOpcode(ILOAD), localIndex)
localIndex+=width(arg)
}
mv.visitMethodInsn(opcode, owner, name, desc)
mv.visitInsn(ret.getOpcode(IRETURN))
mv.visitMaxs(Math.max(width(args)+1, width(ret)), width(args)+1)