Class ClassDefinitionNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.nodes.JavaScriptNode
com.oracle.truffle.js.nodes.function.NamedEvaluationTargetNode
com.oracle.truffle.js.nodes.function.ClassDefinitionNode
- All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode,com.oracle.truffle.api.nodes.NodeInterface,ResumableNode,ResumableNode.WithObjectState,FunctionNameHolder,Cloneable
public final class ClassDefinitionNode
extends NamedEvaluationTargetNode
implements FunctionNameHolder, ResumableNode.WithObjectState
ES6 14.5.14 Runtime Semantics: ClassDefinitionEvaluation.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.ChildrenNested classes/interfaces inherited from interface com.oracle.truffle.js.nodes.function.FunctionNameHolder
FunctionNameHolder.DelegateNested classes/interfaces inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
com.oracle.truffle.api.instrumentation.InstrumentableNode.WrapperNodeNested classes/interfaces inherited from interface com.oracle.truffle.js.nodes.control.ResumableNode
ResumableNode.WithIntState, ResumableNode.WithObjectState -
Field Summary
Fields inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
INTERMEDIATE_VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClassDefinitionNode(JSContext context, JSFunctionExpressionNode constructorFunctionNode, JavaScriptNode classHeritageNode, ObjectLiteralNode.ObjectLiteralMemberNode[] memberNodes, JSWriteFrameSlotNode writeClassBindingNode, JSWriteFrameSlotNode writeInternalConstructorBrand, JavaScriptNode[] classDecorators, DecoratorListEvaluationNode[] memberDecorators, com.oracle.truffle.api.strings.TruffleString className, int instanceElementsCount, int staticElementCount, boolean hasPrivateInstanceMethods, boolean hasInstanceFieldsOrAccessors, int blockScopeSlot) -
Method Summary
Modifier and TypeMethodDescriptionprotected JavaScriptNodecopyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) static ClassDefinitionNodecreate(JSContext context, JSFunctionExpressionNode constructorFunction, JavaScriptNode classHeritage, ObjectLiteralNode.ObjectLiteralMemberNode[] members, JSWriteFrameSlotNode writeClassBinding, JSWriteFrameSlotNode writeInternalConstructorBrand, com.oracle.truffle.api.strings.TruffleString className, JavaScriptNode[] classDecorators, DecoratorListEvaluationNode[] memberDecorators, int instanceFieldCount, int staticElementCount, boolean hasPrivateInstanceMethods, boolean hasInstanceFieldsOrAccessors, JSFrameSlot blockScopeSlot) execute(com.oracle.truffle.api.frame.VirtualFrame frame) Executes this node using the specified context and frame and returns the result value.executeWithName(com.oracle.truffle.api.frame.VirtualFrame frame, Object name) com.oracle.truffle.api.strings.TruffleStringcom.oracle.truffle.api.strings.TruffleStringbooleanisResultAlwaysOfType(Class<?> clazz) resume(com.oracle.truffle.api.frame.VirtualFrame frame, int stateSlot) voidsetFunctionName(com.oracle.truffle.api.strings.TruffleString name) Methods inherited from class com.oracle.truffle.js.nodes.function.NamedEvaluationTargetNode
createWrapperMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptNode
addCallTag, addExpressionTag, addRootBodyTag, addStatementTag, cloneUninitialized, cloneUninitialized, copy, executeBoolean, executeDouble, executeInt, executeVoid, expressionToString, findBlockScopeNode, getSourceSection, hasSourceSection, hasTag, isInstrumentable, onReplace, setSourceSection, setSourceSection, toString, transferSourceSection, transferSourceSectionAddExpressionTag, transferSourceSectionAndTagsMethods inherited from class com.oracle.truffle.js.nodes.JavaScriptBaseNode
getJSContext, getLanguage, getLanguageOptions, getRealm, hasOverloadedOperatorsMethods inherited from class com.oracle.truffle.api.nodes.Node
accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, replace, replace, reportPolymorphicSpecializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.oracle.truffle.js.nodes.function.FunctionNameHolder
isAnonymousMethods inherited from interface com.oracle.truffle.api.instrumentation.InstrumentableNode
findNearestNodeAt, findNearestNodeAt, getNodeObject, materializeInstrumentableNodesMethods inherited from interface com.oracle.truffle.js.nodes.control.ResumableNode
asResumableNode, resetStateMethods inherited from interface com.oracle.truffle.js.nodes.control.ResumableNode.WithObjectState
getState, getStateAndReset, getStateSlotKind, setState
-
Constructor Details
-
ClassDefinitionNode
protected ClassDefinitionNode(JSContext context, JSFunctionExpressionNode constructorFunctionNode, JavaScriptNode classHeritageNode, ObjectLiteralNode.ObjectLiteralMemberNode[] memberNodes, JSWriteFrameSlotNode writeClassBindingNode, JSWriteFrameSlotNode writeInternalConstructorBrand, JavaScriptNode[] classDecorators, DecoratorListEvaluationNode[] memberDecorators, com.oracle.truffle.api.strings.TruffleString className, int instanceElementsCount, int staticElementCount, boolean hasPrivateInstanceMethods, boolean hasInstanceFieldsOrAccessors, int blockScopeSlot)
-
-
Method Details
-
create
public static ClassDefinitionNode create(JSContext context, JSFunctionExpressionNode constructorFunction, JavaScriptNode classHeritage, ObjectLiteralNode.ObjectLiteralMemberNode[] members, JSWriteFrameSlotNode writeClassBinding, JSWriteFrameSlotNode writeInternalConstructorBrand, com.oracle.truffle.api.strings.TruffleString className, JavaScriptNode[] classDecorators, DecoratorListEvaluationNode[] memberDecorators, int instanceFieldCount, int staticElementCount, boolean hasPrivateInstanceMethods, boolean hasInstanceFieldsOrAccessors, JSFrameSlot blockScopeSlot) -
execute
Description copied from class:JavaScriptNodeExecutes this node using the specified context and frame and returns the result value.- Specified by:
executein classJavaScriptNode- Parameters:
frame- the frame of the currently executing guest language method- Returns:
- the value of the execution
-
resume
- Specified by:
resumein interfaceResumableNode
-
executeWithName
- Specified by:
executeWithNamein classNamedEvaluationTargetNode
-
isResultAlwaysOfType
- Overrides:
isResultAlwaysOfTypein classJavaScriptNode
-
getFunctionName
public com.oracle.truffle.api.strings.TruffleString getFunctionName()- Specified by:
getFunctionNamein interfaceFunctionNameHolder
-
getClassName
public com.oracle.truffle.api.strings.TruffleString getClassName() -
setFunctionName
public void setFunctionName(com.oracle.truffle.api.strings.TruffleString name) - Specified by:
setFunctionNamein interfaceFunctionNameHolder
-
getCreatePrototypeNode
-
copyUninitialized
protected JavaScriptNode copyUninitialized(Set<Class<? extends com.oracle.truffle.api.instrumentation.Tag>> materializedTags) - Overrides:
copyUninitializedin classJavaScriptNode
-