Package com.oracle.truffle.object
Class LayoutImpl
- java.lang.Object
-
- com.oracle.truffle.api.object.Layout
-
- com.oracle.truffle.object.LayoutImpl
-
- Direct Known Subclasses:
BasicLayout
public abstract class LayoutImpl extends Layout
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.oracle.truffle.api.object.Layout
Layout.ImplicitCast
-
-
Field Summary
-
Fields inherited from class com.oracle.truffle.api.object.Layout
INT_TO_DOUBLE, INT_TO_LONG, NONE, OPTION_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLayoutImpl(java.util.EnumSet<Layout.ImplicitCast> allowedImplicitCasts, java.lang.Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Shape.AllocatorcreateAllocator()Create an allocator for static property creation.ShapecreateShape(ObjectType operations)ShapecreateShape(ObjectType operations, java.lang.Object sharedData)protected LocationexistingLocationForValue(java.lang.Object value, Location oldLocation, Shape oldShape)protected abstract LocationgetObjectArrayLocation()protected abstract intgetObjectFieldCount()protected abstract LocationgetPrimitiveArrayLocation()protected abstract intgetPrimitiveFieldCount()LayoutStrategygetStrategy()java.lang.Class<? extends DynamicObject>getType()protected abstract booleanhasObjectExtensionArray()protected abstract booleanhasPrimitiveExtensionArray()booleanisAllowedIntToDouble()booleanisAllowedIntToLong()protected booleanisLocationAssignableFrom(Location destination, Location source)booleanisPropertyUpcastOf(Property thiz, Property other)Is this property an upcast of the other property?abstract DynamicObjectnewInstance(Shape shape)protected abstract intobjectFieldIndex(Location location)-
Methods inherited from class com.oracle.truffle.api.object.Layout
createLayout, createLayout, createLayout, createShape, getFactory
-
-
-
-
Constructor Detail
-
LayoutImpl
protected LayoutImpl(java.util.EnumSet<Layout.ImplicitCast> allowedImplicitCasts, java.lang.Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy)
-
-
Method Detail
-
newInstance
public abstract DynamicObject newInstance(Shape shape)
- Specified by:
newInstancein classLayout
-
getType
public java.lang.Class<? extends DynamicObject> getType()
-
createShape
public final Shape createShape(ObjectType operations, java.lang.Object sharedData)
- Specified by:
createShapein classLayout
-
createShape
public final Shape createShape(ObjectType operations)
- Specified by:
createShapein classLayout
-
isAllowedIntToDouble
public boolean isAllowedIntToDouble()
-
isAllowedIntToLong
public boolean isAllowedIntToLong()
-
hasObjectExtensionArray
protected abstract boolean hasObjectExtensionArray()
-
hasPrimitiveExtensionArray
protected abstract boolean hasPrimitiveExtensionArray()
-
getObjectFieldCount
protected abstract int getObjectFieldCount()
-
getPrimitiveFieldCount
protected abstract int getPrimitiveFieldCount()
-
getObjectArrayLocation
protected abstract Location getObjectArrayLocation()
-
getPrimitiveArrayLocation
protected abstract Location getPrimitiveArrayLocation()
-
objectFieldIndex
protected abstract int objectFieldIndex(Location location)
-
isLocationAssignableFrom
protected boolean isLocationAssignableFrom(Location destination, Location source)
-
existingLocationForValue
protected Location existingLocationForValue(java.lang.Object value, Location oldLocation, Shape oldShape)
-
isPropertyUpcastOf
public boolean isPropertyUpcastOf(Property thiz, Property other)
Is this property an upcast of the other property?- Parameters:
other- the property being compared to- Returns:
- true if this is a upcast of the other property, false otherwise
-
createAllocator
public abstract Shape.Allocator createAllocator()
Description copied from class:LayoutCreate an allocator for static property creation. Reserves all array extension slots.- Specified by:
createAllocatorin classLayout
-
getStrategy
public LayoutStrategy getStrategy()
-
-