Class DynamicObject.SetDynamicTypeNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.object.DynamicObject.SetDynamicTypeNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
DynamicObject
Sets the language-specific dynamic type identifier.
- Since:
- 25.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()abstract booleanexecute(DynamicObject receiver, Object type) Sets the object's dynamic type identifier.Methods inherited from class Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Method Details
-
execute
Sets the object's dynamic type identifier. What this type represents is completely up to the language. For example, it could be a guest-language class. The type object is strongly referenced from the shape. It should ideally be a singleton or light-weight object without any references to guest language objects in order to keep the memory footprint low and prevent potential memory leaks from holding onto the Shape in inline caches. The Shape transition itself is weak, so the previous shapes will not hold strongly on the type object. Type objects are always compared by object identity, neverequals.- Parameters:
type- a non-null type identifier defined by the guest language.- Returns:
trueif the type (and the object's shape) changed- See Also:
-
create
- Since:
- 25.1
-
getUncached
- Since:
- 25.1
-