java.lang.Object
com.dylibso.chicory.wasm.types.ValType
The possible WASM value types.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classA separate holder class for ID constants.static enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ValType.Builderbuilder()booleaninthashCode()longid()booleanbooleanbooleanbooleanbooleanstatic booleanisValid(long id) static booleanstatic booleanmatchesRef(ValType t1, ValType t2) name()a string representation of [ValType] that follows JVM's naming conventionsintopcode()intsize()static inttoString()inttypeIdx()
-
Field Details
-
BOT
-
F64
-
F32
-
I64
-
I32
-
V128
-
FuncRef
-
ExnRef
-
ExternRef
-
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:
trueif the type is a numeric type, orfalseotherwise
-
isInteger
public boolean isInteger()- Returns:
trueif the type is an integer type, orfalseotherwise
-
isFloatingPoint
public boolean isFloatingPoint()- Returns:
trueif the type is a floating-point type, orfalseotherwise
-
isReference
public boolean isReference() -
isValid
public static boolean isValid(long id) -
sizeOf
-
matchesRef
-
matches
-
isNullable
public boolean isNullable() -
hashCode
public int hashCode() -
equals
-
toString
-
name
a string representation of [ValType] that follows JVM's naming conventions -
builder
-