Module Ast.Make_instructionsSource

Parameters

module X : sig ... end

Signature

Sourcetype nonrec ('i32, 'i64, 'f32, 'f64) op = ('i32, 'i64, 'f32, 'f64) op =
  1. | I32 of 'i32
  2. | I64 of 'i64
  3. | F32 of 'f32
  4. | F64 of 'f64
Sourcetype nonrec signage = signage =
  1. | Signed
  2. | Unsigned
Sourcetype nonrec int_un_op = int_un_op =
  1. | Clz
  2. | Ctz
  3. | Popcnt
  4. | Eqz
  5. | Trunc of [ `F32 | `F64 ] * signage
  6. | TruncSat of [ `F32 | `F64 ] * signage
  7. | Reinterpret
  8. | ExtendS of [ `_8 | `_16 | `_32 ]
Sourcetype nonrec int_bin_op = int_bin_op =
  1. | Add
  2. | Sub
  3. | Mul
  4. | Div of signage
  5. | Rem of signage
  6. | And
  7. | Or
  8. | Xor
  9. | Shl
  10. | Shr of signage
  11. | Rotl
  12. | Rotr
  13. | Eq
  14. | Ne
  15. | Lt of signage
  16. | Gt of signage
  17. | Le of signage
  18. | Ge of signage
Sourcetype nonrec float_un_op = float_un_op =
  1. | Neg
  2. | Abs
  3. | Ceil
  4. | Floor
  5. | Trunc
  6. | Nearest
  7. | Sqrt
  8. | Convert of [ `I32 | `I64 ] * signage
  9. | Reinterpret
Sourcetype nonrec float_bin_op = float_bin_op =
  1. | Add
  2. | Sub
  3. | Mul
  4. | Div
  5. | Min
  6. | Max
  7. | CopySign
  8. | Eq
  9. | Ne
  10. | Lt
  11. | Gt
  12. | Le
  13. | Ge
Sourcetype nonrec num_type = num_type =
  1. | NumI32
  2. | NumI64
  3. | NumF32
  4. | NumF64
Sourcetype nonrec vec_shape = vec_shape =
  1. | I8x16
  2. | I16x8
  3. | I32x4
  4. | I64x2
  5. | F32x4
  6. | F64x2
Sourcetype nonrec vec_un_op = vec_un_op =
  1. | VecNeg of vec_shape
  2. | VecAbs of vec_shape
  3. | VecSqrt of [ `F32 | `F64 ]
  4. | VecNot
  5. | VecTruncSat of [ `F32 | `F64 ] * signage
  6. | VecConvert of [ `F32 | `F64 ] * signage
  7. | VecExtend of [ `Low | `High ] * [ `_8 | `_16 | `_32 ] * signage
  8. | VecPromote
  9. | VecDemote
  10. | VecCeil of [ `F32 | `F64 ]
  11. | VecFloor of [ `F32 | `F64 ]
  12. | VecTrunc of [ `F32 | `F64 ]
  13. | VecNearest of [ `F32 | `F64 ]
  14. | VecPopcnt
  15. | VecExtAddPairwise of signage * [ `I8 | `I16 ]
  16. | VecRelaxedTrunc of signage
  17. | VecRelaxedTruncZero of signage
Sourcetype nonrec vec_bin_op = vec_bin_op =
  1. | VecAdd of vec_shape
  2. | VecSub of vec_shape
  3. | VecMul of vec_shape
  4. | VecDiv of [ `F32 | `F64 ]
  5. | VecMin of signage option * vec_shape
  6. | VecMax of signage option * vec_shape
  7. | VecPMin of [ `F32 | `F64 ]
  8. | VecPMax of [ `F32 | `F64 ]
  9. | VecAvgr of [ `I8 | `I16 ]
  10. | VecQ15MulrSat
  11. | VecAddSat of signage * [ `I8 | `I16 ]
  12. | VecSubSat of signage * [ `I8 | `I16 ]
  13. | VecDot
  14. | VecEq of vec_shape
  15. | VecNe of vec_shape
  16. | VecLt of signage option * vec_shape
  17. | VecGt of signage option * vec_shape
  18. | VecLe of signage option * vec_shape
  19. | VecGe of signage option * vec_shape
  20. | VecAnd
  21. | VecOr
  22. | VecXor
  23. | VecAndNot
  24. | VecNarrow of signage * [ `I8 | `I16 ]
  25. | VecSwizzle
  26. | VecExtMulLow of signage * [ `_8 | `_16 | `_32 ]
  27. | VecExtMulHigh of signage * [ `_8 | `_16 | `_32 ]
  28. | VecRelaxedSwizzle
  29. | VecRelaxedMin of vec_shape
  30. | VecRelaxedMax of vec_shape
  31. | VecRelaxedQ15Mulr
  32. | VecRelaxedDot
Sourcetype nonrec vec_test_op = vec_test_op =
  1. | AnyTrue
  2. | AllTrue of vec_shape
Sourcetype nonrec vec_shift_op = vec_shift_op =
  1. | Shl of vec_shape
  2. | Shr of signage * vec_shape
Sourcetype nonrec vec_bitmask_op = vec_bitmask_op =
  1. | Bitmask of vec_shape
Sourcetype nonrec vec_tern_op = vec_tern_op =
  1. | VecRelaxedMAdd of [ `F32 | `F64 ]
  2. | VecRelaxedNMAdd of [ `F32 | `F64 ]
  3. | VecRelaxedLaneSelect of vec_shape
  4. | VecRelaxedDotAdd
Sourcetype nonrec vec_load_op = vec_load_op =
  1. | Load128
  2. | Load8x8S
  3. | Load8x8U
  4. | Load16x4S
  5. | Load16x4U
  6. | Load32x2S
  7. | Load32x2U
  8. | Load32Zero
  9. | Load64Zero
Sourcetype blocktype =
  1. | Typeuse of X.typeuse
  2. | Valtype of X.valtype
Sourcetype nonrec memarg = memarg = {
  1. offset : Uint64.t;
  2. align : Uint64.t;
}
Sourcetype catch =
  1. | Catch of X.idx * X.idx
  2. | CatchRef of X.idx * X.idx
  3. | CatchAll of X.idx
  4. | CatchAllRef of X.idx
Sourcetype on_clause =
  1. | OnLabel of X.idx * X.idx
  2. | OnSwitch of X.idx
Sourcetype 'info instr_desc =
  1. | Block of {
    1. label : X.label;
    2. typ : blocktype option;
    3. block : ('info instr list, location) annotated;
    }
  2. | Loop of {
    1. label : X.label;
    2. typ : blocktype option;
    3. block : ('info instr list, location) annotated;
    }
  3. | If of {
    1. label : X.label;
    2. typ : blocktype option;
    3. if_block : ('info instr list, location) annotated;
    4. else_block : ('info instr list, location) annotated;
    }
  4. | TryTable of {
    1. label : X.label;
    2. typ : blocktype option;
    3. catches : catch list;
    4. block : ('info instr list, location) annotated;
    }
  5. | Try of {
    1. label : X.label;
    2. typ : blocktype option;
    3. block : ('info instr list, location) annotated;
    4. catches : (X.idx * ('info instr list, location) annotated) list;
    5. catch_all : ('info instr list, location) annotated option;
    }
  6. | Unreachable
  7. | Nop
  8. | Throw of X.idx
  9. | ThrowRef
  10. | ContNew of X.idx
  11. | ContBind of X.idx * X.idx
  12. | Suspend of X.idx
  13. | Resume of X.idx * on_clause list
  14. | ResumeThrow of X.idx * X.idx * on_clause list
  15. | ResumeThrowRef of X.idx * on_clause list
  16. | Switch of X.idx * X.idx
  17. | Br of X.idx
  18. | Br_if of X.idx
  19. | Br_table of X.idx list * X.idx
  20. | Br_on_null of X.idx
  21. | Br_on_non_null of X.idx
  22. | Br_on_cast of X.idx * X.reftype * X.reftype
  23. | Br_on_cast_fail of X.idx * X.reftype * X.reftype
  24. | Br_on_cast_desc_eq of X.idx * X.reftype * X.reftype
  25. | Br_on_cast_desc_eq_fail of X.idx * X.reftype * X.reftype
  26. | Hinted of bool * 'info instr
  27. | Return
  28. | Call of X.idx
  29. | CallRef of X.idx
  30. | CallIndirect of X.idx * X.typeuse
  31. | ReturnCall of X.idx
  32. | ReturnCallRef of X.idx
  33. | ReturnCallIndirect of X.idx * X.typeuse
  34. | Drop
  35. | Select of X.valtype list option
  36. | LocalGet of X.idx
  37. | LocalSet of X.idx
  38. | LocalTee of X.idx
  39. | GlobalGet of X.idx
  40. | GlobalSet of X.idx
  41. | Load of X.idx * memarg * num_type
  42. | LoadS of X.idx * memarg * [ `I32 | `I64 ] * [ `I8 | `I16 | `I32 ] * signage
  43. | Store of X.idx * memarg * num_type
  44. | StoreS of X.idx * memarg * [ `I32 | `I64 ] * [ `I8 | `I16 | `I32 ]
  45. | Atomic of X.idx * atomicop * memarg
  46. | AtomicFence
  47. | MemorySize of X.idx
  48. | MemoryGrow of X.idx
  49. | MemoryFill of X.idx
  50. | MemoryCopy of X.idx * X.idx
  51. | MemoryInit of X.idx * X.idx
  52. | DataDrop of X.idx
  53. | TableGet of X.idx
  54. | TableSet of X.idx
  55. | TableSize of X.idx
  56. | TableGrow of X.idx
  57. | TableFill of X.idx
  58. | TableCopy of X.idx * X.idx
  59. | TableInit of X.idx * X.idx
  60. | ElemDrop of X.idx
  61. | RefNull of X.heaptype
  62. | RefFunc of X.idx
  63. | RefIsNull
  64. | RefAsNonNull
  65. | RefEq
  66. | RefTest of X.reftype
  67. | RefCast of X.reftype
  68. | RefCastDescEq of X.reftype
  69. | RefGetDesc of X.idx
  70. | StructNew of X.idx
  71. | StructNewDefault of X.idx
  72. | StructNewDesc of X.idx
  73. | StructNewDefaultDesc of X.idx
  74. | StructGet of signage option * X.idx * X.idx
  75. | StructSet of X.idx * X.idx
  76. | ArrayNew of X.idx
  77. | ArrayNewDefault of X.idx
  78. | ArrayNewFixed of X.idx * Uint32.t
  79. | ArrayNewData of X.idx * X.idx
  80. | ArrayNewElem of X.idx * X.idx
  81. | ArrayGet of signage option * X.idx
  82. | ArraySet of X.idx
  83. | ArrayLen
  84. | ArrayFill of X.idx
  85. | ArrayCopy of X.idx * X.idx
  86. | ArrayInitData of X.idx * X.idx
  87. | ArrayInitElem of X.idx * X.idx
  88. | RefI31
  89. | I31Get of signage
  90. | Const of (X.int32_t, X.int64_t, X.f32_t, X.float_t) op
  91. | BinOp of (int_bin_op, int_bin_op, float_bin_op, float_bin_op) op
  92. | UnOp of (int_un_op, int_un_op, float_un_op, float_un_op) op
  93. | Add128
  94. | Sub128
  95. | MulWide of signage
  96. | VecConst of X.v128_t
  97. | VecUnOp of vec_un_op
  98. | VecBinOp of vec_bin_op
  99. | VecTest of vec_test_op
  100. | VecShift of vec_shift_op
  101. | VecBitmask of vec_bitmask_op
  102. | VecTernOp of vec_tern_op
  103. | VecBitselect
  104. | VecLoad of X.idx * vec_load_op * memarg
  105. | VecStore of X.idx * memarg
  106. | VecLoadLane of X.idx * [ `I8 | `I16 | `I32 | `I64 ] * memarg * int
  107. | VecStoreLane of X.idx * [ `I8 | `I16 | `I32 | `I64 ] * memarg * int
  108. | VecLoadSplat of X.idx * [ `I8 | `I16 | `I32 | `I64 ] * memarg
  109. | VecExtract of vec_shape * signage option * int
  110. | VecReplace of vec_shape * int
  111. | VecSplat of vec_shape
  112. | VecShuffle of string
  113. | I32WrapI64
  114. | I64ExtendI32 of signage
  115. | F32DemoteF64
  116. | F64PromoteF32
  117. | ExternConvertAny
  118. | AnyConvertExtern
  119. | Folded of 'info instr * 'info instr list
  120. | String of X.idx option * (string, location) annotated list
  121. | Char of Uchar.t
  122. | If_annotation of {
    1. cond : cond;
    2. then_body : ('info instr list, location) annotated;
    3. else_body : ('info instr list, location) annotated option;
    }
Sourceand 'info instr = ('info instr_desc, 'info) annotated
Sourcetype 'info expr = 'info instr list

A sequence of instructions.