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
-
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
ConstructorsModifierConstructorDescriptionprotected
LayoutImpl
(EnumSet<Layout.ImplicitCast> allowedImplicitCasts, Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy) -
Method Summary
Modifier and TypeMethodDescriptionabstract Shape.Allocator
Create an allocator for static property creation.final Shape
createShape
(ObjectType operations) final Shape
createShape
(ObjectType operations, Object sharedData) protected Location
existingLocationForValue
(Object value, Location oldLocation, Shape oldShape) protected abstract Location
protected abstract int
protected abstract Location
protected abstract int
Class<? extends DynamicObject>
getType()
protected abstract boolean
protected abstract boolean
boolean
boolean
protected boolean
isLocationAssignableFrom
(Location destination, Location source) boolean
isPropertyUpcastOf
(Property thiz, Property other) Is this property an upcast of the other property?abstract DynamicObject
newInstance
(Shape shape) protected abstract int
objectFieldIndex
(Location location) Methods inherited from class com.oracle.truffle.api.object.Layout
createLayout, createLayout, createLayout, createShape, getFactory
-
Constructor Details
-
LayoutImpl
protected LayoutImpl(EnumSet<Layout.ImplicitCast> allowedImplicitCasts, Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy)
-
-
Method Details
-
newInstance
- Specified by:
newInstance
in classLayout
-
getType
-
createShape
- Specified by:
createShape
in classLayout
-
createShape
- Specified by:
createShape
in 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
-
getPrimitiveArrayLocation
-
objectFieldIndex
-
isLocationAssignableFrom
-
existingLocationForValue
-
isPropertyUpcastOf
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
Description copied from class:Layout
Create an allocator for static property creation. Reserves all array extension slots.- Specified by:
createAllocator
in classLayout
-
getStrategy
-