Package com.oracle.truffle.object
Class Locations.ValueLocation
- java.lang.Object
-
- com.oracle.truffle.api.object.Location
-
- com.oracle.truffle.object.LocationImpl
-
- com.oracle.truffle.object.Locations.ValueLocation
-
- All Implemented Interfaces:
BaseLocation
- Direct Known Subclasses:
Locations.ConstantLocation,Locations.DeclaredLocation
- Enclosing class:
- Locations
public abstract static class Locations.ValueLocation extends LocationImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.oracle.truffle.object.LocationImpl
LocationImpl.EffectivelyFinalLocation<T extends Location>, LocationImpl.InternalLongLocation, LocationImpl.TypedObjectLocation<T extends Location & ObjectLocation>
-
-
Constructor Summary
Constructors Constructor Description ValueLocation(java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanStoreFinal(DynamicObject store, java.lang.Object val)booleanequals(java.lang.Object obj)java.lang.Objectget(DynamicObject store, boolean condition)Get object value as object at this location in store.inthashCode()voidset(DynamicObject store, java.lang.Object value, Shape shape)Set object value at this location in store.voidsetInternal(DynamicObject store, java.lang.Object value)LikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations.java.lang.StringtoString()-
Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStore, getInternal, getWhereString, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount, valueEquals
-
Methods inherited from class com.oracle.truffle.api.object.Location
checkShape, finalLocation, get, incompatibleLocation, set, set
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classLocationImpl
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classLocationImpl
-
get
public final java.lang.Object get(DynamicObject store, boolean condition)
Description copied from interface:BaseLocationGet object value as object at this location in store. For internal use only and subject to change, useBaseLocation.get(DynamicObject, Shape)instead.- Specified by:
getin interfaceBaseLocation- Overrides:
getin classLocationcondition- the result of a shape check orfalse- See Also:
BaseLocation.get(DynamicObject, Shape)
-
set
public final void set(DynamicObject store, java.lang.Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException
Description copied from interface:BaseLocationSet object value at this location in store.- Specified by:
setin interfaceBaseLocation- Overrides:
setin classLocationImplshape- the current shape of the storage object- Throws:
IncompatibleLocationException- for storage type invalidationsFinalLocationException- for effectively final fields
-
canStoreFinal
protected boolean canStoreFinal(DynamicObject store, java.lang.Object val)
- Overrides:
canStoreFinalin classLocationImpl
-
setInternal
public final void setInternal(DynamicObject store, java.lang.Object value) throws IncompatibleLocationException
Description copied from class:LocationLikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations. For internal use only and subject to change, useDynamicObjectFactoryto create objects with predefined properties.- Specified by:
setInternalin classLocationImpl- Throws:
IncompatibleLocationException- if value is of non-assignable type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classLocationImpl
-
-