Class TypeNode

    • Constructor Detail

      • TypeNode

        protected TypeNode​(com.oracle.truffle.api.source.SourceSection sourceSection)
    • Method Detail

      • isNoopTypeCheck

        public boolean isNoopTypeCheck()
      • getFrameSlotKind

        public abstract com.oracle.truffle.api.frame.FrameSlotKind getFrameSlotKind()
      • initWriteSlotNode

        public abstract TypeNode initWriteSlotNode​(int slot)
        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.
      • execute

        public abstract void execute​(com.oracle.truffle.api.frame.VirtualFrame frame,
                                     java.lang.Object value)
        Checks if `value` conforms to this type. If so, returns normally. Otherwise, throws a `VmTypeMismatchException`.
      • executeAndSet

        public abstract void executeAndSet​(com.oracle.truffle.api.frame.VirtualFrame frame,
                                           java.lang.Object value)
        Checks if `value` conforms to this type. If so, sets `slot` to `value`. Otherwise, throws a `VmTypeMismatchException`.
      • createDefaultValue

        public @Nullable java.lang.Object createDefaultValue​(VmLanguage language,
                                                             com.oracle.truffle.api.source.SourceSection headerSection,
                                                             java.lang.String qualifiedName)
      • forClass

        public static TypeNode forClass​(com.oracle.truffle.api.source.SourceSection sourceSection,
                                        VmClass clazz)
      • doExport

        protected PType doExport()
      • getMirror

        public VmTyped getMirror()
      • getTypeArgumentMirrors

        public VmList getTypeArgumentMirrors()
      • typeMismatch

        protected final VmTypeMismatchException typeMismatch​(java.lang.Object actualValue,
                                                             java.lang.Object expectedType)