|
1 | 1 | type t |
| 2 | +(** Represents a Binaryen wasm type. *) |
2 | 3 |
|
3 | 4 | val none : t |
| 5 | +(** The none type, e.g., [void.] *) |
| 6 | + |
4 | 7 | val int32 : t |
| 8 | +(** The 32-bit integer type. *) |
| 9 | + |
5 | 10 | val int64 : t |
| 11 | +(** The 64-bit integer type. *) |
| 12 | + |
6 | 13 | val float32 : t |
| 14 | +(** The 32-bit float type. *) |
| 15 | + |
7 | 16 | val float64 : t |
| 17 | +(** The 64-bit float type. *) |
| 18 | + |
8 | 19 | val vec128 : t |
| 20 | +(** The 128-bit vector type. *) |
| 21 | + |
9 | 22 | val funcref : t |
| 23 | +(** The function reference type. *) |
| 24 | + |
10 | 25 | val anyref : t |
| 26 | +(** The any reference type. *) |
| 27 | + |
11 | 28 | val eqref : t |
| 29 | +(** The eq reference type. *) |
| 30 | + |
12 | 31 | val i31ref : t |
| 32 | +(** The i31 reference type. *) |
| 33 | + |
13 | 34 | val structref : t |
| 35 | +(** The struct reference type. *) |
| 36 | + |
14 | 37 | val arrayref : t |
| 38 | +(** The array reference type. *) |
| 39 | + |
15 | 40 | val stringref : t |
| 41 | +(** The string reference type. *) |
| 42 | + |
16 | 43 | val nullref : t |
| 44 | +(** The null reference type. *) |
| 45 | + |
17 | 46 | val null_externref : t |
| 47 | +(** The null external reference type. *) |
| 48 | + |
18 | 49 | val null_funcref : t |
| 50 | +(** The null function reference type. *) |
| 51 | + |
19 | 52 | val unreachable : t |
| 53 | +(** A special type indicating unreachable code when obtaining information about |
| 54 | + an expression. *) |
| 55 | + |
20 | 56 | val auto : t |
| 57 | +(** A special type used in [Expression.Block] exclusively. Lets the API figure |
| 58 | + out a block's result type automatically. *) |
| 59 | + |
21 | 60 | val create : t array -> t |
| 61 | +(** Creates a multi-value type from an array of types. |
| 62 | + @param Types The array of types |
| 63 | + @return The multi-value type *) |
| 64 | + |
22 | 65 | val expand : t -> t array |
| 66 | +(** Expands a multi-value type to an array of types. |
| 67 | + @param type The multi-value type |
| 68 | + @return The types in the multi-value type *) |
| 69 | + |
23 | 70 | val is_nullable : t -> bool |
| 71 | +(** Weather the given type is nullable. |
| 72 | + @param type The type to check |
| 73 | + @return [true] if the type is nullable, [false] otherwise *) |
| 74 | + |
24 | 75 | val from_heap_type : Heap_type.t -> t |
| 76 | +(** Produces a regular type from the given heap type. |
| 77 | + @param heap_type The heap type |
| 78 | + @return The corresponding type *) |
| 79 | + |
25 | 80 | val get_heap_type : t -> Heap_type.t |
| 81 | +(** Gets the heap type of the given type. |
| 82 | + @param type The type |
| 83 | + @return The corresponding heap type *) |
0 commit comments