You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

424 lines
22 KiB

7 months ago
  1. // CodeMirror, copyright (c) by Marijn Haverbeke and others
  2. // Distributed under an MIT license: https://codemirror.net/5/LICENSE
  3. (function() {
  4. var mode = CodeMirror.getMode({indentUnit: 4}, "wast");
  5. function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));}
  6. MT('number-test',
  7. '[number 0]',
  8. '[number 123]',
  9. '[number nan]',
  10. '[number inf]',
  11. '[number infinity]',
  12. '[number 0.1]',
  13. '[number 123.0]',
  14. '[number 12E+99]');
  15. MT('string-literals-test',
  16. '[string "foo"]',
  17. '[string "\\"foo\\""]',
  18. '[string "foo #\\"# bar"]');
  19. MT('atom-test',
  20. '[atom funcref]',
  21. '[atom externref]',
  22. '[atom i32]',
  23. '[atom i64]',
  24. '[atom f32]',
  25. '[atom f64]');
  26. MT('keyword-test',
  27. '[keyword br]',
  28. '[keyword if]',
  29. '[keyword loop]',
  30. '[keyword i32.add]',
  31. '[keyword local.get]');
  32. MT('control-instructions',
  33. '[keyword unreachable]',
  34. '[keyword nop]',
  35. '[keyword br] [variable-2 $label0]',
  36. '[keyword br_if] [variable-2 $label0]',
  37. '[keyword br_table] [variable-2 $label0] [variable-2 $label1] [variable-2 $label3]',
  38. '[keyword return]',
  39. '[keyword call] [variable-2 $func0]',
  40. '[keyword call_indirect] [variable-2 $table] ([keyword param] [atom f32] [atom f64]) ([keyword result] [atom i32] [atom i64])',
  41. '[keyword return_call] [variable-2 $func0]',
  42. '[keyword return_call_indirect] ([keyword param] [atom f32] [atom f64]) ([keyword result] [atom i32] [atom i64])',
  43. '[keyword select] ([keyword local.get] [number 1]) ([keyword local.get] [number 2]) ([keyword local.get] [number 3])',
  44. '[keyword try] ([keyword result] [atom i32])',
  45. '[keyword throw] [number 0]',
  46. '[keyword rethrow] [number 0]',
  47. '[keyword catch] [number 0]',
  48. '[keyword catch_all]',
  49. '[keyword delegate] [number 0]',
  50. '[keyword unwind]');
  51. MT('memory-instructions',
  52. '[keyword i32.load] [keyword offset]=[number 4] [keyword align]=[number 4]',
  53. '[keyword i32.load8_s] [keyword offset]=[number 4] [keyword align]=[number 4]',
  54. '[keyword i32.load8_u] [keyword offset]=[number 4] [keyword align]=[number 4]',
  55. '[keyword i32.load16_s] [keyword offset]=[number 4] [keyword align]=[number 4]',
  56. '[keyword i32.load16_u] [keyword offset]=[number 4] [keyword align]=[number 4]',
  57. '[keyword i32.store] [keyword offset]=[number 4] [keyword align]=[number 4]',
  58. '[keyword i32.store8] [keyword offset]=[number 4] [keyword align]=[number 4]',
  59. '[keyword i32.store16] [keyword offset]=[number 4] [keyword align]=[number 4]',
  60. '[keyword i64.store] [keyword offset]=[number 4] [keyword align]=[number 4]',
  61. '[keyword i64.load] [keyword offset]=[number 4] [keyword align]=[number 4]',
  62. '[keyword i64.load8_s] [keyword offset]=[number 4] [keyword align]=[number 4]',
  63. '[keyword i64.load8_u] [keyword offset]=[number 4] [keyword align]=[number 4]',
  64. '[keyword i64.load16_s] [keyword offset]=[number 4] [keyword align]=[number 4]',
  65. '[keyword i64.load16_u] [keyword offset]=[number 4] [keyword align]=[number 4]',
  66. '[keyword i64.load32_s] [keyword offset]=[number 4] [keyword align]=[number 4]',
  67. '[keyword i64.load32_u] [keyword offset]=[number 4] [keyword align]=[number 4]',
  68. '[keyword i64.store8] [keyword offset]=[number 4] [keyword align]=[number 4]',
  69. '[keyword i64.store16] [keyword offset]=[number 4] [keyword align]=[number 4]',
  70. '[keyword i64.store32] [keyword offset]=[number 4] [keyword align]=[number 4]',
  71. '[keyword f32.load] [keyword offset]=[number 4] [keyword align]=[number 4]',
  72. '[keyword f32.store] [keyword offset]=[number 4] [keyword align]=[number 4]',
  73. '[keyword f64.load] [keyword offset]=[number 4] [keyword align]=[number 4]',
  74. '[keyword f64.store] [keyword offset]=[number 4] [keyword align]=[number 4]');
  75. MT('atomic-memory-instructions',
  76. '[keyword memory.atomic.notify] [keyword offset]=[number 32] [keyword align]=[number 4]',
  77. '[keyword memory.atomic.wait32] [keyword offset]=[number 32] [keyword align]=[number 4]',
  78. '[keyword memory.atomic.wait64] [keyword offset]=[number 32] [keyword align]=[number 4]',
  79. '[keyword i32.atomic.load] [keyword offset]=[number 32] [keyword align]=[number 4]',
  80. '[keyword i32.atomic.load8_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  81. '[keyword i32.atomic.load16_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  82. '[keyword i32.atomic.store] [keyword offset]=[number 32] [keyword align]=[number 4]',
  83. '[keyword i32.atomic.store8] [keyword offset]=[number 32] [keyword align]=[number 4]',
  84. '[keyword i32.atomic.store16] [keyword offset]=[number 32] [keyword align]=[number 4]',
  85. '[keyword i64.atomic.load] [keyword offset]=[number 32] [keyword align]=[number 4]',
  86. '[keyword i64.atomic.load8_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  87. '[keyword i64.atomic.load16_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  88. '[keyword i64.atomic.load32_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  89. '[keyword i64.atomic.store] [keyword offset]=[number 32] [keyword align]=[number 4]',
  90. '[keyword i64.atomic.store8] [keyword offset]=[number 32] [keyword align]=[number 4]',
  91. '[keyword i64.atomic.store16] [keyword offset]=[number 32] [keyword align]=[number 4]',
  92. '[keyword i64.atomic.store32] [keyword offset]=[number 32] [keyword align]=[number 4]',
  93. '[keyword i32.atomic.rmw.add] [keyword offset]=[number 32] [keyword align]=[number 4]',
  94. '[keyword i32.atomic.rmw8.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  95. '[keyword i32.atomic.rmw16.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  96. '[keyword i64.atomic.rmw.add] [keyword offset]=[number 32] [keyword align]=[number 4]',
  97. '[keyword i64.atomic.rmw8.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  98. '[keyword i64.atomic.rmw16.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  99. '[keyword i64.atomic.rmw32.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  100. '[keyword i32.atomic.rmw.sub] [keyword offset]=[number 32] [keyword align]=[number 4]',
  101. '[keyword i32.atomic.rmw8.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  102. '[keyword i32.atomic.rmw16.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  103. '[keyword i64.atomic.rmw.sub] [keyword offset]=[number 32] [keyword align]=[number 4]',
  104. '[keyword i64.atomic.rmw8.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  105. '[keyword i64.atomic.rmw16.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  106. '[keyword i64.atomic.rmw32.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  107. '[keyword i32.atomic.rmw.and] [keyword offset]=[number 32] [keyword align]=[number 4]',
  108. '[keyword i32.atomic.rmw8.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  109. '[keyword i32.atomic.rmw16.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  110. '[keyword i64.atomic.rmw.and] [keyword offset]=[number 32] [keyword align]=[number 4]',
  111. '[keyword i64.atomic.rmw8.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  112. '[keyword i64.atomic.rmw16.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  113. '[keyword i64.atomic.rmw32.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  114. '[keyword i32.atomic.rmw.or] [keyword offset]=[number 32] [keyword align]=[number 4]',
  115. '[keyword i32.atomic.rmw8.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  116. '[keyword i32.atomic.rmw16.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  117. '[keyword i64.atomic.rmw.or] [keyword offset]=[number 32] [keyword align]=[number 4]',
  118. '[keyword i64.atomic.rmw8.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  119. '[keyword i64.atomic.rmw16.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  120. '[keyword i64.atomic.rmw32.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  121. '[keyword i32.atomic.rmw.xor] [keyword offset]=[number 32] [keyword align]=[number 4]',
  122. '[keyword i32.atomic.rmw8.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  123. '[keyword i32.atomic.rmw16.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  124. '[keyword i64.atomic.rmw.xor] [keyword offset]=[number 32] [keyword align]=[number 4]',
  125. '[keyword i64.atomic.rmw8.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  126. '[keyword i64.atomic.rmw16.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  127. '[keyword i64.atomic.rmw32.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  128. '[keyword i32.atomic.rmw.xchg] [keyword offset]=[number 32] [keyword align]=[number 4]',
  129. '[keyword i32.atomic.rmw8.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  130. '[keyword i32.atomic.rmw16.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  131. '[keyword i64.atomic.rmw.xchg] [keyword offset]=[number 32] [keyword align]=[number 4]',
  132. '[keyword i64.atomic.rmw8.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  133. '[keyword i64.atomic.rmw16.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  134. '[keyword i64.atomic.rmw32.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  135. '[keyword i32.atomic.rmw.cmpxchg] [keyword offset]=[number 32] [keyword align]=[number 4]',
  136. '[keyword i32.atomic.rmw8.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  137. '[keyword i32.atomic.rmw16.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  138. '[keyword i64.atomic.rmw.cmpxchg] [keyword offset]=[number 32] [keyword align]=[number 4]',
  139. '[keyword i64.atomic.rmw8.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  140. '[keyword i64.atomic.rmw16.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]',
  141. '[keyword i64.atomic.rmw32.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]');
  142. MT('simd-instructions',
  143. '[keyword v128.load] [keyword offset]=[number 32] [keyword align]=[number 4]',
  144. '[keyword v128.load8x8_s] [keyword offset]=[number 64] [keyword align]=[number 0]',
  145. '[keyword v128.load8x8_u] [keyword offset]=[number 64] [keyword align]=[number 0]',
  146. '[keyword v128.load16x4_s] [keyword offset]=[number 64] [keyword align]=[number 0]',
  147. '[keyword v128.load16x4_u] [keyword offset]=[number 64] [keyword align]=[number 0]',
  148. '[keyword v128.load32x2_s] [keyword offset]=[number 64] [keyword align]=[number 0]',
  149. '[keyword v128.load32x2_u] [keyword offset]=[number 64] [keyword align]=[number 0]',
  150. '[keyword v128.load8_splat] [keyword offset]=[number 64] [keyword align]=[number 0]',
  151. '[keyword v128.load16_splat] [keyword offset]=[number 64] [keyword align]=[number 0]',
  152. '[keyword v128.load32_splat] [keyword offset]=[number 64] [keyword align]=[number 0]',
  153. '[keyword v128.load64_splat] [keyword offset]=[number 64] [keyword align]=[number 0]',
  154. '[keyword v128.store] [keyword offset]=[number 32] [keyword align]=[number 4]',
  155. '[keyword v128.const] [number 0] [number 1] [number 2] [number 3] [number 4] [number 5] [number 6] [number 7] [number 8] [number 9] [number 10] [number 11] [number 12] [number 13] [number 14] [number 15]',
  156. '[keyword i8x16.shuffle] [number 0] [number 1] [number 2] [number 3] [number 4] [number 5] [number 6] [number 7] [number 8] [number 9] [number 10] [number 11] [number 12] [number 13] [number 14] [number 15]',
  157. '[keyword i8x16.swizzle]',
  158. '[keyword i8x16.splat]',
  159. '[keyword i16x8.splat]',
  160. '[keyword i32x4.splat]',
  161. '[keyword i64x2.splat]',
  162. '[keyword f32x4.splat]',
  163. '[keyword f64x2.splat]',
  164. '[keyword i8x16.extract_lane_s] [number 1]',
  165. '[keyword i8x16.extract_lane_u] [number 1]',
  166. '[keyword i8x16.replace_lane] [number 1]',
  167. '[keyword i16x8.extract_lane_s] [number 1]',
  168. '[keyword i16x8.extract_lane_u] [number 1]',
  169. '[keyword i16x8.replace_lane] [number 1]',
  170. '[keyword i32x4.extract_lane] [number 1]',
  171. '[keyword i32x4.replace_lane] [number 1]',
  172. '[keyword i64x2.extract_lane] [number 1]',
  173. '[keyword i64x2.replace_lane] [number 1]',
  174. '[keyword f32x4.extract_lane] [number 1]',
  175. '[keyword f32x4.replace_lane] [number 1]',
  176. '[keyword f64x2.extract_lane] [number 1]',
  177. '[keyword f64x2.replace_lane] [number 1]',
  178. '[keyword i8x16.eq]',
  179. '[keyword i8x16.ne]',
  180. '[keyword i8x16.lt_s]',
  181. '[keyword i8x16.lt_u]',
  182. '[keyword i8x16.gt_s]',
  183. '[keyword i8x16.gt_u]',
  184. '[keyword i8x16.le_s]',
  185. '[keyword i8x16.le_u]',
  186. '[keyword i8x16.ge_s]',
  187. '[keyword i8x16.ge_u]',
  188. '[keyword i16x8.eq]',
  189. '[keyword i16x8.ne]',
  190. '[keyword i16x8.lt_s]',
  191. '[keyword i16x8.lt_u]',
  192. '[keyword i16x8.gt_s]',
  193. '[keyword i16x8.gt_u]',
  194. '[keyword i16x8.le_s]',
  195. '[keyword i16x8.le_u]',
  196. '[keyword i16x8.ge_s]',
  197. '[keyword i16x8.ge_u]',
  198. '[keyword i32x4.eq]',
  199. '[keyword i32x4.ne]',
  200. '[keyword i32x4.lt_s]',
  201. '[keyword i32x4.lt_u]',
  202. '[keyword i32x4.gt_s]',
  203. '[keyword i32x4.gt_u]',
  204. '[keyword i32x4.le_s]',
  205. '[keyword i32x4.le_u]',
  206. '[keyword i32x4.ge_s]',
  207. '[keyword i32x4.ge_u]',
  208. '[keyword f32x4.eq]',
  209. '[keyword f32x4.ne]',
  210. '[keyword f32x4.lt]',
  211. '[keyword f32x4.gt]',
  212. '[keyword f32x4.le]',
  213. '[keyword f32x4.ge]',
  214. '[keyword f64x2.eq]',
  215. '[keyword f64x2.ne]',
  216. '[keyword f64x2.lt]',
  217. '[keyword f64x2.gt]',
  218. '[keyword f64x2.le]',
  219. '[keyword f64x2.ge]',
  220. '[keyword v128.not]',
  221. '[keyword v128.and]',
  222. '[keyword v128.andnot]',
  223. '[keyword v128.or]',
  224. '[keyword v128.xor]',
  225. '[keyword v128.bitselect]',
  226. '[keyword v128.any_true]',
  227. '[keyword v128.load8_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  228. '[keyword v128.load16_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  229. '[keyword v128.load32_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  230. '[keyword v128.load64_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  231. '[keyword v128.store8_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  232. '[keyword v128.store16_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  233. '[keyword v128.store32_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  234. '[keyword v128.store64_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]',
  235. '[keyword v128.load32_zero] [keyword offset]=[number 64] [keyword align]=[number 0]',
  236. '[keyword v128.load64_zero] [keyword offset]=[number 64] [keyword align]=[number 0]',
  237. '[keyword f32x4.demote_f64x2_zero]',
  238. '[keyword f64x2.promote_low_f32x4]',
  239. '[keyword i8x16.abs]',
  240. '[keyword i8x16.neg]',
  241. '[keyword i8x16.popcnt]',
  242. '[keyword i8x16.all_true]',
  243. '[keyword i8x16.bitmask]',
  244. '[keyword i8x16.narrow_i16x8_s]',
  245. '[keyword i8x16.narrow_i16x8_u]',
  246. '[keyword f32x4.ceil]',
  247. '[keyword f32x4.floor]',
  248. '[keyword f32x4.trunc]',
  249. '[keyword f32x4.nearest]',
  250. '[keyword i8x16.shl]',
  251. '[keyword i8x16.shr_s]',
  252. '[keyword i8x16.shr_u]',
  253. '[keyword i8x16.add]',
  254. '[keyword i8x16.add_sat_s]',
  255. '[keyword i8x16.add_sat_u]',
  256. '[keyword i8x16.sub]',
  257. '[keyword i8x16.sub_sat_s]',
  258. '[keyword i8x16.sub_sat_u]',
  259. '[keyword f64x2.ceil]',
  260. '[keyword f64x2.floor]',
  261. '[keyword i8x16.min_s]',
  262. '[keyword i8x16.min_u]',
  263. '[keyword i8x16.max_s]',
  264. '[keyword i8x16.max_u]',
  265. '[keyword f64x2.trunc]',
  266. '[keyword i8x16.avgr_u]',
  267. '[keyword i16x8.extadd_pairwise_i8x16_s]',
  268. '[keyword i16x8.extadd_pairwise_i8x16_u]',
  269. '[keyword i32x4.extadd_pairwise_i16x8_s]',
  270. '[keyword i32x4.extadd_pairwise_i16x8_u]',
  271. '[keyword i16x8.abs]',
  272. '[keyword i16x8.neg]',
  273. '[keyword i16x8.q15mulr_sat_s]',
  274. '[keyword i16x8.all_true]',
  275. '[keyword i16x8.bitmask]',
  276. '[keyword i16x8.narrow_i32x4_s]',
  277. '[keyword i16x8.narrow_i32x4_u]',
  278. '[keyword i16x8.extend_low_i8x16_s]',
  279. '[keyword i16x8.extend_high_i8x16_s]',
  280. '[keyword i16x8.extend_low_i8x16_u]',
  281. '[keyword i16x8.extend_high_i8x16_u]',
  282. '[keyword i16x8.shl]',
  283. '[keyword i16x8.shr_s]',
  284. '[keyword i16x8.shr_u]',
  285. '[keyword i16x8.add]',
  286. '[keyword i16x8.add_sat_s]',
  287. '[keyword i16x8.add_sat_u]',
  288. '[keyword i16x8.sub]',
  289. '[keyword i16x8.sub_sat_s]',
  290. '[keyword i16x8.sub_sat_u]',
  291. '[keyword f64x2.nearest]',
  292. '[keyword i16x8.mul]',
  293. '[keyword i16x8.min_s]',
  294. '[keyword i16x8.min_u]',
  295. '[keyword i16x8.max_s]',
  296. '[keyword i16x8.max_u]',
  297. '[keyword i16x8.avgr_u]',
  298. '[keyword i16x8.extmul_low_i8x16_s]',
  299. '[keyword i16x8.extmul_high_i8x16_s]',
  300. '[keyword i16x8.extmul_low_i8x16_u]',
  301. '[keyword i16x8.extmul_high_i8x16_u]',
  302. '[keyword i32x4.abs]',
  303. '[keyword i32x4.neg]',
  304. '[keyword i32x4.all_true]',
  305. '[keyword i32x4.bitmask]',
  306. '[keyword i32x4.extend_low_i16x8_s]',
  307. '[keyword i32x4.extend_high_i16x8_s]',
  308. '[keyword i32x4.extend_low_i16x8_u]',
  309. '[keyword i32x4.extend_high_i16x8_u]',
  310. '[keyword i32x4.shl]',
  311. '[keyword i32x4.shr_s]',
  312. '[keyword i32x4.shr_u]',
  313. '[keyword i32x4.add]',
  314. '[keyword i32x4.sub]',
  315. '[keyword i32x4.mul]',
  316. '[keyword i32x4.min_s]',
  317. '[keyword i32x4.min_u]',
  318. '[keyword i32x4.max_s]',
  319. '[keyword i32x4.max_u]',
  320. '[keyword i32x4.dot_i16x8_s]',
  321. '[keyword i32x4.extmul_low_i16x8_s]',
  322. '[keyword i32x4.extmul_high_i16x8_s]',
  323. '[keyword i32x4.extmul_low_i16x8_u]',
  324. '[keyword i32x4.extmul_high_i16x8_u]',
  325. '[keyword i64x2.abs]',
  326. '[keyword i64x2.neg]',
  327. '[keyword i64x2.all_true]',
  328. '[keyword i64x2.bitmask]',
  329. '[keyword i64x2.extend_low_i32x4_s]',
  330. '[keyword i64x2.extend_high_i32x4_s]',
  331. '[keyword i64x2.extend_low_i32x4_u]',
  332. '[keyword i64x2.extend_high_i32x4_u]',
  333. '[keyword i64x2.shl]',
  334. '[keyword i64x2.shr_s]',
  335. '[keyword i64x2.shr_u]',
  336. '[keyword i64x2.add]',
  337. '[keyword i64x2.sub]',
  338. '[keyword i64x2.mul]',
  339. '[keyword i64x2.eq]',
  340. '[keyword i64x2.ne]',
  341. '[keyword i64x2.lt_s]',
  342. '[keyword i64x2.gt_s]',
  343. '[keyword i64x2.le_s]',
  344. '[keyword i64x2.ge_s]',
  345. '[keyword i64x2.extmul_low_i32x4_s]',
  346. '[keyword i64x2.extmul_high_i32x4_s]',
  347. '[keyword i64x2.extmul_low_i32x4_u]',
  348. '[keyword i64x2.extmul_high_i32x4_u]',
  349. '[keyword f32x4.abs]',
  350. '[keyword f32x4.neg]',
  351. '[keyword f32x4.sqrt]',
  352. '[keyword f32x4.add]',
  353. '[keyword f32x4.sub]',
  354. '[keyword f32x4.mul]',
  355. '[keyword f32x4.div]',
  356. '[keyword f32x4.min]',
  357. '[keyword f32x4.max]',
  358. '[keyword f64x2.abs]',
  359. '[keyword f64x2.neg]',
  360. '[keyword f64x2.sqrt]',
  361. '[keyword f64x2.add]',
  362. '[keyword f64x2.sub]',
  363. '[keyword f64x2.mul]',
  364. '[keyword f64x2.div]',
  365. '[keyword f64x2.min]',
  366. '[keyword f64x2.max]',
  367. '[keyword i32x4.trunc_sat_f32x4_s]',
  368. '[keyword i32x4.trunc_sat_f32x4_u]',
  369. '[keyword f32x4.convert_i32x4_s]',
  370. '[keyword f32x4.convert_i32x4_u]',
  371. '[keyword i32x4.trunc_sat_f64x2_s_zero]',
  372. '[keyword i32x4.trunc_sat_f64x2_u_zero]',
  373. '[keyword f64x2.convert_low_i32x4_s]',
  374. '[keyword f64x2.convert_low_i32x4_u]');
  375. MT('reference-type-instructions',
  376. '[keyword ref.null] [keyword extern]',
  377. '[keyword ref.null] [keyword func]',
  378. '[keyword ref.is_null] ([keyword ref.func] [variable-2 $f])',
  379. '[keyword ref.func] [variable-2 $f]');
  380. MT('table-instructions',
  381. '[keyword table.get] [variable-2 $t] ([keyword i32.const] [number 5])',
  382. '[keyword table.set] [variable-2 $t] ([keyword i32.const] [number 5]) ([keyword ref.func] [variable-2 $f])',
  383. '[keyword table.size] [variable-2 $t]',
  384. '[keyword table.grow] [variable-2 $t] ([keyword ref.null] [keyword extern]) ([keyword i32.const] [number 5])',
  385. '[keyword table.fill] [variable-2 $t] ([keyword i32.const] [number 5]) ([keyword param] [variable-2 $r] [atom externref]) ([keyword i32.const] [number 5])',
  386. '[keyword table.init] [variable-2 $t] [number 1] ([keyword i32.const] [number 5]) ([keyword i32.const] [number 10]) ([keyword i32.const] [number 15])',
  387. '[keyword table.copy] [variable-2 $t] [variable-2 $t2] ([keyword i32.const] [number 5]) ([keyword i32.const] [number 10]) ([keyword i32.const] [number 15])'
  388. );
  389. MT('gc-proposal',
  390. '[keyword call_ref] [keyword return_call_ref]',
  391. '[keyword ref.as_non_null] [keyword br_on_null] [keyword ref.eq]');
  392. MT('gc-proposal-structs',
  393. '[keyword struct.new_with_rtt] [keyword struct.new_default_with_rtt]',
  394. '[keyword struct.get] [keyword struct.get_s] [keyword struct.get_u]',
  395. '[keyword struct.set]');
  396. MT('gc-proposal-arrays',
  397. '[keyword array.new_with_rtt] [keyword array.new_default_with_rtt]',
  398. '[keyword array.get] [keyword array.get_s] [keyword array.get_u]',
  399. '[keyword array.len] [keyword array.set]');
  400. MT('gc-proposal-i31',
  401. '[keyword i31.new] [keyword i31.get_s] [keyword i31.get_u]');
  402. MT('gc-proposal-rtt',
  403. '[keyword rtt.canon] [keyword rtt.sub]');
  404. MT('gc-proposal-typechecks',
  405. '[keyword ref.test] [keyword ref.cast] [keyword br_on_cast]',
  406. '[keyword ref.is_func] [keyword ref.is_data] [keyword ref.is_i31]',
  407. '[keyword ref.as_func] [keyword ref.as_data] [keyword ref.as_i31]',
  408. '[keyword br_on_func] [keyword br_on_data] [keyword br_on_i31]');
  409. MT('gc-proposal-types',
  410. '[atom i8] [atom i16]',
  411. '[atom anyref] [atom dataref] [atom eqref] [atom i31ref]');
  412. })();