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 boolean
canStoreFinal
(DynamicObject store, Object val) boolean
final Object
get
(DynamicObject store, boolean condition) Get object value as object at this location in store.int
hashCode()
final void
set
(DynamicObject store, Object value, Shape shape) Set object value at this location in store.final void
setInternal
(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, valueEquals
Methods 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:
hashCode
in classLocationImpl
-
equals
- Overrides:
equals
in classLocationImpl
-
get
Description copied from interface:BaseLocation
Get object value as object at this location in store. For internal use only and subject to change, useBaseLocation.get(DynamicObject, Shape)
instead.- Specified by:
get
in interfaceBaseLocation
- Overrides:
get
in classLocation
condition
- 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:BaseLocation
Set object value at this location in store.- Specified by:
set
in interfaceBaseLocation
- Overrides:
set
in classLocationImpl
shape
- the current shape of the storage object- Throws:
IncompatibleLocationException
- for storage type invalidationsFinalLocationException
- for effectively final fields
-
canStoreFinal
- Overrides:
canStoreFinal
in classLocationImpl
-
setInternal
public final void setInternal(DynamicObject store, Object value) throws IncompatibleLocationException Description copied from class:Location
LikeLocation.set(DynamicObject, Object, Shape)
, but does not invalidate final locations. For internal use only and subject to change, useDynamicObjectFactory
to create objects with predefined properties.- Specified by:
setInternal
in classLocationImpl
- Throws:
IncompatibleLocationException
- if value is of non-assignable type
-
toString
- Overrides:
toString
in classLocationImpl
-