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 boolean
canStoreFinal(DynamicObject store, java.lang.Object val)
boolean
equals(java.lang.Object obj)
java.lang.Object
get(DynamicObject store, boolean condition)
Get object value as object at this location in store.int
hashCode()
void
set(DynamicObject store, java.lang.Object value, Shape shape)
Set object value at this location in store.void
setInternal(DynamicObject store, java.lang.Object value)
LikeLocation.set(DynamicObject, Object, Shape)
, but does not invalidate final locations.java.lang.String
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
-
-
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classLocationImpl
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classLocationImpl
-
get
public final java.lang.Object get(DynamicObject store, boolean condition)
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:
BaseLocation.get(DynamicObject, Shape)
-
set
public final void set(DynamicObject store, java.lang.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
protected boolean canStoreFinal(DynamicObject store, java.lang.Object val)
- Overrides:
canStoreFinal
in classLocationImpl
-
setInternal
public final void setInternal(DynamicObject store, java.lang.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
public java.lang.String toString()
- Overrides:
toString
in classLocationImpl
-
-