java.lang.Object
com.dylibso.chicory.wasm.types.ValType

public final class ValType extends Object
The possible WASM value types.
  • Field Details

    • BOT

      public static ValType BOT
    • F64

      public static ValType F64
    • F32

      public static ValType F32
    • I64

      public static ValType I64
    • I32

      public static ValType I32
    • V128

      public static ValType V128
    • FuncRef

      public static ValType FuncRef
    • ExnRef

      public static ValType ExnRef
    • ExternRef

      public static ValType ExternRef
    • RefBot

      public static ValType RefBot
  • Method Details

    • id

      public long id()
      Returns:
      id of this ValType
    • opcode

      public int opcode()
    • typeIdx

      public int typeIdx()
    • size

      public int size()
      Returns:
      the size of this type in memory
      Throws:
      IllegalStateException - if the type cannot be stored in memory
    • isNumeric

      public boolean isNumeric()
      Returns:
      true if the type is a numeric type, or false otherwise
    • isInteger

      public boolean isInteger()
      Returns:
      true if the type is an integer type, or false otherwise
    • isFloatingPoint

      public boolean isFloatingPoint()
      Returns:
      true if the type is a floating-point type, or false otherwise
    • isReference

      public boolean isReference()
    • isValid

      public static boolean isValid(long id)
    • sizeOf

      public static int sizeOf(List<ValType> args)
    • matchesRef

      public static boolean matchesRef(ValType t1, ValType t2)
    • matches

      public static boolean matches(ValType t1, ValType t2)
    • isNullable

      public boolean isNullable()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • name

      public String name()
      a string representation of [ValType] that follows JVM's naming conventions
    • builder

      public static ValType.Builder builder()