output.txt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. (module
  2. 'func'
  3. '$add'
  4. 'param'
  5. '$lhs'
  6. 'i32'
  7. ''
  8. 'param'
  9. '$rhs'
  10. 'i32'
  11. ''
  12. 'result'
  13. 'i32'
  14. ''
  15. 'local.get'
  16. '$lhs'
  17. 'local.get'
  18. '$rhs'
  19. 'i32.add'
  20. ''
  21. 'export'
  22. '"add"'
  23. 'func'
  24. '$add'
  25. ''
  26. ''
  27. ''
  28. ''
  29. )
  30. (module
  31. 'func'
  32. '$getAnswer'
  33. 'result'
  34. 'i32'
  35. ''
  36. 'i32.const'
  37. '42'
  38. ''
  39. 'func'
  40. 'export'
  41. '"getAnswerPlus1"'
  42. ''
  43. 'result'
  44. 'i32'
  45. ''
  46. 'call'
  47. '$getAnswer'
  48. 'i32.const'
  49. '1'
  50. 'i32.add'
  51. ''
  52. ''
  53. ''
  54. )
  55. (module
  56. ''
  57. )
  58. (module
  59. 'import'
  60. '"console"'
  61. '"log"'
  62. 'func'
  63. '$log'
  64. 'param'
  65. 'i32'
  66. 'i32'
  67. ''
  68. ''
  69. ''
  70. 'import'
  71. '"js"'
  72. '"mem"'
  73. 'memory'
  74. '1'
  75. ''
  76. ''
  77. 'data'
  78. 'i32.const'
  79. '0'
  80. ''
  81. '"Hi"'
  82. ''
  83. 'func'
  84. 'export'
  85. '"writeHi"'
  86. ''
  87. 'i32.const'
  88. '0'
  89. 'i32.const'
  90. '2'
  91. 'call'
  92. '$log'
  93. ''
  94. ''
  95. ''
  96. )
  97. (module
  98. 'import'
  99. '"console"'
  100. '"log"'
  101. 'func'
  102. '$log'
  103. 'param'
  104. 'i32'
  105. ''
  106. ''
  107. ''
  108. 'func'
  109. 'export'
  110. '"logIt"'
  111. ''
  112. 'i32.const'
  113. '13'
  114. 'call'
  115. '$log'
  116. ''
  117. ''
  118. ''
  119. )
  120. (module
  121. 'import'
  122. '"js"'
  123. '"memory"'
  124. 'memory'
  125. '1'
  126. ''
  127. ''
  128. 'import'
  129. '"js"'
  130. '"table"'
  131. 'table'
  132. '1'
  133. 'anyfunc'
  134. ''
  135. ''
  136. 'elem'
  137. 'i32.const'
  138. '0'
  139. ''
  140. '$shared0func'
  141. ''
  142. 'func'
  143. '$shared0func'
  144. 'result'
  145. 'i32'
  146. ''
  147. 'i32.const'
  148. '0'
  149. 'i32.load'
  150. ''
  151. ''
  152. ''
  153. )
  154. (module
  155. 'import'
  156. '"js"'
  157. '"memory"'
  158. 'memory'
  159. '1'
  160. ''
  161. ''
  162. 'import'
  163. '"js"'
  164. '"table"'
  165. 'table'
  166. '1'
  167. 'anyfunc'
  168. ''
  169. ''
  170. 'type'
  171. '$void_to_i32'
  172. 'func'
  173. 'result'
  174. 'i32'
  175. ''
  176. ''
  177. ''
  178. 'func'
  179. 'export'
  180. '"doIt"'
  181. ''
  182. 'result'
  183. 'i32'
  184. ''
  185. 'i32.store'
  186. 'i32.const'
  187. '0'
  188. ''
  189. 'i32.const'
  190. '42'
  191. ''
  192. ''
  193. 'call_indirect'
  194. '$void_to_i32'
  195. 'i32.const'
  196. '0'
  197. ''
  198. ''
  199. ''
  200. ''
  201. ''
  202. )
  203. (module
  204. 'table'
  205. '2'
  206. 'anyfunc'
  207. ''
  208. 'func'
  209. '$f1'
  210. 'result'
  211. 'i32'
  212. ''
  213. 'i32.const'
  214. '42'
  215. ''
  216. 'func'
  217. '$f2'
  218. 'result'
  219. 'i32'
  220. ''
  221. 'i32.const'
  222. '13'
  223. ''
  224. 'elem'
  225. 'i32.const'
  226. '0'
  227. ''
  228. '$f1'
  229. '$f2'
  230. ''
  231. 'type'
  232. '$return_i32'
  233. 'func'
  234. 'result'
  235. 'i32'
  236. ''
  237. ''
  238. ''
  239. 'func'
  240. 'export'
  241. '"callByIndex"'
  242. ''
  243. 'param'
  244. '$i'
  245. 'i32'
  246. ''
  247. 'result'
  248. 'i32'
  249. ''
  250. 'local.get'
  251. '$i'
  252. 'call_indirect'
  253. 'type'
  254. '$return_i32'
  255. ''
  256. ''
  257. ''
  258. ''
  259. )
  260. parsed 58 lines