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
ConstructorsModifierConstructorDescriptionprotectedLayoutImpl(EnumSet<Layout.ImplicitCast> allowedImplicitCasts, Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy) -
Method Summary
Modifier and TypeMethodDescriptionabstract Shape.AllocatorCreate an allocator for static property creation.final ShapecreateShape(ObjectType operations) final ShapecreateShape(ObjectType operations, Object sharedData) protected LocationexistingLocationForValue(Object value, Location oldLocation, Shape oldShape) protected abstract Locationprotected abstract intprotected abstract Locationprotected abstract intClass<? extends DynamicObject>getType()protected abstract booleanprotected abstract booleanbooleanbooleanprotected 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 Details
-
LayoutImpl
protected LayoutImpl(EnumSet<Layout.ImplicitCast> allowedImplicitCasts, Class<? extends DynamicObjectImpl> clazz, LayoutStrategy strategy)
-
-
Method Details
-
newInstance
- Specified by:
newInstancein classLayout
-
getType
-
createShape
- Specified by:
createShapein classLayout
-
createShape
- 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
-
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:LayoutCreate an allocator for static property creation. Reserves all array extension slots.- Specified by:
createAllocatorin classLayout
-
getStrategy
-