Package com.oracle.truffle.object.basic
Class BasicLocations.LongFieldLocation
- java.lang.Object
-
- com.oracle.truffle.api.object.Location
-
- com.oracle.truffle.object.LocationImpl
-
- com.oracle.truffle.object.basic.BasicLocations.FieldLocation
-
- com.oracle.truffle.object.basic.BasicLocations.MethodHandleFieldLocation
-
- com.oracle.truffle.object.basic.BasicLocations.LongFieldLocation
-
- All Implemented Interfaces:
BaseLocation,LongLocation,TypedLocation,LocationImpl.InternalLongLocation
- Enclosing class:
- BasicLocations
public static class BasicLocations.LongFieldLocation extends BasicLocations.MethodHandleFieldLocation 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 inherited from class com.oracle.truffle.object.basic.BasicLocations.MethodHandleFieldLocation
getter, setter
-
-
Constructor Summary
Constructors Constructor Description LongFieldLocation(int index, java.lang.invoke.MethodHandle getter, java.lang.invoke.MethodHandle setter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanStore(java.lang.Object value)Returnstrueif the location is compatible with the value.static LongLocationcreate(LocationImpl.InternalLongLocation longLocation, boolean allowInt)java.lang.Objectget(DynamicObject store, boolean condition)Get object value as object at this location in store.longgetLong(DynamicObject store, boolean condition)longgetLong(DynamicObject store, Shape shape)java.lang.Class<java.lang.Long>getType()The type of this location.intprimitiveFieldCount()Get the number of in-object primitive fields this location requires.voidsetInternal(DynamicObject store, java.lang.Object value)LikeLocation.set(DynamicObject, Object, Shape), but does not invalidate final locations.voidsetLong(DynamicObject store, long value)voidsetLong(DynamicObject store, long value, Shape shape)voidsetLong(DynamicObject store, long value, Shape oldShape, Shape newShape)voidsetLongInternal(DynamicObject store, long value)-
Methods inherited from class com.oracle.truffle.object.basic.BasicLocations.FieldLocation
equals, getIndex, getWhereString, hashCode
-
Methods inherited from class com.oracle.truffle.object.LocationImpl
canSet, canStoreFinal, getInternal, isConstant, isFinal, objectArrayCount, objectFieldCount, primitiveArrayCount, 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
-
create
public static LongLocation create(LocationImpl.InternalLongLocation longLocation, boolean allowInt)
-
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)
-
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
-
canStore
public final boolean canStore(java.lang.Object value)
Description copied from class:LocationReturnstrueif the location is compatible with the value. The value may still be rejected ifLocation.canSet(DynamicObject, Object)returns false.- Overrides:
canStorein classLocationImpl- Parameters:
value- the value in question
-
setLong
public final void setLong(DynamicObject store, long value, Shape oldShape, Shape newShape)
- Specified by:
setLongin interfaceLongLocation- See Also:
BaseLocation.set(DynamicObject, Object, Shape, Shape)
-
getLong
public long getLong(DynamicObject store, boolean condition)
- Specified by:
getLongin interfaceLongLocation- See Also:
BaseLocation.get(DynamicObject, boolean)
-
setLong
public void setLong(DynamicObject store, long value, Shape shape)
- Specified by:
setLongin interfaceLongLocation- See Also:
BaseLocation.set(DynamicObject, Object, Shape)
-
setLong
public final void setLong(DynamicObject store, long value) throws FinalLocationException
- Specified by:
setLongin interfaceLongLocation- Throws:
FinalLocationException- See Also:
BaseLocation.set(DynamicObject, Object)
-
setLongInternal
public final void setLongInternal(DynamicObject store, long value)
- Specified by:
setLongInternalin interfaceLocationImpl.InternalLongLocation
-
getLong
public final long getLong(DynamicObject store, Shape shape)
- Specified by:
getLongin interfaceLongLocation- See Also:
BaseLocation.get(DynamicObject, Shape)
-
primitiveFieldCount
public final int primitiveFieldCount()
Description copied from class:LocationImplGet the number of in-object primitive fields this location requires.- Overrides:
primitiveFieldCountin classLocationImpl
-
getType
public java.lang.Class<java.lang.Long> getType()
Description copied from interface:TypedLocationThe type of this location.- Specified by:
getTypein interfaceLongLocation- Specified by:
getTypein interfaceTypedLocation
-
-