public final class JSShape extends Object
JSShapeData| Modifier and Type | Field and Description |
|---|---|
static int |
ARRAY_PROTOTYPE_FLAG
Marks %Array.prototype% and prototype objects that have (or had) %Array.prototype% on their
prototype chain.
|
static int |
EXTERNAL_PROPERTIES_FLAG
If this flag is set, the object has extra properties that are not included in the
DynamicObject's shape.
|
static int |
FROZEN_FLAG |
static int |
FROZEN_FLAGS |
static int |
NO_ELEMENTS_ASSUMPTION_FLAGS
Marks objects, setting an element on which invalidates the no-elements assumption.
|
static int |
NOT_EXTENSIBLE_FLAG |
static int |
OBJECT_PROTOTYPE_FLAG
Marks %Object.prototype%.
|
static int |
SEALED_FLAG |
static int |
SEALED_FLAGS |
| Modifier and Type | Method and Description |
|---|---|
static com.oracle.truffle.api.object.Shape |
createPrototypeShape(JSContext context,
JSClass jsclass,
JSDynamicObject prototype) |
static com.oracle.truffle.api.object.Shape |
createRootWithNullProto(JSContext context,
JSClass jsclass) |
static com.oracle.truffle.api.object.Shape |
createRootWithProto(JSContext context,
JSClass jsclass,
JSDynamicObject prototype) |
static int |
getDefaultShapeFlags(JSClass jsclass) |
static UnmodifiableArrayList<com.oracle.truffle.api.strings.TruffleString> |
getEnumerablePropertyNames(com.oracle.truffle.api.object.Shape shape) |
static JSClass |
getJSClass(com.oracle.truffle.api.object.Shape shape) |
static Object |
getJSClassNoCast(com.oracle.truffle.api.object.Shape shape) |
static JSContext |
getJSContext(com.oracle.truffle.api.object.Shape shape) |
static Class<? extends JSDynamicObject> |
getLayout(JSClass jsclass) |
static UnmodifiableArrayList<com.oracle.truffle.api.object.Property> |
getProperties(com.oracle.truffle.api.object.Shape shape) |
static UnmodifiableArrayList<com.oracle.truffle.api.object.Property> |
getPropertiesIfHasEnumerablePropertyNames(com.oracle.truffle.api.object.Shape shape) |
static com.oracle.truffle.api.Assumption |
getPropertyAssumption(com.oracle.truffle.api.object.Shape shape,
Object key) |
static com.oracle.truffle.api.Assumption |
getPropertyAssumption(com.oracle.truffle.api.object.Shape shape,
Object key,
boolean prototype) |
static <T> UnmodifiablePropertyKeyList<T> |
getPropertyKeyList(com.oracle.truffle.api.object.Shape shape,
boolean strings,
boolean symbols) |
static com.oracle.truffle.api.object.Shape |
getProtoChildTree(JSDynamicObject prototype,
JSClass jsclass)
Get empty shape for all objects inheriting from the prototype this shape is describing.
|
static com.oracle.truffle.api.Assumption |
getPrototypeAssumption(com.oracle.truffle.api.object.Shape shape) |
static com.oracle.truffle.api.object.Property |
getPrototypeProperty(com.oracle.truffle.api.object.Shape shape) |
static JSSharedData |
getSharedData(com.oracle.truffle.api.object.Shape shape) |
static boolean |
hasExternalProperties(int shapeFlags)
If this flag is set, the object has extra properties that are not included in the
DynamicObject's shape.
|
static boolean |
hasNoElementsAssumption(JSDynamicObject obj) |
static boolean |
hasNoElementsAssumption(com.oracle.truffle.api.object.Shape shape)
Returns true if this object is not supposed to have elements and adding an element to it
should invalidate the no-array-prototype-elements assumption, including Object.prototype,
Array.prototype, and prototypes of Array subclasses, i.e.
|
static void |
invalidatePrototypeAssumption(com.oracle.truffle.api.object.Shape shape) |
static boolean |
isArrayPrototypeOrDerivative(JSDynamicObject obj) |
static boolean |
isArrayPrototypeOrDerivative(com.oracle.truffle.api.object.Shape shape)
Returns true if this object is the Array.prototype or the prototype of an Array subclass.
|
static boolean |
isExtensible(com.oracle.truffle.api.object.Shape shape) |
static boolean |
isObjectPrototype(com.oracle.truffle.api.object.Shape shape) |
static boolean |
isPrototypeInShape(com.oracle.truffle.api.object.Shape shape) |
static com.oracle.truffle.api.object.Shape |
makeEmptyRoot(JSClass jsclass,
JSContext context) |
static com.oracle.truffle.api.object.Shape |
makeEmptyRootWithInstanceProto(JSContext context,
JSClass jsclass)
Empty shape constructor with prototype in field.
|
static JSSharedData |
makeJSSharedData(JSContext context,
JSDynamicObject proto) |
static com.oracle.truffle.api.object.Shape |
makeStaticRoot(JSClass jsclass)
Internal constructor for null and undefined shapes.
|
static com.oracle.truffle.api.object.Shape.Builder |
newBuilder(JSContext context,
JSClass jsclass,
JSDynamicObject proto) |
public static final int NOT_EXTENSIBLE_FLAG
public static final int SEALED_FLAG
public static final int FROZEN_FLAG
public static final int SEALED_FLAGS
public static final int FROZEN_FLAGS
public static final int EXTERNAL_PROPERTIES_FLAG
public static final int ARRAY_PROTOTYPE_FLAG
public static final int OBJECT_PROTOTYPE_FLAG
public static final int NO_ELEMENTS_ASSUMPTION_FLAGS
public static com.oracle.truffle.api.object.Shape createPrototypeShape(JSContext context, JSClass jsclass, JSDynamicObject prototype)
public static JSClass getJSClass(com.oracle.truffle.api.object.Shape shape)
public static Object getJSClassNoCast(com.oracle.truffle.api.object.Shape shape)
public static JSSharedData getSharedData(com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.object.Shape getProtoChildTree(JSDynamicObject prototype, JSClass jsclass)
public static boolean isExtensible(com.oracle.truffle.api.object.Shape shape)
public static boolean isArrayPrototypeOrDerivative(com.oracle.truffle.api.object.Shape shape)
public static boolean isArrayPrototypeOrDerivative(JSDynamicObject obj)
public static boolean hasNoElementsAssumption(com.oracle.truffle.api.object.Shape shape)
public static boolean hasNoElementsAssumption(JSDynamicObject obj)
public static boolean isPrototypeInShape(com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.object.Property getPrototypeProperty(com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.Assumption getPropertyAssumption(com.oracle.truffle.api.object.Shape shape,
Object key)
public static com.oracle.truffle.api.Assumption getPropertyAssumption(com.oracle.truffle.api.object.Shape shape,
Object key,
boolean prototype)
public static JSContext getJSContext(com.oracle.truffle.api.object.Shape shape)
public static boolean isObjectPrototype(com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.Assumption getPrototypeAssumption(com.oracle.truffle.api.object.Shape shape)
public static void invalidatePrototypeAssumption(com.oracle.truffle.api.object.Shape shape)
public static UnmodifiableArrayList<com.oracle.truffle.api.object.Property> getProperties(com.oracle.truffle.api.object.Shape shape)
public static <T> UnmodifiablePropertyKeyList<T> getPropertyKeyList(com.oracle.truffle.api.object.Shape shape, boolean strings, boolean symbols)
public static UnmodifiableArrayList<com.oracle.truffle.api.strings.TruffleString> getEnumerablePropertyNames(com.oracle.truffle.api.object.Shape shape)
public static UnmodifiableArrayList<com.oracle.truffle.api.object.Property> getPropertiesIfHasEnumerablePropertyNames(com.oracle.truffle.api.object.Shape shape)
public static com.oracle.truffle.api.object.Shape makeStaticRoot(JSClass jsclass)
public static com.oracle.truffle.api.object.Shape makeEmptyRoot(JSClass jsclass, JSContext context)
public static com.oracle.truffle.api.object.Shape createRootWithNullProto(JSContext context, JSClass jsclass)
public static com.oracle.truffle.api.object.Shape createRootWithProto(JSContext context, JSClass jsclass, JSDynamicObject prototype)
public static com.oracle.truffle.api.object.Shape makeEmptyRootWithInstanceProto(JSContext context, JSClass jsclass)
public static JSSharedData makeJSSharedData(JSContext context, JSDynamicObject proto)
public static Class<? extends JSDynamicObject> getLayout(JSClass jsclass)
public static com.oracle.truffle.api.object.Shape.Builder newBuilder(JSContext context, JSClass jsclass, JSDynamicObject proto)
public static int getDefaultShapeFlags(JSClass jsclass)
public static boolean hasExternalProperties(int shapeFlags)