Tabnine Logo
com.oracle.truffle.object
Code IndexAdd Tabnine to your IDE (free)

How to use com.oracle.truffle.object

Best Java code snippets using com.oracle.truffle.object (Showing top 20 results out of 315)

origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final boolean updateShape() {
  return getShapeImpl().getLayout().getStrategy().updateShape(this);
}
origin: com.oracle/truffle

/**
 * 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;
}
origin: com.oracle.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final boolean updateShape() {
  return getShape().getLayout().getStrategy().updateShape(this);
}
origin: com.oracle/truffle

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;
}
origin: com.oracle/truffle

/**
 * Create a new shape that adds a property to the parent shape.
 */
private static ShapeImpl makeShapeWithAddedProperty(ShapeImpl parent, AddPropertyTransition addTransition) {
  Property addend = addTransition.getProperty();
  BaseAllocator allocator = parent.allocator().addLocation(addend.getLocation());
  PropertyMap newPropertyMap = parent.propertyMap.putCopy(addend);
  ShapeImpl newShape = parent.createShape(parent.layout, parent.sharedData, parent, parent.objectType, newPropertyMap, addTransition, allocator, parent.id);
  assert ((LocationImpl) addend.getLocation()).primitiveArrayCount() == 0 || newShape.hasPrimitiveArray;
  assert newShape.depth == allocator.depth;
  return newShape;
}
origin: com.oracle.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final ShapeImpl reservePrimitiveExtensionArray() {
  if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) {
    return layout.getStrategy().addPrimitiveExtensionArray(this);
  }
  return this;
}
origin: com.oracle.truffle/truffle-api

/** @since 0.17 or earlier */
public final void addIndirectTransition(Transition transition, ShapeImpl next) {
  assert !isShared();
  assert next.getParent() != this && !transition.isDirect();
  addTransitionInternal(transition, next);
}
origin: com.oracle.truffle/truffle-api

private void setWithShapeSlowCase(DynamicObject store, Object value, Shape currentShape, Shape nextShape) {
  ShapeImpl oldShape = (ShapeImpl) currentShape;
  oldShape.getLayout().getStrategy().propertySetWithShapeFallback(this, store, value, oldShape, (ShapeImpl) nextShape);
}
origin: com.oracle/truffle

@Override
public final ShapeImpl reservePrimitiveExtensionArray() {
  if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) {
    return addPrimitiveExtensionArray();
  }
  return this;
}
origin: com.oracle/truffle

protected DualLocation newDualLocationForValue(Object value) {
  Class<?> initialType = null;
  if (value instanceof Integer) {
    initialType = int.class;
  } else if (value instanceof Double) {
    initialType = double.class;
  } else if (value instanceof Boolean) {
    initialType = boolean.class;
  } else {
    initialType = Object.class;
  }
  return new DualLocation((InternalLongLocation) newLongLocation(false), (ObjectLocation) newObjectLocation(false, false), layout, initialType);
}
origin: com.oracle.truffle/truffle-api

/** @since 0.17 or earlier */
@TruffleBoundary
@Override
public ShapeImpl defineProperty(Object key, Object value, int flags) {
  return defineProperty(key, value, flags, layout.getStrategy().getDefaultLocationFactory());
}
origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final BaseAllocator allocator() {
  return layout.getStrategy().createAllocator(this);
}
origin: com.oracle.truffle/truffle-api

  public Location createLocation(Shape shape, Object value) {
    return ((ShapeImpl) shape).allocator().locationForValue(value, true, value != null);
  }
};
origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
public static PropertyMap empty() {
  if (ObjectStorageOptions.TriePropertyMap) {
    return TriePropertyMap.empty();
  } else {
    return ConsListPropertyMap.empty();
  }
}
origin: com.oracle.truffle/truffle-api

@Override
public Property get(Object key) {
  LinkedPropertyEntry entry = getEntry(key);
  return entry == null ? null : entry.getValue();
}
origin: org.graalvm.truffle/truffle-api

  @Override
  public K next() {
    return nextEntry().getKey();
  }
}
origin: com.oracle.truffle/truffle-api

/** @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;
}
origin: com.oracle/truffle

@Override
public final boolean updateShape() {
  return getShape().getLayout().getStrategy().updateShape(this);
}
origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
@Override
public final ShapeImpl reservePrimitiveExtensionArray() {
  if (layout.hasPrimitiveExtensionArray() && !hasPrimitiveArray()) {
    return layout.getStrategy().addPrimitiveExtensionArray(this);
  }
  return this;
}
origin: org.graalvm.truffle/truffle-api

/** @since 0.17 or earlier */
public final void addIndirectTransition(Transition transition, ShapeImpl next) {
  assert !isShared();
  assert next.getParent() != this && !transition.isDirect();
  addTransitionInternal(transition, next);
}
com.oracle.truffle.object

Most used classes

  • Debug
  • DynamicObjectImpl
  • LayoutImpl
  • LayoutStrategy
  • LocationImpl$InternalLongLocation
  • LocationImpl,
  • Locations$ConstantLocation,
  • Locations$ValueLocation,
  • PropertyImpl,
  • PropertyMap,
  • ShapeImpl$BaseAllocator,
  • ShapeImpl,
  • Transition$AddPropertyTransition,
  • Transition$ObjectTypeTransition,
  • Transition$PropertyTransition,
  • Transition$RemovePropertyTransition,
  • Transition$ReservePrimitiveArrayTransition,
  • Transition,
  • BasicAllocator
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now