Class Location
java.lang.Object
com.oracle.truffle.api.object.Location
Property location.
Planned to be deprecated.
- Since:
- 0.8 or earlier
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.booleanReturnstrueif the location is compatible with the type of the value.booleanMust be overridden in subclasses.protected static FinalLocationExceptionDeprecated.final Objectget(DynamicObject store) Deprecated.get(DynamicObject store, boolean condition) Deprecated.final Objectget(DynamicObject store, Shape shape) Deprecated.If this is a constant location, returns the constant value bound to this location.protected doublegetDouble(DynamicObject store, boolean guard) Gets this location's value as double.Returns the assumption that this location is final.protected intgetInt(DynamicObject store, boolean guard) Gets this location's value as int.protected longgetLong(DynamicObject store, boolean guard) Gets this location's value as long.inthashCode()Must be overridden in subclasses.protected static IncompatibleLocationExceptionDeprecated.booleanReturnstrueif this location is assumed to be final.booleanReturnstrueif this is a constant value location.booleanDeprecated.No longer needed.booleanisFinal()Deprecated.UseisAssumedFinal()instead or replace byfalse.booleanReturnstrueif this location can only store primitive types and cannot contain any object references.booleanisValue()Returnstrueif this is a value location.voidset(DynamicObject store, Object value, Shape shape) Deprecated.voidset(DynamicObject store, Object value, Shape oldShape, Shape newShape) Deprecated.toString()
-
Constructor Details
-
Location
protected Location()Constructor for subclasses.- Since:
- 0.8 or earlier
-
-
Method Details
-
incompatibleLocation
@Deprecated(since="22.2") protected static IncompatibleLocationException incompatibleLocation() throws IncompatibleLocationExceptionDeprecated.- Throws:
IncompatibleLocationException- Since:
- 0.8 or earlier
-
finalLocation
@Deprecated(since="22.2") protected static FinalLocationException finalLocation() throws FinalLocationExceptionDeprecated.- Throws:
FinalLocationException- Since:
- 0.8 or earlier
-
get
Deprecated.Get object value as object at this location in store.- Parameters:
shape- the current shape of the object, which must contain this location- Since:
- 0.8 or earlier
-
get
Deprecated.Get object value as object at this location in store. For internal use only and subject to change, useget(DynamicObject, Shape)instead.- Parameters:
store- storage objectcondition- the result of a shape check orfalse- Since:
- 0.8 or earlier
- See Also:
-
get
Deprecated.Get object value as object at this location in store.- Since:
- 0.8 or earlier
-
getInt
Gets this location's value as int.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain an int value.- Since:
- 22.2
-
getLong
Gets this location's value as long.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain a long value.- Since:
- 22.2
-
getDouble
Gets this location's value as double.- Parameters:
store- storage objectguard- the result of a shape check orfalse- Throws:
UnexpectedResultException- if the location does not contain a double value.- Since:
- 22.2
-
set
@Deprecated(since="22.2") public void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException Deprecated.Set object value at this location in store.- Parameters:
store- storage objectvalue- the value to setshape- the current shape of the storage object- Throws:
IncompatibleLocationException- for storage type invalidationsFinalLocationException- for effectively final fields- Since:
- 0.8 or earlier
-
set
@Deprecated(since="22.2") public void set(DynamicObject store, Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException Deprecated.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- Since:
- 0.8 or earlier
-
canSet
Deprecated.Equivalent tocanStore(Object).Returnstrueif the location can be set to the value.- Parameters:
value- the value in question- Since:
- 0.8 or earlier
-
canStore
Returnstrueif the location is compatible with the type of the value.- Parameters:
value- the value in question- Since:
- 0.8 or earlier
-
isFinal
Deprecated.UseisAssumedFinal()instead or replace byfalse.Returnstrueif this is a final location, i.e. readonly once set.- Since:
- 0.8 or earlier
- See Also:
-
isConstant
public boolean isConstant()Returnstrueif this is a constant value location.- Since:
- 0.8 or earlier
-
hashCode
-
equals
-
toString
-
isDeclared
Deprecated.No longer needed. Declared locations can only be created with deprecated APIs.Returnstrueif this is a declared value location.- Since:
- 0.18
-
isValue
public boolean isValue()Returnstrueif this is a value location.- Since:
- 0.18
- See Also:
-
isAssumedFinal
public boolean isAssumedFinal()Returnstrueif this location is assumed to be final.- Since:
- 0.18
- See Also:
-
getFinalAssumption
Returns the assumption that this location is final.- Since:
- 0.18
- See Also:
-
isPrimitive
public boolean isPrimitive()Returnstrueif this location can only store primitive types and cannot contain any object references.- Since:
- 22.2
-
getConstantValue
If this is a constant location, returns the constant value bound to this location. Otherwise, returns null.- Since:
- 22.2
-
canStore(Object).