public boolean isUndefined(int valueNumber) { // TODO: Julian, you seem to be using BOTTOM in the European style. // Steve's code assumes American style (god forbid), so what you're getting // here // is not undefined, but java.lang.Object [NR/EY] if (getVariable(valueNumber) == null) { return true; } TypeAbstraction ta = getVariable(valueNumber).getType(); return ta == BOTTOM || ta.getType() == null; }
public boolean isUndefined(int valueNumber) { // TODO: Julian, you seem to be using BOTTOM in the European style. // Steve's code assumes American style (god forbid), so what you're getting // here // is not undefined, but java.lang.Object [NR/EY] if (getVariable(valueNumber) == null) { return true; } TypeAbstraction ta = getVariable(valueNumber).getType(); return ta == BOTTOM || ta.getType() == null; }
/** * Return the type computed for a particular value number */ public TypeAbstraction getType(int valueNumber) { if (valueNumber < 0) { throw new IllegalArgumentException("bad value number " + valueNumber); } TypeVariable variable = getVariable(valueNumber); assert variable != null : "null variable for value number " + valueNumber; return variable.getType(); }
/** * Return the type computed for a particular value number */ public TypeAbstraction getType(int valueNumber) { if (valueNumber < 0) { throw new IllegalArgumentException("bad value number " + valueNumber); } TypeVariable variable = getVariable(valueNumber); assert variable != null : "null variable for value number " + valueNumber; return variable.getType(); }
/** * Extract all results of the type inference analysis. * * @return an array, where the i'th variable holds the type abstraction of the i'th value number. */ public TypeAbstraction[] extractAllResults() { int numberOfVars = ir.getSymbolTable().getMaxValueNumber() + 1; TypeAbstraction[] ret = new TypeAbstraction[numberOfVars]; for (int i = 0; i < numberOfVars; ++i) { TypeVariable var = getVariable(i); ret[i] = var == null ? null : var.getType(); } return ret; }
/** * Extract all results of the type inference analysis. * * @return an array, where the i'th variable holds the type abstraction of the i'th value number. */ public TypeAbstraction[] extractAllResults() { int numberOfVars = ir.getSymbolTable().getMaxValueNumber() + 1; TypeAbstraction[] ret = new TypeAbstraction[numberOfVars]; for (int i = 0; i < numberOfVars; ++i) { TypeVariable var = getVariable(i); ret[i] = var == null ? null : var.getType(); } return ret; }
TypeVariable v = getVariable(parameterValueNumbers[i]); TypeReference t = ir.getParameterType(i); for (int i = 0; i <= st.getMaxValueNumber(); i++) { if (st.isConstant(i)) { TypeVariable v = getVariable(i); v.setType(getConstantType(i)); if (s instanceof SSAAbstractInvokeInstruction) { SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) s; TypeVariable v = getVariable(call.getException()); Collection<TypeReference> defaultExceptions = call.getExceptionTypes(); if (defaultExceptions.size() == 0) {
TypeVariable v = getVariable(parameterValueNumbers[i]); TypeReference t = ir.getParameterType(i); for (int i = 0; i <= st.getMaxValueNumber(); i++) { if (st.isConstant(i)) { TypeVariable v = getVariable(i); v.setType(getConstantType(i)); if (s instanceof SSAAbstractInvokeInstruction) { SSAAbstractInvokeInstruction call = (SSAAbstractInvokeInstruction) s; TypeVariable v = getVariable(call.getException()); Collection<TypeReference> defaultExceptions = call.getExceptionTypes(); if (defaultExceptions.size() == 0) {