public abstract class PropertyCacheNode<T extends PropertyCacheNode.CacheNode<T>> extends JavaScriptBaseNode
PropertyGetNode,
PropertySetNode,
HasPropertyCacheNode| Type | Property and Description |
|---|---|
protected abstract boolean |
isOwn
Gets the value of the property ownProperty.
|
| Modifier and Type | Class and Description |
|---|---|
protected static class |
PropertyCacheNode.AbstractFinalPrototypeShapeCheckNode |
protected static class |
PropertyCacheNode.AbstractShapeCheckNode
Checks the
Shape of a JSDynamicObject. |
protected static class |
PropertyCacheNode.AbstractSingleRealmShapeCheckNode |
static class |
PropertyCacheNode.CacheNode<T extends PropertyCacheNode.CacheNode<T>> |
protected static class |
PropertyCacheNode.CombinedShapeCheckNode
Checks whether the receiver is compatible with one of the two shapes.
|
protected static class |
PropertyCacheNode.ConstantObjectAssumptionShapeCheckNode
Check that the given shape is valid and the property is unchanged using assumptions only.
|
protected static class |
PropertyCacheNode.ConstantObjectPrototypeChainShapeCheckNode
Checks that the given shape and all prototype shapes up to depth are valid, that the property
is unchanged in these shapes, and that all prototypes are stable, all using assumptions only.
|
protected static class |
PropertyCacheNode.ForeignLanguageCheckNode |
protected static class |
PropertyCacheNode.InstanceofCheckNode |
protected static class |
PropertyCacheNode.NullCheckNode |
protected static class |
PropertyCacheNode.PrototypeChainShapeCheckNode
Checks the top shape by identity and the shapes of the prototype chain up to the given depth
using assumptions only (valid and property unchanged).
|
protected static class |
PropertyCacheNode.PrototypeShapeCheckNode
Check the shape of the object by identity and the shape of its immediate prototype by
assumption (valid and unchanged).
|
protected static class |
PropertyCacheNode.ReceiverCheckNode
Checks whether the receiver can be handled by the corresponding specialization.
|
protected static class |
PropertyCacheNode.ShapeCheckNode
Check the object shape by identity comparison.
|
protected static class |
PropertyCacheNode.TraversePrototypeChainShapeCheckNode
Check the shapes of the prototype chain up to the given depth.
|
protected static class |
PropertyCacheNode.TraversePrototypeShapeCheckNode
Check the shapes of the object and its immediate prototype.
|
protected static class |
PropertyCacheNode.TraverseValuePrototypeChainCheckNode
Check the shapes of the prototype chain up to the given depth.
|
protected static class |
PropertyCacheNode.ValuePrototypeChainCheckNode
Checks the shapes of the prototype chain up to the given depth using assumptions only (valid
and property unchanged).
|
| Modifier and Type | Field and Description |
|---|---|
protected JSContext |
context |
protected Object |
key |
| Constructor and Description |
|---|
PropertyCacheNode(Object key,
JSContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
alwaysUseStore(JSDynamicObject store,
Object key) |
protected abstract boolean |
canCombineShapeCheck(com.oracle.truffle.api.object.Shape parentShape,
com.oracle.truffle.api.object.Shape cacheShape,
Object thisObj,
int depth,
Object value,
com.oracle.truffle.api.object.Property property) |
protected static JSDynamicObject |
castDynamicObject(Object obj,
com.oracle.truffle.api.object.Shape shape)
Casts the obj to the shape's layout class in compiled code and to
JSDynamicObject in
the interpreter. |
protected void |
checkForUnstableAssumption(T head,
Object thisObj) |
protected abstract T |
createCachedPropertyNode(com.oracle.truffle.api.object.Property entry,
Object thisObj,
JSDynamicObject proto,
int depth,
Object value,
T currentHead) |
protected abstract T |
createCombinedIcPropertyNode(com.oracle.truffle.api.object.Shape parentShape,
com.oracle.truffle.api.object.Shape cacheShape,
Object thisObj,
int depth,
Object value,
com.oracle.truffle.api.object.Property property) |
protected abstract T |
createGenericPropertyNode() |
protected abstract T |
createJavaPropertyNodeMaybe(Object thisObj,
JSDynamicObject proto,
int depth) |
protected PropertyCacheNode.ReceiverCheckNode |
createJSClassCheck(Object thisObj,
JSDynamicObject proto,
int depth) |
protected PropertyCacheNode.ReceiverCheckNode |
createPrimitiveReceiverCheck(Object thisObj,
JSDynamicObject protoAtDepth,
int depth) |
protected PropertyCacheNode.AbstractShapeCheckNode |
createShapeCheckNode(com.oracle.truffle.api.object.Shape shape,
JSDynamicObject thisObj,
JSDynamicObject proto,
int depth,
boolean isConstantObjectFinal,
boolean isDefine) |
protected T |
createSpecialization(Object thisObj,
T currentHead,
int cachedCount,
Object value) |
protected abstract T |
createTruffleObjectPropertyNode() |
protected abstract T |
createUndefinedPropertyNode(Object thisObj,
Object store,
JSDynamicObject proto,
int depth,
Object value) |
protected void |
deoptimize(PropertyCacheNode.CacheNode<?> stop) |
protected T |
filterValid(T cache) |
protected com.oracle.truffle.api.strings.TruffleString |
getAccessorKey(com.oracle.truffle.api.strings.TruffleString getset) |
protected static com.oracle.truffle.api.strings.TruffleString |
getAccessorKey(com.oracle.truffle.api.strings.TruffleString getset,
com.oracle.truffle.api.strings.TruffleString key) |
protected abstract T |
getCacheNode() |
JSContext |
getContext() |
com.oracle.truffle.api.nodes.NodeCost |
getCost() |
Object |
getKey() |
protected static JSDynamicObject |
getPrototypeAtDepth(JSDynamicObject thisObj,
int depth) |
protected T |
insertCached(T specialized,
T currentHead,
int cachedCount) |
protected void |
invalidateCache() |
protected static boolean |
isArrayLengthProperty(com.oracle.truffle.api.object.Property property) |
protected static boolean |
isClassPrototypeProperty(com.oracle.truffle.api.object.Property property) |
protected static boolean |
isDynamicObject(Object obj,
com.oracle.truffle.api.object.Shape shape)
Checks if the obj is an instance of the shape's layout class in compiled code and
obj instanceof in the interpreter. |
protected static boolean |
isFunctionLengthProperty(com.oracle.truffle.api.object.Property property) |
protected static boolean |
isFunctionNameProperty(com.oracle.truffle.api.object.Property property) |
protected abstract boolean |
isGlobal() |
protected static boolean |
isLazyNamedCaptureGroupProperty(com.oracle.truffle.api.object.Property property) |
protected static boolean |
isLazyRegexResultIndexProperty(com.oracle.truffle.api.object.Property property) |
protected abstract boolean |
isOwnProperty()
Gets the value of the property ownProperty.
|
protected abstract boolean |
isPropertyAssumptionCheckEnabled() |
protected static boolean |
isStringLengthProperty(com.oracle.truffle.api.object.Property property) |
protected boolean |
propertyAssumptionsValid(JSDynamicObject thisObj,
int depth,
boolean checkDepth0) |
protected static boolean |
prototypesInShape(JSDynamicObject thisObj,
int start,
int end) |
protected T |
retryCache() |
protected T |
rewriteCached(T currentHead,
T newHead) |
protected T |
rewriteToGeneric(T currentHead,
int cachedCount,
String reason) |
protected abstract void |
setCacheNode(T cache) |
protected abstract void |
setPropertyAssumptionCheckEnabled(boolean value) |
protected boolean |
shapesHaveCommonLayoutForKey(com.oracle.truffle.api.object.Shape shape1,
com.oracle.truffle.api.object.Shape shape2) |
protected T |
specialize(Object thisObj) |
protected T |
specialize(Object thisObj,
Object value) |
protected void |
traceRewriteEvictFinal(com.oracle.truffle.api.nodes.Node evicted) |
protected static <T extends PropertyCacheNode.CacheNode<T>> |
tryMergeShapes(com.oracle.truffle.api.object.Shape cacheShape,
T head)
Does the given map relate to any of the cached maps by upcasting? If so, obsolete the
downcast map.
|
protected static JSDynamicObject |
wrapPrimitive(Object thisObject) |
copy, getLanguage, getRealm, hasOverloadedOperators, onReplaceaccept, adoptChildren, atomic, atomic, deepCopy, getChildren, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecialize, toStringprotected static boolean isDynamicObject(Object obj, com.oracle.truffle.api.object.Shape shape)
obj instanceof JSDynamicObject in the interpreter.protected static JSDynamicObject castDynamicObject(Object obj, com.oracle.truffle.api.object.Shape shape)
JSDynamicObject in
the interpreter.public final Object getKey()
protected abstract T getCacheNode()
protected abstract void setCacheNode(T cache)
protected abstract T createGenericPropertyNode()
protected abstract T createCachedPropertyNode(com.oracle.truffle.api.object.Property entry, Object thisObj, JSDynamicObject proto, int depth, Object value, T currentHead)
protected abstract T createUndefinedPropertyNode(Object thisObj, Object store, JSDynamicObject proto, int depth, Object value)
protected abstract T createJavaPropertyNodeMaybe(Object thisObj, JSDynamicObject proto, int depth)
protected abstract T createTruffleObjectPropertyNode()
protected abstract boolean canCombineShapeCheck(com.oracle.truffle.api.object.Shape parentShape,
com.oracle.truffle.api.object.Shape cacheShape,
Object thisObj,
int depth,
Object value,
com.oracle.truffle.api.object.Property property)
protected abstract T createCombinedIcPropertyNode(com.oracle.truffle.api.object.Shape parentShape, com.oracle.truffle.api.object.Shape cacheShape, Object thisObj, int depth, Object value, com.oracle.truffle.api.object.Property property)
protected T createSpecialization(Object thisObj, T currentHead, int cachedCount, Object value)
protected final boolean shapesHaveCommonLayoutForKey(com.oracle.truffle.api.object.Shape shape1,
com.oracle.truffle.api.object.Shape shape2)
protected static boolean alwaysUseStore(JSDynamicObject store, Object key)
protected final void deoptimize(PropertyCacheNode.CacheNode<?> stop)
protected T retryCache()
protected void invalidateCache()
protected static <T extends PropertyCacheNode.CacheNode<T>> boolean tryMergeShapes(com.oracle.truffle.api.object.Shape cacheShape, T head)
cacheShape - The new map to check againstprotected static final JSDynamicObject wrapPrimitive(Object thisObject)
protected final PropertyCacheNode.AbstractShapeCheckNode createShapeCheckNode(com.oracle.truffle.api.object.Shape shape, JSDynamicObject thisObj, JSDynamicObject proto, int depth, boolean isConstantObjectFinal, boolean isDefine)
protected static boolean prototypesInShape(JSDynamicObject thisObj, int start, int end)
protected static JSDynamicObject getPrototypeAtDepth(JSDynamicObject thisObj, int depth)
protected final boolean propertyAssumptionsValid(JSDynamicObject thisObj, int depth, boolean checkDepth0)
protected final PropertyCacheNode.ReceiverCheckNode createPrimitiveReceiverCheck(Object thisObj, JSDynamicObject protoAtDepth, int depth)
protected final PropertyCacheNode.ReceiverCheckNode createJSClassCheck(Object thisObj, JSDynamicObject proto, int depth)
protected abstract boolean isGlobal()
protected abstract boolean isOwnProperty()
public final JSContext getContext()
protected abstract boolean isPropertyAssumptionCheckEnabled()
protected abstract void setPropertyAssumptionCheckEnabled(boolean value)
public com.oracle.truffle.api.nodes.NodeCost getCost()
getCost in class com.oracle.truffle.api.nodes.Nodeprotected static boolean isArrayLengthProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isFunctionLengthProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isFunctionNameProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isClassPrototypeProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isStringLengthProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isLazyRegexResultIndexProperty(com.oracle.truffle.api.object.Property property)
protected static boolean isLazyNamedCaptureGroupProperty(com.oracle.truffle.api.object.Property property)
protected void traceRewriteEvictFinal(com.oracle.truffle.api.nodes.Node evicted)
protected com.oracle.truffle.api.strings.TruffleString getAccessorKey(com.oracle.truffle.api.strings.TruffleString getset)
protected static com.oracle.truffle.api.strings.TruffleString getAccessorKey(com.oracle.truffle.api.strings.TruffleString getset,
com.oracle.truffle.api.strings.TruffleString key)