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
  • Constructor Details

  • Method Details

    • newInstance

      public abstract DynamicObject newInstance(Shape shape)
      Specified by:
      newInstance in class Layout
    • getType

      public Class<? extends DynamicObject> getType()
      Specified by:
      getType in class Layout
    • createShape

      public final Shape createShape(ObjectType operations, Object sharedData)
      Specified by:
      createShape in class Layout
    • createShape

      public final Shape createShape(ObjectType operations)
      Specified by:
      createShape in class Layout
    • 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(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: Layout
      Create an allocator for static property creation. Reserves all array extension slots.
      Specified by:
      createAllocator in class Layout
    • getStrategy

      public LayoutStrategy getStrategy()