private int doXLOAD(int localVar, TypeData type) { stackTypes[stackTop++] = type; if (type.is2WordType()) stackTypes[stackTop++] = TOP; return 2; }
private static TypeData validateTypeData(TypeData[] data, int length, int index) { TypeData td = data[index]; if (td.is2WordType() && index + 1 < length) if (data[index + 1] != TOP) return TOP; return td; }
private int doXSTORE(int index, TypeData type) { stackTop--; localsTypes[index] = type; if (type.is2WordType()) { stackTop--; localsTypes[index + 1] = TOP; } return 2; }
private static int diffSize(TypeData[] types, int offset, int len) { int num = 0; while (offset < len) { TypeData td = types[offset++]; num++; if (td.is2WordType()) offset++; } return num; }
public boolean is2WordType() { return type.is2WordType(); } public boolean isUninit() { return type.isUninit(); }
private int doXSTORE(int index, TypeData type) { stackTop--; localsTypes[index] = type; if (type.is2WordType()) { stackTop--; localsTypes[index + 1] = TOP; } return 2; }
private static TypeData validateTypeData(TypeData[] data, int length, int index) { TypeData td = data[index]; if (td.is2WordType() && index + 1 < length) if (data[index + 1] != TOP) return TOP; return td; }
private int doXLOAD(int localVar, TypeData type) { stackTypes[stackTop++] = type; if (type.is2WordType()) stackTypes[stackTop++] = TOP; return 2; }
private static int diffSize(TypeData[] types, int offset, int len) { int num = 0; while (offset < len) { TypeData td = types[offset++]; num++; if (td.is2WordType()) offset++; } return num; }
@Override public boolean is2WordType() { return type.is2WordType(); } @Override
public TypeVar(TypeData t) { uppers = null; lowers = new ArrayList(2); usedBy = new ArrayList(2); merge(t); fixedType = null; is2WordType = t.is2WordType(); }
public void resetNumLocals() { if (localsTypes != null) { int nl = localsTypes.length; while (nl > 0 && localsTypes[nl - 1].isBasicType() == TypeTag.TOP) { if (nl > 1) { if (localsTypes[nl - 2].is2WordType()) break; } --nl; } numLocals = nl; } }
public TypeVar(TypeData t) { uppers = null; lowers = new ArrayList<TypeData>(2); usedBy = new ArrayList<TypeData>(2); merge(t); fixedType = null; is2WordType = t.is2WordType(); }
public void resetNumLocals() { if (localsTypes != null) { int nl = localsTypes.length; while (nl > 0 && localsTypes[nl - 1].isBasicType() == TypeTag.TOP) { if (nl > 1) { if (localsTypes[nl - 2].is2WordType()) break; } --nl; } numLocals = nl; } }
private void fixTypes1(ArrayList scc, TypeData kind) throws NotFoundException { int size = scc.size(); for (int i = 0; i < size; i++) { TypeVar cv = (TypeVar)scc.get(i); TypeData kind2 = kind.getArrayType(-cv.dimension); if (kind2.isBasicType() == null) cv.fixedType = kind2.getName(); else { cv.lowers.clear(); cv.lowers.add(kind2); cv.is2WordType = kind2.is2WordType(); } } }
private void writeVerifyTypeInfo(StackMap.Writer writer, ConstPool cp, TypeData[] types, int num) { int numDWord = 0; for (int i = 0; i < num; i++) { TypeData td = types[i]; if (td != null && td.is2WordType()) { numDWord++; i++; } } writer.write16bit(num - numDWord); for (int i = 0; i < num; i++) { TypeData td = types[i]; writer.writeVerifyTypeInfo(td.getTypeTag(), td.getTypeData(cp)); if (td.is2WordType()) i++; } } }
private void fixTypes1(List<TypeData> scc, TypeData kind) throws NotFoundException { int size = scc.size(); for (int i = 0; i < size; i++) { TypeVar cv = (TypeVar)scc.get(i); TypeData kind2 = kind.getArrayType(-cv.dimension); if (kind2.isBasicType() == null) cv.fixedType = kind2.getName(); else { cv.lowers.clear(); cv.lowers.add(kind2); cv.is2WordType = kind2.is2WordType(); } } }
private int[] fillStackMap(int num, int offset, int[] data, TypeData[] types) { int realNum = diffSize(types, offset, offset + num); ConstPool cp = cpool; int[] tags = new int[realNum]; int j = 0; for (int i = 0; i < num; i++) { TypeData td = types[offset + i]; tags[j] = td.getTypeTag(); data[j] = td.getTypeData(cp); if (td.is2WordType()) i++; j++; } return tags; }
private int[] fillStackMap(int num, int offset, int[] data, TypeData[] types) { int realNum = diffSize(types, offset, offset + num); ConstPool cp = cpool; int[] tags = new int[realNum]; int j = 0; for (int i = 0; i < num; i++) { TypeData td = types[offset + i]; tags[j] = td.getTypeTag(); data[j] = td.getTypeData(cp); if (td.is2WordType()) i++; j++; } return tags; }
try { while ((i = descToTag(methodDesc, i, ++n, locals)) > 0) if (locals[n].is2WordType()) locals[++n] = TypeTag.TOP;