@Override public final ShapeImpl reservePrimitiveExtensionArray() { if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) { return addPrimitiveExtensionArray(); } return this; }
/** @since 0.17 or earlier */ @Override public final ShapeImpl reservePrimitiveExtensionArray() { if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) { return layout.getStrategy().addPrimitiveExtensionArray(this); } return this; }
/** @since 0.17 or earlier */ @Override public final ShapeImpl reservePrimitiveExtensionArray() { if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) { return layout.getStrategy().addPrimitiveExtensionArray(this); } return this; }
/** @since 0.17 or earlier */ protected <T extends Location> T advance(T location0) { if (location0 instanceof LocationImpl) { LocationImpl location = (LocationImpl) location0; if (location != layout.getPrimitiveArrayLocation()) { location.accept(this); } if (layout.hasPrimitiveExtensionArray()) { hasPrimitiveArray |= location == layout.getPrimitiveArrayLocation() || primitiveArraySize > 0; } else { assert !hasPrimitiveArray && primitiveArraySize == 0; } } depth++; return location0; }
protected <T extends Location> T advance(T location0) { if (location0 instanceof LocationImpl) { LocationImpl location = (LocationImpl) location0; if (location != layout.getPrimitiveArrayLocation()) { location.accept(this); } if (layout.hasPrimitiveExtensionArray()) { hasPrimitiveArray |= location == layout.getPrimitiveArrayLocation() || primitiveArraySize > 0; } else { assert !hasPrimitiveArray && primitiveArraySize == 0; } } depth++; return location0; }
/** @since 0.17 or earlier */ protected <T extends Location> T advance(T location0) { if (location0 instanceof LocationImpl) { LocationImpl location = (LocationImpl) location0; if (location != layout.getPrimitiveArrayLocation()) { location.accept(this); } if (layout.hasPrimitiveExtensionArray()) { hasPrimitiveArray |= location == layout.getPrimitiveArrayLocation() || primitiveArraySize > 0; } else { assert !hasPrimitiveArray && primitiveArraySize == 0; } } depth++; return location0; }
/** * Create a new shape that reserves the primitive extension array field. */ private static ShapeImpl makeShapeWithPrimitiveExtensionArray(ShapeImpl parent, Transition transition) { assert parent.getLayout().hasPrimitiveExtensionArray(); assert !parent.hasPrimitiveArray(); BaseAllocator allocator = parent.allocator().addLocation(parent.getLayout().getPrimitiveArrayLocation()); ShapeImpl newShape = parent.createShape(parent.layout, parent.sharedData, parent, parent.objectType, parent.propertyMap, transition, allocator, parent.id); assert newShape.hasPrimitiveArray(); assert newShape.depth == allocator.depth; return newShape; }
private ShapeImpl addPrimitiveExtensionArray() { assert layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray(); Transition transition = new ReservePrimitiveArrayTransition(); ShapeImpl cachedShape = queryTransition(transition); if (cachedShape != null) { return cachedShape; } ShapeImpl oldShape = (ShapeImpl) layout.getStrategy().ensureSpace(this, layout.getPrimitiveArrayLocation()); ShapeImpl newShape = makeShapeWithPrimitiveExtensionArray(oldShape, transition); oldShape.addDirectTransition(transition, newShape); return newShape; }
/** * Create a new shape that reserves the primitive extension array field. * * @since 0.17 or earlier */ protected static ShapeImpl makeShapeWithPrimitiveExtensionArray(ShapeImpl parent, Transition transition) { assert parent.getLayout().hasPrimitiveExtensionArray(); assert !parent.hasPrimitiveArray(); BaseAllocator allocator = parent.allocator().addLocation(parent.getLayout().getPrimitiveArrayLocation()); ShapeImpl newShape = parent.createShape(parent.layout, parent.sharedData, parent, parent.objectType, parent.propertyMap, transition, allocator, parent.id); assert newShape.hasPrimitiveArray(); assert newShape.depth == allocator.depth; return newShape; }
/** * Create a new shape that reserves the primitive extension array field. * * @since 0.17 or earlier */ protected static ShapeImpl makeShapeWithPrimitiveExtensionArray(ShapeImpl parent, Transition transition) { assert parent.getLayout().hasPrimitiveExtensionArray(); assert !parent.hasPrimitiveArray(); BaseAllocator allocator = parent.allocator().addLocation(parent.getLayout().getPrimitiveArrayLocation()); ShapeImpl newShape = parent.createShape(parent.layout, parent.sharedData, parent, parent.objectType, parent.propertyMap, transition, allocator, parent.id); assert newShape.hasPrimitiveArray(); assert newShape.depth == allocator.depth; return newShape; }
/** @since 0.17 or earlier */ protected ShapeImpl addPrimitiveExtensionArray(ShapeImpl shape) { LayoutImpl layout = shape.getLayout(); assert layout.hasPrimitiveExtensionArray() && !shape.hasPrimitiveArray(); Transition transition = new ReservePrimitiveArrayTransition(); ShapeImpl cachedShape = shape.queryTransition(transition); if (cachedShape != null) { return layout.getStrategy().ensureValid(cachedShape); } ShapeImpl oldShape = ensureSpace(shape, layout.getPrimitiveArrayLocation()); ShapeImpl newShape = ShapeImpl.makeShapeWithPrimitiveExtensionArray(oldShape, transition); oldShape.addDirectTransition(transition, newShape); return newShape; }
/** @since 0.17 or earlier */ protected ShapeImpl addPrimitiveExtensionArray(ShapeImpl shape) { LayoutImpl layout = shape.getLayout(); assert layout.hasPrimitiveExtensionArray() && !shape.hasPrimitiveArray(); Transition transition = new ReservePrimitiveArrayTransition(); ShapeImpl cachedShape = shape.queryTransition(transition); if (cachedShape != null) { return layout.getStrategy().ensureValid(cachedShape); } ShapeImpl oldShape = ensureSpace(shape, layout.getPrimitiveArrayLocation()); ShapeImpl newShape = ShapeImpl.makeShapeWithPrimitiveExtensionArray(oldShape, transition); oldShape.addDirectTransition(transition, newShape); return newShape; }