private static void eliminateNonJavaTypes(VarTypeProcessor typeProcessor) { Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes(); for (VarVersionPair paar : new ArrayList<>(mapExprentMinTypes.keySet())) { VarType type = mapExprentMinTypes.get(paar); VarType maxType = mapExprentMaxTypes.get(paar); if (type.type == CodeConstants.TYPE_BYTECHAR || type.type == CodeConstants.TYPE_SHORTCHAR) { if (maxType != null && maxType.type == CodeConstants.TYPE_CHAR) { type = VarType.VARTYPE_CHAR; } else { type = type.type == CodeConstants.TYPE_BYTECHAR ? VarType.VARTYPE_BYTE : VarType.VARTYPE_SHORT; } mapExprentMinTypes.put(paar, type); //} else if(type.type == CodeConstants.TYPE_CHAR && (maxType == null || maxType.type == CodeConstants.TYPE_INT)) { // when possible, lift char to int // mapExprentMinTypes.put(paar, VarType.VARTYPE_INT); } else if (type.type == CodeConstants.TYPE_NULL) { mapExprentMinTypes.put(paar, VarType.VARTYPE_OBJECT); } } }
private static void simpleMerge(VarTypeProcessor typeProcessor, DirectGraph graph, StructMethod mt) { Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes();
private void setNewVarIndices(VarTypeProcessor typeProcessor, DirectGraph graph, VarVersionsProcessor previousVersionsProcessor) { final Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes(); Map<VarVersionPair, Integer> mapFinalVars = typeProcessor.getMapFinalVars();
private static void eliminateNonJavaTypes(VarTypeProcessor typeProcessor) { Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes(); for (VarVersionPair paar : new ArrayList<>(mapExprentMinTypes.keySet())) { VarType type = mapExprentMinTypes.get(paar); VarType maxType = mapExprentMaxTypes.get(paar); if (type.type == CodeConstants.TYPE_BYTECHAR || type.type == CodeConstants.TYPE_SHORTCHAR) { if (maxType != null && maxType.type == CodeConstants.TYPE_CHAR) { type = VarType.VARTYPE_CHAR; } else { type = type.type == CodeConstants.TYPE_BYTECHAR ? VarType.VARTYPE_BYTE : VarType.VARTYPE_SHORT; } mapExprentMinTypes.put(paar, type); //} else if(type.type == CodeConstants.TYPE_CHAR && (maxType == null || maxType.type == CodeConstants.TYPE_INT)) { // when possible, lift char to int // mapExprentMinTypes.put(paar, VarType.VARTYPE_INT); } else if (type.type == CodeConstants.TYPE_NULL) { mapExprentMinTypes.put(paar, VarType.VARTYPE_OBJECT); } } }
private void setNewVarIndices(VarTypeProcessor typeProcessor, DirectGraph graph, VarVersionsProcessor previousVersionsProcessor) { final Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes(); Map<VarVersionPair, Integer> mapFinalVars = typeProcessor.getMapFinalVars();
private static void simpleMerge(VarTypeProcessor typeProcessor, DirectGraph graph, StructMethod mt) { Map<VarVersionPair, VarType> mapExprentMaxTypes = typeProcessor.getMapExprentMaxTypes(); Map<VarVersionPair, VarType> mapExprentMinTypes = typeProcessor.getMapExprentMinTypes();