int type = info[pos] & 0xff; if (type < 64) { sameFrame(pos, type); pos++; pos = sameLocals(pos, type); else if (type < 247) throw new BadBytecode("bad frame_type in StackMapTable"); else if (type == 247) // SAME_LOCALS_1_STACK_ITEM_EXTENDED pos = sameLocals(pos, type); else if (type < 251) { int offset = ByteArray.readU16bit(info, pos + 1); chopFrame(pos, offset, 251 - type); pos += 3; sameFrame(pos, offset); pos += 3; pos = appendFrame(pos, type); else // FULL_FRAME pos = fullFrame(pos);
/** * Visits each entry of the stack map frames. */ public void parse() throws BadBytecode { int n = numOfEntries; int pos = 2; for (int i = 0; i < n; i++) pos = stackMapFrames(pos, i); }
private int fullFrame(int pos) throws BadBytecode { int offset = ByteArray.readU16bit(info, pos + 1); int numOfLocals = ByteArray.readU16bit(info, pos + 3); int[] localsTags = new int[numOfLocals]; int[] localsData = new int[numOfLocals]; int p = verifyTypeInfo(pos + 5, numOfLocals, localsTags, localsData); int numOfItems = ByteArray.readU16bit(info, p); int[] itemsTags = new int[numOfItems]; int[] itemsData = new int[numOfItems]; p = verifyTypeInfo(p + 2, numOfItems, itemsTags, itemsData); fullFrame(pos, offset, localsTags, localsData, itemsTags, itemsData); return p; }
int type = info[pos] & 0xff; if (type < 64) { sameFrame(pos, type); pos++; pos = sameLocals(pos, type); else if (type < 247) throw new BadBytecode("bad frame_type in StackMapTable"); else if (type == 247) // SAME_LOCALS_1_STACK_ITEM_EXTENDED pos = sameLocals(pos, type); else if (type < 251) { int offset = ByteArray.readU16bit(info, pos + 1); chopFrame(pos, offset, 251 - type); pos += 3; sameFrame(pos, offset); pos += 3; pos = appendFrame(pos, type); else // FULL_FRAME pos = fullFrame(pos);
int type = info[pos] & 0xff; if (type < 64) { sameFrame(pos, type); pos++; pos = sameLocals(pos, type); else if (type < 247) throw new BadBytecode("bad frame_type in StackMapTable"); else if (type == 247) // SAME_LOCALS_1_STACK_ITEM_EXTENDED pos = sameLocals(pos, type); else if (type < 251) { int offset = ByteArray.readU16bit(info, pos + 1); chopFrame(pos, offset, 251 - type); pos += 3; sameFrame(pos, offset); pos += 3; pos = appendFrame(pos, type); else // FULL_FRAME pos = fullFrame(pos);
int type = info[pos] & 0xff; if (type < 64) { sameFrame(pos, type); pos++; pos = sameLocals(pos, type); else if (type < 247) throw new BadBytecode("bad frame_type in StackMapTable"); else if (type == 247) // SAME_LOCALS_1_STACK_ITEM_EXTENDED pos = sameLocals(pos, type); else if (type < 251) { int offset = ByteArray.readU16bit(info, pos + 1); chopFrame(pos, offset, 251 - type); pos += 3; sameFrame(pos, offset); pos += 3; pos = appendFrame(pos, type); else // FULL_FRAME pos = fullFrame(pos);
int type = info[pos] & 0xff; if (type < 64) { sameFrame(pos, type); pos++; pos = sameLocals(pos, type); else if (type < 247) throw new BadBytecode("bad frame_type in StackMapTable"); else if (type == 247) // SAME_LOCALS_1_STACK_ITEM_EXTENDED pos = sameLocals(pos, type); else if (type < 251) { int offset = ByteArray.readU16bit(info, pos + 1); chopFrame(pos, offset, 251 - type); pos += 3; sameFrame(pos, offset); pos += 3; pos = appendFrame(pos, type); else // FULL_FRAME pos = fullFrame(pos);
private int appendFrame(int pos, int type) throws BadBytecode { int k = type - 251; int offset = ByteArray.readU16bit(info, pos + 1); int[] tags = new int[k]; int[] data = new int[k]; int p = pos + 3; for (int i = 0; i < k; i++) { int tag = info[p] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, p + 1); objectOrUninitialized(tag, data[i], p + 1); p += 3; } else { data[i] = 0; p++; } } appendFrame(pos, offset, tags, data); return p; }
private int appendFrame(int pos, int type) throws BadBytecode { int k = type - 251; int offset = ByteArray.readU16bit(info, pos + 1); int[] tags = new int[k]; int[] data = new int[k]; int p = pos + 3; for (int i = 0; i < k; i++) { int tag = info[p] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, p + 1); objectOrUninitialized(tag, data[i], p + 1); p += 3; } else { data[i] = 0; p++; } } appendFrame(pos, offset, tags, data); return p; }
private int appendFrame(int pos, int type) throws BadBytecode { int k = type - 251; int offset = ByteArray.readU16bit(info, pos + 1); int[] tags = new int[k]; int[] data = new int[k]; int p = pos + 3; for (int i = 0; i < k; i++) { int tag = info[p] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, p + 1); p += 3; } else { data[i] = 0; p++; } } appendFrame(pos, offset, tags, data); return p; }
private int appendFrame(int pos, int type) throws BadBytecode { int k = type - 251; int offset = ByteArray.readU16bit(info, pos + 1); int[] tags = new int[k]; int[] data = new int[k]; int p = pos + 3; for (int i = 0; i < k; i++) { int tag = info[p] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, p + 1); p += 3; } else { data[i] = 0; p++; } } appendFrame(pos, offset, tags, data); return p; }
private int appendFrame(int pos, int type) throws BadBytecode { int k = type - 251; int offset = ByteArray.readU16bit(info, pos + 1); int[] tags = new int[k]; int[] data = new int[k]; int p = pos + 3; for (int i = 0; i < k; i++) { int tag = info[p] & 0xff; tags[i] = tag; if (tag == OBJECT || tag == UNINIT) { data[i] = ByteArray.readU16bit(info, p + 1); objectOrUninitialized(tag, data[i], p + 1); p += 3; } else { data[i] = 0; p++; } } appendFrame(pos, offset, tags, data); return p; }
private int sameLocals(int pos, int type) throws BadBytecode { int top = pos; int offset; if (type < 128) offset = type - 64; else { // type == 247 offset = ByteArray.readU16bit(info, pos + 1); pos += 2; } int tag = info[pos + 1] & 0xff; int data = 0; if (tag == OBJECT || tag == UNINIT) { data = ByteArray.readU16bit(info, pos + 2); objectOrUninitialized(tag, data, pos + 2); pos += 2; } sameLocals(top, offset, tag, data); return pos + 2; }
private int sameLocals(int pos, int type) throws BadBytecode { int top = pos; int offset; if (type < 128) offset = type - 64; else { // type == 247 offset = ByteArray.readU16bit(info, pos + 1); pos += 2; } int tag = info[pos + 1] & 0xff; int data = 0; if (tag == OBJECT || tag == UNINIT) { data = ByteArray.readU16bit(info, pos + 2); objectOrUninitialized(tag, data, pos + 2); pos += 2; } sameLocals(top, offset, tag, data); return pos + 2; }
private int sameLocals(int pos, int type) throws BadBytecode { int top = pos; int offset; if (type < 128) offset = type - 64; else { // type == 247 offset = ByteArray.readU16bit(info, pos + 1); pos += 2; } int tag = info[pos + 1] & 0xff; int data = 0; if (tag == OBJECT || tag == UNINIT) { data = ByteArray.readU16bit(info, pos + 2); objectOrUninitialized(tag, data, pos + 2); pos += 2; } sameLocals(top, offset, tag, data); return pos + 2; }
private int sameLocals(int pos, int type) throws BadBytecode { int offset; if (type < 128) offset = type - 64; else { // type == 247 offset = ByteArray.readU16bit(info, pos + 1); pos += 2; } int tag = info[pos + 1] & 0xff; int data = 0; if (tag == OBJECT || tag == UNINIT) { data = ByteArray.readU16bit(info, pos + 2); pos += 2; } sameLocals(pos, offset, tag, data); return pos + 2; }
private int sameLocals(int pos, int type) throws BadBytecode { int top = pos; int offset; if (type < 128) offset = type - 64; else { // type == 247 offset = ByteArray.readU16bit(info, pos + 1); pos += 2; } int tag = info[pos + 1] & 0xff; int data = 0; if (tag == OBJECT || tag == UNINIT) { data = ByteArray.readU16bit(info, pos + 2); pos += 2; } sameLocals(top, offset, tag, data); return pos + 2; }
private int fullFrame(int pos) throws BadBytecode { int offset = ByteArray.readU16bit(info, pos + 1); int numOfLocals = ByteArray.readU16bit(info, pos + 3); int[] localsTags = new int[numOfLocals]; int[] localsData = new int[numOfLocals]; int p = verifyTypeInfo(pos + 5, numOfLocals, localsTags, localsData); int numOfItems = ByteArray.readU16bit(info, p); int[] itemsTags = new int[numOfItems]; int[] itemsData = new int[numOfItems]; p = verifyTypeInfo(p + 2, numOfItems, itemsTags, itemsData); fullFrame(pos, offset, localsTags, localsData, itemsTags, itemsData); return p; }
private int fullFrame(int pos) throws BadBytecode { int offset = ByteArray.readU16bit(info, pos + 1); int numOfLocals = ByteArray.readU16bit(info, pos + 3); int[] localsTags = new int[numOfLocals]; int[] localsData = new int[numOfLocals]; int p = verifyTypeInfo(pos + 5, numOfLocals, localsTags, localsData); int numOfItems = ByteArray.readU16bit(info, p); int[] itemsTags = new int[numOfItems]; int[] itemsData = new int[numOfItems]; p = verifyTypeInfo(p + 2, numOfItems, itemsTags, itemsData); fullFrame(pos, offset, localsTags, localsData, itemsTags, itemsData); return p; }
private int fullFrame(int pos) throws BadBytecode { int offset = ByteArray.readU16bit(info, pos + 1); int numOfLocals = ByteArray.readU16bit(info, pos + 3); int[] localsTags = new int[numOfLocals]; int[] localsData = new int[numOfLocals]; int p = verifyTypeInfo(pos + 5, numOfLocals, localsTags, localsData); int numOfItems = ByteArray.readU16bit(info, p); int[] itemsTags = new int[numOfItems]; int[] itemsData = new int[numOfItems]; p = verifyTypeInfo(p + 2, numOfItems, itemsTags, itemsData); fullFrame(pos, offset, localsTags, localsData, itemsTags, itemsData); return p; }