Packages

c

swam.traversal

Traverser

class Traverser[F[_], Res] extends AnyRef

Traverses a WebAssembly program and computes some result. Tree traversal is performed in bottom-up order, with a _preparation_ phase for recursive instructions to upgrade the context before inspecting children.

Every instruction has a default noop traverse method, as well as a instruction categories (see group Category for instructions).

To implement your own traversal, you can override the methods that need specific handling.

Source
Traverser.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Traverser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Traverser()(implicit F: Monad[F])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val binopTraverse: (Res, Binop) => F[Res]
  6. val blockPrepare: (Res, Block) => F[Res]
  7. val blockTraverse: (Res, Block) => F[Res]
  8. val brIfTraverse: (Res, BrIf) => F[Res]
  9. val brTableTraverse: (Res, BrTable) => F[Res]
  10. val brTraverse: (Res, Br) => F[Res]
  11. val callIndirectTraverse: (Res, CallIndirect) => F[Res]
  12. val callTraverse: (Res, Call) => F[Res]
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  14. val constTraverse: (Res, AConst) => F[Res]
  15. val convertopTraverse: (Res, Convertop) => F[Res]
  16. val dropTraverse: (Res, Drop.type) => F[Res]
  17. val elsePrepare: (Res, If) => F[Res]
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  20. val f32AbsTraverse: (Res, Abs.type) => F[Res]
  21. val f32AddTraverse: (Res, Add.type) => F[Res]
  22. val f32CeilTraverse: (Res, Ceil.type) => F[Res]
  23. val f32ConstTraverse: (Res, Const) => F[Res]
  24. val f32ConvertSI32Traverse: (Res, ConvertSI32.type) => F[Res]
  25. val f32ConvertSI64Traverse: (Res, ConvertSI64.type) => F[Res]
  26. val f32ConvertUI32Traverse: (Res, ConvertUI32.type) => F[Res]
  27. val f32ConvertUI64Traverse: (Res, ConvertUI64.type) => F[Res]
  28. val f32CopysignTraverse: (Res, Copysign.type) => F[Res]
  29. val f32DemoteF64Traverse: (Res, DemoteF64.type) => F[Res]
  30. val f32DivTraverse: (Res, Div.type) => F[Res]
  31. val f32EqTraverse: (Res, Eq.type) => F[Res]
  32. val f32FloorTraverse: (Res, Floor.type) => F[Res]
  33. val f32GeTraverse: (Res, Ge.type) => F[Res]
  34. val f32GtTraverse: (Res, Gt.type) => F[Res]
  35. val f32LeTraverse: (Res, Le.type) => F[Res]
  36. val f32LoadTraverse: (Res, Load) => F[Res]
  37. val f32LtTraverse: (Res, Lt.type) => F[Res]
  38. val f32MaxTraverse: (Res, Max.type) => F[Res]
  39. val f32MinTraverse: (Res, Min.type) => F[Res]
  40. val f32MulTraverse: (Res, Mul.type) => F[Res]
  41. val f32NeTraverse: (Res, Ne.type) => F[Res]
  42. val f32NearestTraverse: (Res, Nearest.type) => F[Res]
  43. val f32NegTraverse: (Res, Neg.type) => F[Res]
  44. val f32ReinterpretI32Traverse: (Res, ReinterpretI32.type) => F[Res]
  45. val f32SqrtTraverse: (Res, Sqrt.type) => F[Res]
  46. val f32StoreTraverse: (Res, Store) => F[Res]
  47. val f32SubTraverse: (Res, Sub.type) => F[Res]
  48. val f32TruncTraverse: (Res, Trunc.type) => F[Res]
  49. val f64AbsTraverse: (Res, Abs.type) => F[Res]
  50. val f64AddTraverse: (Res, Add.type) => F[Res]
  51. val f64CeilTraverse: (Res, Ceil.type) => F[Res]
  52. val f64ConstTraverse: (Res, Const) => F[Res]
  53. val f64ConvertSI32Traverse: (Res, ConvertSI32.type) => F[Res]
  54. val f64ConvertSI64Traverse: (Res, ConvertSI64.type) => F[Res]
  55. val f64ConvertUI32Traverse: (Res, ConvertUI32.type) => F[Res]
  56. val f64ConvertUI64Traverse: (Res, ConvertUI64.type) => F[Res]
  57. val f64CopysignTraverse: (Res, Copysign.type) => F[Res]
  58. val f64DivTraverse: (Res, Div.type) => F[Res]
  59. val f64EqTraverse: (Res, Eq.type) => F[Res]
  60. val f64FloorTraverse: (Res, Floor.type) => F[Res]
  61. val f64GeTraverse: (Res, Ge.type) => F[Res]
  62. val f64GtTraverse: (Res, Gt.type) => F[Res]
  63. val f64LeTraverse: (Res, Le.type) => F[Res]
  64. val f64LoadTraverse: (Res, Load) => F[Res]
  65. val f64LtTraverse: (Res, Lt.type) => F[Res]
  66. val f64MaxTraverse: (Res, Max.type) => F[Res]
  67. val f64MinTraverse: (Res, Min.type) => F[Res]
  68. val f64MulTraverse: (Res, Mul.type) => F[Res]
  69. val f64NeTraverse: (Res, Ne.type) => F[Res]
  70. val f64NearestTraverse: (Res, Nearest.type) => F[Res]
  71. val f64NegTraverse: (Res, Neg.type) => F[Res]
  72. val f64PromoteF32Traverse: (Res, PromoteF32.type) => F[Res]
  73. val f64ReinterpretI64Traverse: (Res, ReinterpretI64.type) => F[Res]
  74. val f64SqrtTraverse: (Res, Sqrt.type) => F[Res]
  75. val f64StoreTraverse: (Res, Store) => F[Res]
  76. val f64SubTraverse: (Res, Sub.type) => F[Res]
  77. val f64TruncTraverse: (Res, Trunc.type) => F[Res]
  78. val fst: (Res, Inst) => F[Res]
    Attributes
    protected[this]
  79. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  80. val globalGetTraverse: (Res, GlobalGet) => F[Res]
  81. val globalSetTraverse: (Res, GlobalSet) => F[Res]
  82. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  83. val i32AddTraverse: (Res, Add.type) => F[Res]
  84. val i32AndTraverse: (Res, And.type) => F[Res]
  85. val i32ClzTraverse: (Res, Clz.type) => F[Res]
  86. val i32ConstTraverse: (Res, Const) => F[Res]
  87. val i32CtzTraverse: (Res, Ctz.type) => F[Res]
  88. val i32DivSTraverse: (Res, DivS.type) => F[Res]
  89. val i32DivUTraverse: (Res, DivU.type) => F[Res]
  90. val i32EqTraverse: (Res, Eq.type) => F[Res]
  91. val i32EqzTraverse: (Res, Eqz.type) => F[Res]
  92. val i32Extend16STraverse: (Res, Extend16S.type) => F[Res]
  93. val i32Extend8STraverse: (Res, Extend8S.type) => F[Res]
  94. val i32GeSTraverse: (Res, GeS.type) => F[Res]
  95. val i32GeUTraverse: (Res, GeU.type) => F[Res]
  96. val i32GtSTraverse: (Res, GtS.type) => F[Res]
  97. val i32GtUTraverse: (Res, GtU.type) => F[Res]
  98. val i32LeSTraverse: (Res, LeS.type) => F[Res]
  99. val i32LeUTraverse: (Res, LeU.type) => F[Res]
  100. val i32Load16STraverse: (Res, Load16S) => F[Res]
  101. val i32Load16UTraverse: (Res, Load16U) => F[Res]
  102. val i32Load8STraverse: (Res, Load8S) => F[Res]
  103. val i32Load8UTraverse: (Res, Load8U) => F[Res]
  104. val i32LoadTraverse: (Res, Load) => F[Res]
  105. val i32LtSTraverse: (Res, LtS.type) => F[Res]
  106. val i32LtUTraverse: (Res, LtU.type) => F[Res]
  107. val i32MulTraverse: (Res, Mul.type) => F[Res]
  108. val i32NeTraverse: (Res, Ne.type) => F[Res]
  109. val i32OrTraverse: (Res, Or.type) => F[Res]
  110. val i32PopcntTraverse: (Res, Popcnt.type) => F[Res]
  111. val i32ReinterpretF32Traverse: (Res, ReinterpretF32.type) => F[Res]
  112. val i32RemSTraverse: (Res, RemS.type) => F[Res]
  113. val i32RemUTraverse: (Res, RemU.type) => F[Res]
  114. val i32RotlTraverse: (Res, Rotl.type) => F[Res]
  115. val i32RotrTraverse: (Res, Rotr.type) => F[Res]
  116. val i32ShlTraverse: (Res, Shl.type) => F[Res]
  117. val i32ShrSTraverse: (Res, ShrS.type) => F[Res]
  118. val i32ShrUTraverse: (Res, ShrU.type) => F[Res]
  119. val i32Store16Traverse: (Res, Store16) => F[Res]
  120. val i32Store8Traverse: (Res, Store8) => F[Res]
  121. val i32StoreTraverse: (Res, Store) => F[Res]
  122. val i32SubTraverse: (Res, Sub.type) => F[Res]
  123. val i32TruncSF32Traverse: (Res, TruncSF32.type) => F[Res]
  124. val i32TruncSF64Traverse: (Res, TruncSF64.type) => F[Res]
  125. val i32TruncSatSF32Traverse: (Res, TruncSatSF32.type) => F[Res]
  126. val i32TruncSatSF64Traverse: (Res, TruncSatSF64.type) => F[Res]
  127. val i32TruncSatUF32Traverse: (Res, TruncSatUF32.type) => F[Res]
  128. val i32TruncSatUF64Traverse: (Res, TruncSatUF64.type) => F[Res]
  129. val i32TruncUF32Traverse: (Res, TruncUF32.type) => F[Res]
  130. val i32TruncUF64Traverse: (Res, TruncUF64.type) => F[Res]
  131. val i32WrapI64Traverse: (Res, WrapI64.type) => F[Res]
  132. val i32XorTraverse: (Res, Xor.type) => F[Res]
  133. val i64AddTraverse: (Res, Add.type) => F[Res]
  134. val i64AndTraverse: (Res, And.type) => F[Res]
  135. val i64ClzTraverse: (Res, Clz.type) => F[Res]
  136. val i64ConstTraverse: (Res, Const) => F[Res]
  137. val i64CtzTraverse: (Res, Ctz.type) => F[Res]
  138. val i64DivSTraverse: (Res, DivS.type) => F[Res]
  139. val i64DivUTraverse: (Res, DivU.type) => F[Res]
  140. val i64EqTraverse: (Res, Eq.type) => F[Res]
  141. val i64EqzTraverse: (Res, Eqz.type) => F[Res]
  142. val i64Extend16STraverse: (Res, Extend16S.type) => F[Res]
  143. val i64Extend32STraverse: (Res, Extend32S.type) => F[Res]
  144. val i64Extend8STraverse: (Res, Extend8S.type) => F[Res]
  145. val i64ExtendSI32Traverse: (Res, ExtendSI32.type) => F[Res]
  146. val i64ExtendUI32Traverse: (Res, ExtendUI32.type) => F[Res]
  147. val i64GeSTraverse: (Res, GeS.type) => F[Res]
  148. val i64GeUTraverse: (Res, GeU.type) => F[Res]
  149. val i64GtSTraverse: (Res, GtS.type) => F[Res]
  150. val i64GtUTraverse: (Res, GtU.type) => F[Res]
  151. val i64LeSTraverse: (Res, LeS.type) => F[Res]
  152. val i64LeUTraverse: (Res, LeU.type) => F[Res]
  153. val i64Load16STraverse: (Res, Load16S) => F[Res]
  154. val i64Load16UTraverse: (Res, Load16U) => F[Res]
  155. val i64Load32STraverse: (Res, Load32S) => F[Res]
  156. val i64Load32UTraverse: (Res, Load32U) => F[Res]
  157. val i64Load8STraverse: (Res, Load8S) => F[Res]
  158. val i64Load8UTraverse: (Res, Load8U) => F[Res]
  159. val i64LoadTraverse: (Res, Load) => F[Res]
  160. val i64LtSTraverse: (Res, LtS.type) => F[Res]
  161. val i64LtUTraverse: (Res, LtU.type) => F[Res]
  162. val i64MulTraverse: (Res, Mul.type) => F[Res]
  163. val i64NeTraverse: (Res, Ne.type) => F[Res]
  164. val i64OrTraverse: (Res, Or.type) => F[Res]
  165. val i64PopcntTraverse: (Res, Popcnt.type) => F[Res]
  166. val i64ReinterpretF64Traverse: (Res, ReinterpretF64.type) => F[Res]
  167. val i64RemSTraverse: (Res, RemS.type) => F[Res]
  168. val i64RemUTraverse: (Res, RemU.type) => F[Res]
  169. val i64RotlTraverse: (Res, Rotl.type) => F[Res]
  170. val i64RotrTraverse: (Res, Rotr.type) => F[Res]
  171. val i64ShlTraverse: (Res, Shl.type) => F[Res]
  172. val i64ShrSTraverse: (Res, ShrS.type) => F[Res]
  173. val i64ShrUTraverse: (Res, ShrU.type) => F[Res]
  174. val i64Store16Traverse: (Res, Store16) => F[Res]
  175. val i64Store32Traverse: (Res, Store32) => F[Res]
  176. val i64Store8Traverse: (Res, Store8) => F[Res]
  177. val i64StoreTraverse: (Res, Store) => F[Res]
  178. val i64SubTraverse: (Res, Sub.type) => F[Res]
  179. val i64TruncSF32Traverse: (Res, TruncSF32.type) => F[Res]
  180. val i64TruncSF64Traverse: (Res, TruncSF64.type) => F[Res]
  181. val i64TruncSatSF32Traverse: (Res, TruncSatSF32.type) => F[Res]
  182. val i64TruncSatSF64Traverse: (Res, TruncSatSF64.type) => F[Res]
  183. val i64TruncSatUF32Traverse: (Res, TruncSatUF32.type) => F[Res]
  184. val i64TruncSatUF64Traverse: (Res, TruncSatUF64.type) => F[Res]
  185. val i64TruncUF32Traverse: (Res, TruncUF32.type) => F[Res]
  186. val i64TruncUF64Traverse: (Res, TruncUF64.type) => F[Res]
  187. val i64XorTraverse: (Res, Xor.type) => F[Res]
  188. val ifTraverse: (Res, If) => F[Res]
  189. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  190. val loadInstTraverse: (Res, LoadInst) => F[Res]
  191. val loadNInstTraverse: (Res, LoadNInst) => F[Res]
  192. val localGetTraverse: (Res, LocalGet) => F[Res]
  193. val localSetTraverse: (Res, LocalSet) => F[Res]
  194. val localTeeTraverse: (Res, LocalTee) => F[Res]
  195. val loopPrepare: (Res, Loop) => F[Res]
  196. val loopTraverse: (Res, Loop) => F[Res]
  197. val memoryGrowTraverse: (Res, MemoryGrow.type) => F[Res]
  198. val memoryInstTraverse: (Res, MemoryInst) => F[Res]
  199. val memorySizeTraverse: (Res, MemorySize.type) => F[Res]
  200. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  201. val nopTraverse: (Res, Nop.type) => F[Res]
  202. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  203. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  204. val otherPrepare: (Res, Inst) => F[Res]
  205. val relopTraverse: (Res, Relop) => F[Res]
  206. val returnTraverse: (Res, Return.type) => F[Res]
  207. final def run(zero: Res, inst: Inst): F[Res]
  208. val satConvertopTraverse: (Res, SatConvertop) => F[Res]
  209. val selectTraverse: (Res, Select.type) => F[Res]
  210. val storeInstTraverse: (Res, StoreInst) => F[Res]
  211. val storeNInstTraverse: (Res, StoreNInst) => F[Res]
  212. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  213. val testopTraverse: (Res, Testop) => F[Res]
  214. val thenPrepare: (Res, If) => F[Res]
  215. def toString(): String
    Definition Classes
    AnyRef → Any
  216. final def traverse(zero: Res, inst: Inst): F[Res]
  217. val unopTraverse: (Res, Unop) => F[Res]
  218. val unreachableTraverse: (Res, Unreachable.type) => F[Res]
  219. val varInstTraverse: (Res, VarInst) => F[Res]
  220. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  221. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  222. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped