Package com.oracle.truffle.object.basic
Class BasicLayout
- java.lang.Object
-
- com.oracle.truffle.api.object.Layout
-
- com.oracle.truffle.object.LayoutImpl
-
- com.oracle.truffle.object.basic.BasicLayout
-
public class BasicLayout extends LayoutImpl
-
-
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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape.Allocator
createAllocator()
Create an allocator for static property creation.Shape
createShape(ObjectType operations, java.lang.Object sharedData, int id)
protected Location
getObjectArrayLocation()
protected int
getObjectFieldCount()
protected ObjectLocation
getObjectFieldLocation(int index)
protected Location
getPrimitiveArrayLocation()
protected int
getPrimitiveFieldCount()
protected LocationImpl.InternalLongLocation
getPrimitiveFieldLocation(int index)
protected boolean
hasObjectExtensionArray()
protected boolean
hasPrimitiveExtensionArray()
DynamicObject
newInstance(Shape shape)
protected int
objectFieldIndex(Location location)
-
Methods inherited from class com.oracle.truffle.object.LayoutImpl
createShape, createShape, existingLocationForValue, getStrategy, getType, isAllowedIntToDouble, isAllowedIntToLong, isLocationAssignableFrom, isPropertyUpcastOf
-
Methods inherited from class com.oracle.truffle.api.object.Layout
createLayout, createLayout, createLayout, getFactory
-
-
-
-
Method Detail
-
newInstance
public DynamicObject newInstance(Shape shape)
- Specified by:
newInstance
in classLayoutImpl
-
createShape
public Shape createShape(ObjectType operations, java.lang.Object sharedData, int id)
- Specified by:
createShape
in classLayout
-
hasObjectExtensionArray
protected boolean hasObjectExtensionArray()
- Specified by:
hasObjectExtensionArray
in classLayoutImpl
-
hasPrimitiveExtensionArray
protected boolean hasPrimitiveExtensionArray()
- Specified by:
hasPrimitiveExtensionArray
in classLayoutImpl
-
getObjectFieldCount
protected int getObjectFieldCount()
- Specified by:
getObjectFieldCount
in classLayoutImpl
-
getPrimitiveFieldCount
protected int getPrimitiveFieldCount()
- Specified by:
getPrimitiveFieldCount
in classLayoutImpl
-
getObjectArrayLocation
protected Location getObjectArrayLocation()
- Specified by:
getObjectArrayLocation
in classLayoutImpl
-
getPrimitiveArrayLocation
protected Location getPrimitiveArrayLocation()
- Specified by:
getPrimitiveArrayLocation
in classLayoutImpl
-
getObjectFieldLocation
protected ObjectLocation getObjectFieldLocation(int index)
-
getPrimitiveFieldLocation
protected LocationImpl.InternalLongLocation getPrimitiveFieldLocation(int index)
-
createAllocator
public Shape.Allocator createAllocator()
Description copied from class:Layout
Create an allocator for static property creation. Reserves all array extension slots.- Specified by:
createAllocator
in classLayoutImpl
-
objectFieldIndex
protected int objectFieldIndex(Location location)
- Specified by:
objectFieldIndex
in classLayoutImpl
-
-