Package com.oracle.truffle.object.basic
Class BasicLocations.LongArrayLocation
- java.lang.Object
-
- com.oracle.truffle.api.object.Location
-
- com.oracle.truffle.object.LocationImpl
-
- com.oracle.truffle.object.basic.BasicLocations.ArrayLocation
-
- com.oracle.truffle.object.basic.BasicLocations.LongArrayLocation
-
- All Implemented Interfaces:
BaseLocation
,LongLocation
,TypedLocation
,LocationImpl.InternalLongLocation
- Enclosing class:
- BasicLocations
public static class BasicLocations.LongArrayLocation extends BasicLocations.ArrayLocation implements LocationImpl.InternalLongLocation
-
-
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>
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowInt
-
Fields inherited from class com.oracle.truffle.object.basic.BasicLocations.ArrayLocation
arrayLocation, index
-
-
Constructor Summary
Constructors Constructor Description LongArrayLocation(int index, Location arrayLocation)
LongArrayLocation(int index, Location arrayLocation, boolean allowInt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canStore(java.lang.Object value)
Returnstrue
if the location is compatible with the value.java.lang.Object
get(DynamicObject store, boolean condition)
Get object value as object at this location in store.long
getLong(DynamicObject store, boolean condition)
long
getLong(DynamicObject store, Shape shape)
java.lang.Class<java.lang.Long>
getType()
The type of this location.int
primitiveArrayCount()
Get the number of primitive array elements this location requires.void
setInternal(DynamicObject store, java.lang.Object value)
LikeLocation.set(DynamicObject, Object, Shape)
, but does not invalidate final locations.void
setLong(DynamicObject store, long value)
void
setLong(DynamicObject store, long value, Shape shape)
void
setLong(DynamicObject store, long value, Shape oldShape, Shape newShape)
void
setLongInternal(DynamicObject store, long value)
-
Methods inherited from class com.oracle.truffle.object.basic.BasicLocations.ArrayLocation
equals, getArray, getIndex, getWhereString, hashCode
-
Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveFieldCount, set, toString, valueEquals
-
Methods inherited from class com.oracle.truffle.api.object.Location
checkShape, finalLocation, get, incompatibleLocation, set, set
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.oracle.truffle.api.object.BaseLocation
get, set, set, set
-
-
-
-
Method Detail
-
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)
-
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
-
getLong
public long getLong(DynamicObject store, boolean condition)
- Specified by:
getLong
in interfaceLongLocation
- See Also:
BaseLocation.get(DynamicObject, boolean)
-
setLongInternal
public final void setLongInternal(DynamicObject store, long value)
- Specified by:
setLongInternal
in interfaceLocationImpl.InternalLongLocation
-
setLong
public void setLong(DynamicObject store, long value, Shape shape) throws FinalLocationException
- Specified by:
setLong
in interfaceLongLocation
- Throws:
FinalLocationException
- See Also:
BaseLocation.set(DynamicObject, Object, Shape)
-
setLong
public final void setLong(DynamicObject store, long value, Shape oldShape, Shape newShape)
- Specified by:
setLong
in interfaceLongLocation
- See Also:
BaseLocation.set(DynamicObject, Object, Shape, Shape)
-
setLong
public final void setLong(DynamicObject store, long value) throws FinalLocationException
- Specified by:
setLong
in interfaceLongLocation
- Throws:
FinalLocationException
- See Also:
BaseLocation.set(DynamicObject, Object)
-
getLong
public final long getLong(DynamicObject store, Shape shape)
- Specified by:
getLong
in interfaceLongLocation
- See Also:
BaseLocation.get(DynamicObject, Shape)
-
canStore
public final boolean canStore(java.lang.Object value)
Description copied from class:Location
Returnstrue
if the location is compatible with the value. The value may still be rejected ifLocation.canSet(DynamicObject, Object)
returns false.- Overrides:
canStore
in classLocationImpl
- Parameters:
value
- the value in question
-
getType
public java.lang.Class<java.lang.Long> getType()
Description copied from interface:TypedLocation
The type of this location.- Specified by:
getType
in interfaceLongLocation
- Specified by:
getType
in interfaceTypedLocation
-
primitiveArrayCount
public int primitiveArrayCount()
Description copied from class:LocationImpl
Get the number of primitive array elements this location requires.- Overrides:
primitiveArrayCount
in classLocationImpl
-
-