Package com.oracle.truffle.api.object
Interface BaseLocation
- All Known Subinterfaces:
BooleanLocation
,DoubleLocation
,IntLocation
,LocationImpl.InternalLongLocation
,LocationImpl.TypedObjectLocation<T>
,LongLocation
,ObjectLocation
,TypedLocation
- All Known Implementing Classes:
BasicLocations.ArrayLocation
,BasicLocations.BooleanLocationDecorator
,BasicLocations.DoubleLocationDecorator
,BasicLocations.FieldLocation
,BasicLocations.IntLocationDecorator
,BasicLocations.LongArrayLocation
,BasicLocations.LongFieldLocation
,BasicLocations.LongLocationDecorator
,BasicLocations.MethodHandleFieldLocation
,BasicLocations.ObjectArrayLocation
,BasicLocations.ObjectFieldLocation
,BasicLocations.PrimitiveLocationDecorator
,BasicLocations.SimpleLongFieldLocation
,BasicLocations.SimpleObjectFieldLocation
,Location
,LocationImpl
,Locations.ConstantLocation
,Locations.DeclaredDualLocation
,Locations.DeclaredLocation
,Locations.DualLocation
,Locations.ValueLocation
public interface BaseLocation
-
Method Summary
Modifier and TypeMethodDescriptionget
(DynamicObject store, boolean condition) Get object value as object at this location in store.get
(DynamicObject store, Shape shape) Get object value as object at this location in store.void
set
(DynamicObject store, Object value) Set object value at this location in store.void
set
(DynamicObject store, Object value, Shape shape) Set object value at this location in store.void
set
(DynamicObject store, Object value, Shape oldShape, Shape newShape) Set object value at this location in store and update shape.
-
Method Details
-
get
Get object value as object at this location in store.- Parameters:
shape
- the current shape of the object, which must contain this location
-
get
Get object value as object at this location in store. For internal use only and subject to change, useget(DynamicObject, Shape)
instead.- Parameters:
condition
- the result of a shape check orfalse
- See Also:
-
set
void set(DynamicObject store, Object value) throws IncompatibleLocationException, FinalLocationException Set object value at this location in store.- Throws:
IncompatibleLocationException
- for storage type invalidationsFinalLocationException
- for effectively final fields
-
set
void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException Set object value at this location in store.- Parameters:
shape
- the current shape of the storage object- Throws:
IncompatibleLocationException
- for storage type invalidationsFinalLocationException
- for effectively final fields
-
set
void set(DynamicObject store, Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException Set object value at this location in store and update shape.- Parameters:
oldShape
- the shape before the transitionnewShape
- new shape after the transition- Throws:
IncompatibleLocationException
- if value is of non-assignable type
-