Search in sources :

Example 1 with ObjectTypeTransition

use of com.oracle.truffle.object.Transition.ObjectTypeTransition in project graal by oracle.

the class ShapeImpl method changeType.

/**
 * @since 0.17 or earlier
 */
@Override
@TruffleBoundary
public final ShapeImpl changeType(ObjectType newOps) {
    ObjectTypeTransition transition = new ObjectTypeTransition(newOps);
    ShapeImpl cachedShape = queryTransition(transition);
    if (cachedShape != null) {
        return layout.getStrategy().ensureValid(cachedShape);
    }
    ShapeImpl newShape = createShape(layout, sharedData, this, newOps, propertyMap, transition, allocator(), id);
    addDirectTransition(transition, newShape);
    return newShape;
}
Also used : ObjectTypeTransition(com.oracle.truffle.object.Transition.ObjectTypeTransition) TruffleBoundary(com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)

Aggregations

TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)1 ObjectTypeTransition (com.oracle.truffle.object.Transition.ObjectTypeTransition)1