Class Val

    • Field Detail

      • vm

        public final Vm vm
        The vm.
    • Constructor Detail

      • Val

        protected Val​(Vm vm)
        Constructs a val.
        Parameters:
        vm - the vm.
      • Val

        protected Val​(Vm vm,
                      VarMapping initialVarMapping)
        Constructs a val with the initial var mapping.
        Parameters:
        vm - the vm.
        initialVarMapping - the initial var mapping.
    • Method Detail

      • makeHostResultCore

        public HostResultCore makeHostResultCore()
        Description copied from interface: HostResult
        Returns the core of the result, which the executor handles.

        This method is intended to be used by the Kink runtime implementation. Do not call this method from your program.

        Specified by:
        makeHostResultCore in interface HostResult
        Returns:
        the core of the result.
      • getIdentity

        public final BigInteger getIdentity()
        Returns the identity number of this val.

        The identity number is unique within the vm.

        Returns:
        the identity number of this val.
      • setVar

        public void setVar​(int symHandle,
                           Val val)
        Assigns val to the var specified by symHandle.
        Parameters:
        symHandle - the sym handle of the var.
        val - the val to be assigned.
      • getVar

        @Nullable
        public Val getVar​(int symHandle)
        Returns the target of the var specified by sym; or null if absent.
        Parameters:
        symHandle - the sym handle of the var.
        Returns:
        the target of the var specified by sym; or null if absent.
      • hasVar

        public boolean hasVar​(int symHandle)
        Returns whether the val has the var specified by sym.
        Parameters:
        symHandle - the sym handle of the varl.
        Returns:
        true if the val has the var specified by sym.
      • getVarSymHandleSet

        public Set<Integer> getVarSymHandleSet()
        Returns the sym handle set of the vars of this val.
        Returns:
        the sym handle set of the vars of this val.