Class TypeNode.ConstrainedTypeNode

  • All Implemented Interfaces:
    com.oracle.truffle.api.nodes.NodeInterface, java.lang.Cloneable
    Enclosing class:
    TypeNode

    public static final class TypeNode.ConstrainedTypeNode
    extends TypeNode
    • Constructor Detail

      • ConstrainedTypeNode

        public ConstrainedTypeNode​(com.oracle.truffle.api.source.SourceSection sourceSection,
                                   TypeNode childNode,
                                   TypeConstraintNode[] constraintNodes)
    • Method Detail

      • getFrameSlotKind

        public com.oracle.truffle.api.frame.FrameSlotKind getFrameSlotKind()
        Specified by:
        getFrameSlotKind in class TypeNode
      • initWriteSlotNode

        public TypeNode initWriteSlotNode​(int slot)
        Description copied from class: TypeNode
        Initializes this node's frame slot. Called if this node is a function/method parameter type. Kept separate from constructor so that TypeNode.TypeAliasTypeNode can initialize frame slot of its cloned child node.
        Specified by:
        initWriteSlotNode in class TypeNode
      • execute

        public void execute​(com.oracle.truffle.api.frame.VirtualFrame frame,
                            java.lang.Object value)
        Description copied from class: TypeNode
        Checks if `value` conforms to this type. If so, returns normally. Otherwise, throws a `VmTypeMismatchException`.
        Specified by:
        execute in class TypeNode
      • executeAndSet

        public void executeAndSet​(com.oracle.truffle.api.frame.VirtualFrame frame,
                                  java.lang.Object value)
        Description copied from class: TypeNode
        Checks if `value` conforms to this type. If so, sets `slot` to `value`. Otherwise, throws a `VmTypeMismatchException`.
        Specified by:
        executeAndSet in class TypeNode
      • createDefaultValue

        public @Nullable java.lang.Object createDefaultValue​(VmLanguage language,
                                                             com.oracle.truffle.api.source.SourceSection headerSection,
                                                             java.lang.String qualifiedName)
        Overrides:
        createDefaultValue in class TypeNode
      • getBaseTypeSection

        public com.oracle.truffle.api.source.SourceSection getBaseTypeSection()
      • getFirstConstraintSection

        public com.oracle.truffle.api.source.SourceSection getFirstConstraintSection()