Class TypeNode.NothingTypeNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
org.pkl.core.ast.PklNode
org.pkl.core.ast.type.TypeNode
org.pkl.core.ast.type.TypeNode.NothingTypeNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Enclosing class:
TypeNode

public static final class TypeNode.NothingTypeNode extends TypeNode
The `nothing` type.
  • Constructor Details

    • NothingTypeNode

      public NothingTypeNode(com.oracle.truffle.api.source.SourceSection sourceSection)
  • Method Details

    • 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, 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, 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
    • getFrameSlotKind

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

      public VmTyped getMirror()
      Overrides:
      getMirror in class TypeNode
    • doExport

      protected PType doExport()
      Overrides:
      doExport in class TypeNode