X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FClassFileCompiler.java;h=0092c0fae70b0bebb35c6aa559d33e4aa007006b;hp=bcd069e22c06663fd61db33feccb27f3b08f1a8c;hb=53fc7f5243b96e2e1b3bfae99168bc38b71765ea;hpb=ca3a0241d39131e0ca2205f4683ed09f557340d3 diff --git a/src/org/ibex/nestedvm/ClassFileCompiler.java b/src/org/ibex/nestedvm/ClassFileCompiler.java index bcd069e..0092c0f 100644 --- a/src/org/ibex/nestedvm/ClassFileCompiler.java +++ b/src/org/ibex/nestedvm/ClassFileCompiler.java @@ -150,14 +150,14 @@ public class ClassFileCompiler extends Compiler implements org.apache.bcel.Const a(InstructionConstants.IUSHR); int beg = text.addr >>> methodShift; - int end = ((text.addr + text.size) >>> methodShift); + int end = ((text.addr + text.size + maxBytesPerMethod - 1) >>> methodShift); // This data is redundant but BCEL wants it - int[] matches = new int[end-beg+1]; - for(int i=beg;i<=end;i++) matches[i-beg] = i; + int[] matches = new int[end-beg]; + for(int i=beg;i