public class StampFactory extends Object
Modifier and Type | Field and Description |
---|---|
private static Stamp |
booleanFalse |
private static Stamp |
booleanTrue |
private static Stamp[] |
emptyStampCache |
private static Stamp |
nodeIntrinsicStamp |
private static Stamp |
objectAlwaysNullStamp |
private static Stamp |
objectNonNullStamp |
private static Stamp |
objectStamp |
private static Stamp |
positiveInt |
private static Stamp |
rawPointer |
private static Stamp[] |
stampCache |
Constructor and Description |
---|
StampFactory() |
Modifier and Type | Method and Description |
---|---|
static Stamp |
alwaysNull() |
static Stamp |
contradiction() |
static Stamp[] |
createParameterStamps(ResolvedJavaMethod method) |
static Stamp |
declared(ResolvedJavaType type)
Returns a
Stamp for objects of type type , or one of its subtypes, or null. |
static Stamp |
declaredNonNull(ResolvedJavaType type)
Returns a
Stamp for objects of type type , or one of its subtypes, but not
null. |
static Stamp |
declaredTrusted(ResolvedJavaType type)
Returns a
Stamp for objects of type type , or one of its subtypes, or null. |
static Stamp |
declaredTrusted(ResolvedJavaType type,
boolean nonNull) |
static Stamp |
declaredTrustedNonNull(ResolvedJavaType type)
Returns a
Stamp for objects of type type , or one of its subtypes, but not
null. |
static Stamp |
empty(Kind kind) |
static Stamp |
exact(ResolvedJavaType type)
Returns a
Stamp for objects of exactly type type , or null. |
static Stamp |
exactNonNull(ResolvedJavaType type)
Returns a
Stamp for non-null objects of exactly type type . |
private static ResolvedJavaType |
filterInterfaceTypesOut(ResolvedJavaType type) |
static Stamp |
forConstant(JavaConstant value) |
static Stamp |
forConstant(JavaConstant value,
MetaAccessProvider metaAccess) |
static FloatStamp |
forFloat(Kind kind,
double lowerBound,
double upperBound,
boolean nonNaN) |
static IntegerStamp |
forInteger(int bits) |
static IntegerStamp |
forInteger(int bits,
long lowerBound,
long upperBound) |
static IntegerStamp |
forInteger(Kind kind,
long lowerBound,
long upperBound) |
static IntegerStamp |
forInteger(Kind kind,
long lowerBound,
long upperBound,
long downMask,
long upMask) |
static Stamp |
forKind(Kind kind)
Return a stamp for a Java kind, as it would be represented on the bytecode stack.
|
static Stamp |
forNodeIntrinsic()
A stamp used only in the graph of intrinsics, e.g., snippets.
|
static Stamp |
forVoid()
Return the stamp for the
void type. |
static Stamp |
intValue() |
static Stamp |
object() |
static Stamp |
object(ResolvedJavaType type,
boolean exactType,
boolean nonNull,
boolean trustInterfaces) |
static Stamp |
objectNonNull() |
static Stamp |
pointer() |
static Stamp |
positiveInt() |
private static void |
setCache(Kind kind,
Stamp stamp) |
private static void |
setFloatCache(Kind kind) |
private static void |
setIntCache(Kind kind) |
static Stamp |
tautology() |
private static final Stamp[] stampCache
private static final Stamp[] emptyStampCache
private static final Stamp objectStamp
private static final Stamp objectNonNullStamp
private static final Stamp objectAlwaysNullStamp
private static final Stamp nodeIntrinsicStamp
private static final Stamp positiveInt
private static final Stamp booleanTrue
private static final Stamp booleanFalse
private static final Stamp rawPointer
public StampFactory()
private static void setIntCache(Kind kind)
private static void setFloatCache(Kind kind)
public static Stamp contradiction()
public static Stamp forKind(Kind kind)
public static Stamp forVoid()
void
type. This will return a singleton instance than can be
compared using ==
.public static Stamp forNodeIntrinsic()
public static Stamp positiveInt()
public static IntegerStamp forInteger(Kind kind, long lowerBound, long upperBound, long downMask, long upMask)
public static IntegerStamp forInteger(Kind kind, long lowerBound, long upperBound)
public static IntegerStamp forInteger(int bits)
public static IntegerStamp forInteger(int bits, long lowerBound, long upperBound)
public static FloatStamp forFloat(Kind kind, double lowerBound, double upperBound, boolean nonNaN)
public static Stamp forConstant(JavaConstant value)
public static Stamp forConstant(JavaConstant value, MetaAccessProvider metaAccess)
public static Stamp objectNonNull()
public static Stamp alwaysNull()
public static Stamp declared(ResolvedJavaType type)
Stamp
for objects of type type
, or one of its subtypes, or null.public static Stamp declaredNonNull(ResolvedJavaType type)
Stamp
for objects of type type
, or one of its subtypes, but not
null.public static Stamp declaredTrusted(ResolvedJavaType type)
Stamp
for objects of type type
, or one of its subtypes, or null.
Contrary to declared(ResolvedJavaType)
, interface types will be preserved in the
stamp.
In general interface types are not verified at class loading or run-time so this should be
used with care.public static Stamp declaredTrustedNonNull(ResolvedJavaType type)
Stamp
for objects of type type
, or one of its subtypes, but not
null. Contrary to declaredNonNull(ResolvedJavaType)
, interface types will be
preserved in the stamp.
In general interface types are not verified at class loading or run-time so this should be
used with care.public static Stamp declaredTrusted(ResolvedJavaType type, boolean nonNull)
public static Stamp exact(ResolvedJavaType type)
Stamp
for objects of exactly type type
, or null.public static Stamp exactNonNull(ResolvedJavaType type)
Stamp
for non-null objects of exactly type type
.private static ResolvedJavaType filterInterfaceTypesOut(ResolvedJavaType type)
public static Stamp object(ResolvedJavaType type, boolean exactType, boolean nonNull, boolean trustInterfaces)
public static Stamp[] createParameterStamps(ResolvedJavaMethod method)