@Override public void visitArrayLength(SSAArrayLengthInstruction instruction) { if (!doPrimitives) { result = null; } else { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Integer.valueOf(1)))); } }
@Override public void visitComparison(SSAComparisonInstruction instruction) { if (doPrimitives) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Integer.valueOf(0)))); } }
@Override public void visitComparison(SSAComparisonInstruction instruction) { if (doPrimitives) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Integer.valueOf(0)))); } }
@Override public void visitGetCaughtException(SSAGetCaughtExceptionInstruction instruction) { TypeAbstraction type = meetDeclaredExceptionTypes(instruction); result = new DeclaredTypeOperator(type); }
@Override public void visitAstGlobalRead(AstGlobalRead instruction) { result = new DeclaredTypeOperator(new ConeType(cha.getRootClass())); }
@Override public void visitGetCaughtException(SSAGetCaughtExceptionInstruction instruction) { TypeAbstraction type = meetDeclaredExceptionTypes(instruction); result = new DeclaredTypeOperator(type); }
@Override public void visitInstanceof(SSAInstanceofInstruction instruction) { if (doPrimitives) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Boolean.TRUE))); } }
@Override public void visitArrayLength(SSAArrayLengthInstruction instruction) { if (!doPrimitives) { result = null; } else { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Integer.valueOf(1)))); } }
@Override public void visitIsDefined(AstIsDefinedInstruction inst) { if (doPrimitives) { result = new DeclaredTypeOperator(booleanType); } }
@Override public void visitLoadMetadata(SSALoadMetadataInstruction instruction) { IClass jlClassKlass = cha.lookupClass(instruction.getType()); assert jlClassKlass != null; result = new DeclaredTypeOperator(new ConeType(jlClassKlass)); }
@Override public void visitBinaryOp(SSABinaryOpInstruction instruction) { if (doPrimitives) { IBinaryOpInstruction.IOperator op = instruction.getOperator(); if (op == CAstBinaryOp.EQ || op == CAstBinaryOp.NE || op == CAstBinaryOp.LT || op == CAstBinaryOp.GE || op == CAstBinaryOp.GT || op == CAstBinaryOp.LE) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Boolean.TRUE))); } else { result = new PrimAndStringOp(); } } }
@Override public void visitInstanceof(SSAInstanceofInstruction instruction) { if (doPrimitives) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Boolean.TRUE))); } }
@Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { TypeReference type = inst.getEnclosingType(); IClass klass = cha.lookupClass(type); if (klass == null) { Assertions.UNREACHABLE(); } else { result = new DeclaredTypeOperator(new ConeType(klass)); } }
@Override public void visitConversion(SSAConversionInstruction instruction) { if (doPrimitives) { result = new DeclaredTypeOperator(language.getPrimitive(instruction.getToType())); } }
@Override public void visitLoadMetadata(SSALoadMetadataInstruction instruction) { IClass jlClassKlass = cha.lookupClass(instruction.getType()); assert jlClassKlass != null; result = new DeclaredTypeOperator(new ConeType(jlClassKlass)); }
@Override public void visitEnclosingObjectReference(EnclosingObjectReference inst) { TypeReference type = inst.getEnclosingType(); IClass klass = cha.lookupClass(type); if (klass == null) { Assertions.UNREACHABLE(); } else { result = new DeclaredTypeOperator(new ConeType(klass)); } }
@Override public void visitNew(SSANewInstruction instruction) { TypeReference type = instruction.getConcreteType(); IClass klass = cha.lookupClass(type); if (klass == null) { // a type that cannot be loaded. // be pessimistic result = new DeclaredTypeOperator(BOTTOM); } else { result = new DeclaredTypeOperator(new PointType(klass)); } }
@Override public void visitBinaryOp(SSABinaryOpInstruction instruction) { if (doPrimitives) { IBinaryOpInstruction.IOperator op = instruction.getOperator(); if (op == CAstBinaryOp.EQ || op == CAstBinaryOp.NE || op == CAstBinaryOp.LT || op == CAstBinaryOp.GE || op == CAstBinaryOp.GT || op == CAstBinaryOp.LE) { result = new DeclaredTypeOperator(language.getPrimitive(language.getConstantType(Boolean.TRUE))); } else { result = new PrimAndStringOp(); } } }
@Override public void visitNew(SSANewInstruction instruction) { TypeReference type = instruction.getConcreteType(); IClass klass = cha.lookupClass(type); if (klass == null) { // a type that cannot be loaded. // be pessimistic result = new DeclaredTypeOperator(BOTTOM); } else { result = new DeclaredTypeOperator(new PointType(klass)); } }
@Override public void visitIsDefined(AstIsDefinedInstruction inst) { if (doPrimitives) { result = new DeclaredTypeOperator(booleanType); } }