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
-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStoreFinal(DynamicObject store, Object val) booleanfinal Objectget(DynamicObject store, boolean condition) Get object value as object at this location in store.inthashCode()final voidset(DynamicObject store, Object value, Shape shape) Set object value at this location in store.final voidsetInternal(DynamicObject store, Object value) LikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations.toString()Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStore, getInternal, getWhereString, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, primitiveFieldCount, valueEqualsMethods inherited from class com.oracle.truffle.api.object.Location
checkShape, finalLocation, get, incompatibleLocation, set, set
-
Constructor Details
-
ValueLocation
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCodein classLocationImpl
-
equals
- Overrides:
equalsin classLocationImpl
-
get
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:
-
set
public final void set(DynamicObject store, 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
- Overrides:
canStoreFinalin classLocationImpl
-
setInternal
public final void setInternal(DynamicObject store, 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
- Overrides:
toStringin classLocationImpl
-