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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
get(DynamicObject store, boolean condition)
Get object value as object at this location in store.java.lang.Object
get(DynamicObject store, Shape shape)
Get object value as object at this location in store.void
set(DynamicObject store, java.lang.Object value)
Set object value at this location in store.void
set(DynamicObject store, java.lang.Object value, Shape shape)
Set object value at this location in store.void
set(DynamicObject store, java.lang.Object value, Shape oldShape, Shape newShape)
Set object value at this location in store and update shape.
-
-
-
Method Detail
-
get
java.lang.Object get(DynamicObject store, Shape shape)
Get object value as object at this location in store.- Parameters:
shape
- the current shape of the object, which must contain this location
-
get
java.lang.Object get(DynamicObject store, boolean condition)
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:
get(DynamicObject, Shape)
-
set
void set(DynamicObject store, java.lang.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, java.lang.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, java.lang.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
-
-