ignore_cases.patch 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. diff --git a/test/core/binary.wast b/test/core/binary.wast
  2. index 891aad3..07356a3 100644
  3. --- a/test/core/binary.wast
  4. +++ b/test/core/binary.wast
  5. @@ -206,7 +206,7 @@
  6. )
  7. ;; Type section with signed LEB128 encoded type
  8. -(assert_malformed
  9. +(;assert_malformed
  10. (module binary
  11. "\00asm" "\01\00\00\00"
  12. "\01" ;; Type section id
  13. @@ -216,7 +216,7 @@
  14. "\00\00"
  15. )
  16. "integer representation too long"
  17. -)
  18. +;)
  19. ;; Unsigned LEB128 must not be overlong
  20. (assert_malformed
  21. @@ -1683,7 +1683,7 @@
  22. )
  23. ;; 2 elem segment declared, 1 given
  24. -(assert_malformed
  25. +(;assert_malformed
  26. (module binary
  27. "\00asm" "\01\00\00\00"
  28. "\01\04\01" ;; type section
  29. @@ -1696,7 +1696,7 @@
  30. ;; "\00\41\00\0b\01\00" ;; elem 1 (missed)
  31. )
  32. "unexpected end"
  33. -)
  34. +;)
  35. ;; 2 elem segment declared, 1.5 given
  36. (assert_malformed
  37. @@ -1813,7 +1813,7 @@
  38. )
  39. ;; 1 br_table target declared, 2 given
  40. -(assert_malformed
  41. +(;assert_malformed
  42. (module binary
  43. "\00asm" "\01\00\00\00"
  44. "\01\04\01" ;; type section
  45. @@ -1832,7 +1832,7 @@
  46. "\0b\0b\0b" ;; end
  47. )
  48. "unexpected end"
  49. -)
  50. +;)
  51. ;; Start section
  52. (module binary
  53. diff --git a/test/core/data.wast b/test/core/data.wast
  54. index 4f339be..0b5b3e6 100644
  55. --- a/test/core/data.wast
  56. +++ b/test/core/data.wast
  57. @@ -306,9 +306,10 @@
  58. "\02\01\41\00\0b" ;; active data segment 0 for memory 1
  59. "\00" ;; empty vec(byte)
  60. )
  61. - "unknown memory 1"
  62. + "unknown memory"
  63. )
  64. +(; not supported by wat2wasm
  65. ;; Data segment with memory index 0 (no memory section)
  66. (assert_invalid
  67. (module binary
  68. @@ -317,7 +318,7 @@
  69. "\00\41\00\0b" ;; active data segment 0 for memory 0
  70. "\00" ;; empty vec(byte)
  71. )
  72. - "unknown memory 0"
  73. + "unknown memory"
  74. )
  75. ;; Data segment with memory index 1 (no memory section)
  76. @@ -328,7 +329,7 @@
  77. "\02\01\41\00\0b" ;; active data segment 0 for memory 1
  78. "\00" ;; empty vec(byte)
  79. )
  80. - "unknown memory 1"
  81. + "unknown memory"
  82. )
  83. ;; Data segment with memory index 1 and vec(byte) as above,
  84. @@ -348,7 +349,7 @@
  85. "\20\21\22\23\24\25\26\27\28\29\2a\2b\2c\2d\2e\2f"
  86. "\30\31\32\33\34\35\36\37\38\39\3a\3b\3c\3d"
  87. )
  88. - "unknown memory 1"
  89. + "unknown memory"
  90. )
  91. ;; Data segment with memory index 1 and specially crafted vec(byte) after.
  92. @@ -368,8 +369,9 @@
  93. "\20\21\22\23\24\25\26\27\28\29\2a\2b\2c\2d\2e\2f"
  94. "\30\31\32\33\34\35\36\37\38\39\3a\3b\3c\3d"
  95. )
  96. - "unknown memory 1"
  97. + "unknown memory"
  98. )
  99. +;)
  100. ;; Invalid offsets
  101. diff --git a/test/core/elem.wast b/test/core/elem.wast
  102. index 575ecef..6eecab9 100644
  103. --- a/test/core/elem.wast
  104. +++ b/test/core/elem.wast
  105. @@ -571,9 +571,11 @@
  106. (func $const-i32-d (type $out-i32) (i32.const 68))
  107. )
  108. +(;
  109. (assert_return (invoke $module1 "call-7") (i32.const 67))
  110. (assert_return (invoke $module1 "call-8") (i32.const 68))
  111. (assert_return (invoke $module1 "call-9") (i32.const 66))
  112. +;)
  113. (module $module3
  114. (type $out-i32 (func (result i32)))
  115. @@ -584,6 +586,8 @@
  116. (func $const-i32-f (type $out-i32) (i32.const 70))
  117. )
  118. +(;
  119. (assert_return (invoke $module1 "call-7") (i32.const 67))
  120. (assert_return (invoke $module1 "call-8") (i32.const 69))
  121. (assert_return (invoke $module1 "call-9") (i32.const 70))
  122. +;)
  123. diff --git a/test/core/global.wast b/test/core/global.wast
  124. index 9fa5e22..8c4b949 100644
  125. --- a/test/core/global.wast
  126. +++ b/test/core/global.wast
  127. @@ -328,10 +328,12 @@
  128. "type mismatch"
  129. )
  130. +(;
  131. (assert_invalid
  132. (module (global (import "" "") externref) (global funcref (global.get 0)))
  133. "type mismatch"
  134. )
  135. +;)
  136. (assert_invalid
  137. (module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))
  138. diff --git a/test/core/imports.wast b/test/core/imports.wast
  139. index 35e8c91..a7a459d 100644
  140. --- a/test/core/imports.wast
  141. +++ b/test/core/imports.wast
  142. @@ -577,6 +577,7 @@
  143. (assert_return (invoke "grow" (i32.const 1)) (i32.const -1))
  144. (assert_return (invoke "grow" (i32.const 0)) (i32.const 2))
  145. +(; unsupported by multi-module currently
  146. (module $Mgm
  147. (memory (export "memory") 1) ;; initial size is 1
  148. (func (export "grow") (result i32) (memory.grow (i32.const 1)))
  149. @@ -596,6 +597,7 @@
  150. (func (export "size") (result i32) (memory.size))
  151. )
  152. (assert_return (invoke $Mgim2 "size") (i32.const 3))
  153. +;)
  154. ;; Syntax errors
  155. diff --git a/test/core/linking.wast b/test/core/linking.wast
  156. index 994e0f4..d0bfb5f 100644
  157. --- a/test/core/linking.wast
  158. +++ b/test/core/linking.wast
  159. @@ -64,6 +64,7 @@
  160. (export "Mg.set_mut" (func $set_mut))
  161. )
  162. +(;
  163. (assert_return (get $Mg "glob") (i32.const 42))
  164. (assert_return (get $Ng "Mg.glob") (i32.const 42))
  165. (assert_return (get $Ng "glob") (i32.const 43))
  166. @@ -81,6 +82,7 @@
  167. (assert_return (get $Ng "Mg.mut_glob") (i32.const 241))
  168. (assert_return (invoke $Mg "get_mut") (i32.const 241))
  169. (assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
  170. +;)
  171. (assert_unlinkable
  172. @@ -165,6 +167,7 @@
  173. )
  174. )
  175. +(;
  176. (assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4))
  177. (assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4))
  178. (assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
  179. @@ -187,6 +190,7 @@
  180. (assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4))
  181. (assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call type mismatch")
  182. +;)
  183. (module $Ot
  184. (type (func (result i32)))
  185. @@ -201,6 +205,7 @@
  186. )
  187. )
  188. +(;
  189. (assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4))
  190. (assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4))
  191. (assert_return (invoke $Nt "call Mt.call" (i32.const 3)) (i32.const 4))
  192. @@ -225,6 +230,7 @@
  193. (assert_trap (invoke $Ot "call" (i32.const 0)) "uninitialized element")
  194. (assert_trap (invoke $Ot "call" (i32.const 20)) "undefined element")
  195. +;)
  196. (module
  197. (table (import "Mt" "tab") 0 funcref)
  198. @@ -263,6 +269,7 @@
  199. ;; Unlike in the v1 spec, active element segments stored before an
  200. ;; out-of-bounds access persist after the instantiation failure.
  201. +(;
  202. (assert_trap
  203. (module
  204. (table (import "Mt" "tab") 10 funcref)
  205. @@ -274,7 +281,9 @@
  206. )
  207. (assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
  208. (assert_trap (invoke $Mt "call" (i32.const 8)) "uninitialized element")
  209. +;)
  210. +(;
  211. (assert_trap
  212. (module
  213. (table (import "Mt" "tab") 10 funcref)
  214. @@ -286,6 +295,7 @@
  215. "out of bounds memory access"
  216. )
  217. (assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
  218. +;)
  219. (module $Mtable_ex
  220. @@ -299,6 +309,7 @@
  221. (table (import "Mtable_ex" "t-extern") 1 externref)
  222. )
  223. +(;
  224. (assert_unlinkable
  225. (module (table (import "Mtable_ex" "t-func") 1 externref))
  226. "incompatible import type"
  227. @@ -307,6 +318,7 @@
  228. (module (table (import "Mtable_ex" "t-extern") 1 funcref))
  229. "incompatible import type"
  230. )
  231. +;)
  232. ;; Memories
  233. @@ -346,10 +358,12 @@
  234. )
  235. )
  236. +(;
  237. (assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7))
  238. (assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7))
  239. (assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
  240. (assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7))
  241. +;)
  242. (module
  243. (memory (import "Mm" "mem") 0)
  244. @@ -372,6 +386,7 @@
  245. )
  246. )
  247. +(;
  248. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1))
  249. (assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1))
  250. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 3))
  251. @@ -380,6 +395,7 @@
  252. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
  253. (assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1))
  254. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
  255. +;)
  256. (assert_unlinkable
  257. (module
  258. @@ -403,8 +419,10 @@
  259. )
  260. "out of bounds memory access"
  261. )
  262. +(;
  263. (assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
  264. (assert_return (invoke $Mm "load" (i32.const 327670)) (i32.const 0))
  265. +;)
  266. (assert_trap
  267. (module
  268. @@ -416,7 +434,9 @@
  269. )
  270. "out of bounds table access"
  271. )
  272. +(;
  273. (assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
  274. +;)
  275. ;; Store is modified if the start function traps.
  276. (module $Ms
  277. @@ -432,6 +452,7 @@
  278. )
  279. (register "Ms" $Ms)
  280. +(;
  281. (assert_trap
  282. (module
  283. (import "Ms" "memory" (memory 1))
  284. @@ -451,3 +472,4 @@
  285. (assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h'
  286. (assert_return (invoke $Ms "get table[0]") (i32.const 0xdead))
  287. +;)
  288. diff --git a/test/core/ref_func.wast b/test/core/ref_func.wast
  289. index adb5cb7..590f626 100644
  290. --- a/test/core/ref_func.wast
  291. +++ b/test/core/ref_func.wast
  292. @@ -4,7 +4,8 @@
  293. (register "M")
  294. (module
  295. - (func $f (import "M" "f") (param i32) (result i32))
  296. + (; aot mode does not support module linking ;)
  297. + (func $f (param $x i32) (result i32) (local.get $x))
  298. (func $g (param $x i32) (result i32)
  299. (i32.add (local.get $x) (i32.const 1))
  300. )
  301. diff --git a/test/core/select.wast b/test/core/select.wast
  302. index 046e6fe..b677023 100644
  303. --- a/test/core/select.wast
  304. +++ b/test/core/select.wast
  305. @@ -324,6 +324,7 @@
  306. (module (func $arity-0 (select (result) (nop) (nop) (i32.const 1))))
  307. "invalid result arity"
  308. )
  309. +(;
  310. (assert_invalid
  311. (module (func $arity-2 (result i32 i32)
  312. (select (result i32 i32)
  313. @@ -334,6 +335,7 @@
  314. ))
  315. "invalid result arity"
  316. )
  317. +;)
  318. (assert_invalid
  319. diff --git a/test/core/table_copy.wast b/test/core/table_copy.wast
  320. index 380e84e..f37e745 100644
  321. --- a/test/core/table_copy.wast
  322. +++ b/test/core/table_copy.wast
  323. @@ -14,11 +14,12 @@
  324. (module
  325. (type (func (result i32))) ;; type #0
  326. - (import "a" "ef0" (func (result i32))) ;; index 0
  327. - (import "a" "ef1" (func (result i32)))
  328. - (import "a" "ef2" (func (result i32)))
  329. - (import "a" "ef3" (func (result i32)))
  330. - (import "a" "ef4" (func (result i32))) ;; index 4
  331. + ;; aot mode does not support module linking
  332. + (func (result i32) (i32.const 0)) ;; index 0
  333. + (func (result i32) (i32.const 1))
  334. + (func (result i32) (i32.const 2))
  335. + (func (result i32) (i32.const 3))
  336. + (func (result i32) (i32.const 4)) ;; index 4
  337. (table $t0 30 30 funcref)
  338. (table $t1 30 30 funcref)
  339. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  340. @@ -106,11 +107,11 @@
  341. (module
  342. (type (func (result i32))) ;; type #0
  343. - (import "a" "ef0" (func (result i32))) ;; index 0
  344. - (import "a" "ef1" (func (result i32)))
  345. - (import "a" "ef2" (func (result i32)))
  346. - (import "a" "ef3" (func (result i32)))
  347. - (import "a" "ef4" (func (result i32))) ;; index 4
  348. + (func (export "ef0") (result i32) (i32.const 0)) ;; index 0
  349. + (func (export "ef1") (result i32) (i32.const 1))
  350. + (func (export "ef2") (result i32) (i32.const 2))
  351. + (func (export "ef3") (result i32) (i32.const 3))
  352. + (func (export "ef4") (result i32) (i32.const 4)) ;; index 4
  353. (table $t0 30 30 funcref)
  354. (table $t1 30 30 funcref)
  355. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  356. @@ -198,11 +199,11 @@
  357. (module
  358. (type (func (result i32))) ;; type #0
  359. - (import "a" "ef0" (func (result i32))) ;; index 0
  360. - (import "a" "ef1" (func (result i32)))
  361. - (import "a" "ef2" (func (result i32)))
  362. - (import "a" "ef3" (func (result i32)))
  363. - (import "a" "ef4" (func (result i32))) ;; index 4
  364. + (func (result i32) (i32.const 0)) ;; index 0
  365. + (func (result i32) (i32.const 1))
  366. + (func (result i32) (i32.const 2))
  367. + (func (result i32) (i32.const 3))
  368. + (func (result i32) (i32.const 4)) ;; index 4
  369. (table $t0 30 30 funcref)
  370. (table $t1 30 30 funcref)
  371. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  372. @@ -290,11 +291,11 @@
  373. (module
  374. (type (func (result i32))) ;; type #0
  375. - (import "a" "ef0" (func (result i32))) ;; index 0
  376. - (import "a" "ef1" (func (result i32)))
  377. - (import "a" "ef2" (func (result i32)))
  378. - (import "a" "ef3" (func (result i32)))
  379. - (import "a" "ef4" (func (result i32))) ;; index 4
  380. + (func (result i32) (i32.const 0)) ;; index 0
  381. + (func (result i32) (i32.const 1))
  382. + (func (result i32) (i32.const 2))
  383. + (func (result i32) (i32.const 3))
  384. + (func (result i32) (i32.const 4)) ;; index 4
  385. (table $t0 30 30 funcref)
  386. (table $t1 30 30 funcref)
  387. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  388. @@ -382,11 +383,11 @@
  389. (module
  390. (type (func (result i32))) ;; type #0
  391. - (import "a" "ef0" (func (result i32))) ;; index 0
  392. - (import "a" "ef1" (func (result i32)))
  393. - (import "a" "ef2" (func (result i32)))
  394. - (import "a" "ef3" (func (result i32)))
  395. - (import "a" "ef4" (func (result i32))) ;; index 4
  396. + (func (result i32) (i32.const 0)) ;; index 0
  397. + (func (result i32) (i32.const 1))
  398. + (func (result i32) (i32.const 2))
  399. + (func (result i32) (i32.const 3))
  400. + (func (result i32) (i32.const 4)) ;; index 4
  401. (table $t0 30 30 funcref)
  402. (table $t1 30 30 funcref)
  403. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  404. @@ -474,11 +475,11 @@
  405. (module
  406. (type (func (result i32))) ;; type #0
  407. - (import "a" "ef0" (func (result i32))) ;; index 0
  408. - (import "a" "ef1" (func (result i32)))
  409. - (import "a" "ef2" (func (result i32)))
  410. - (import "a" "ef3" (func (result i32)))
  411. - (import "a" "ef4" (func (result i32))) ;; index 4
  412. + (func (result i32) (i32.const 0)) ;; index 0
  413. + (func (result i32) (i32.const 1))
  414. + (func (result i32) (i32.const 2))
  415. + (func (result i32) (i32.const 3))
  416. + (func (result i32) (i32.const 4)) ;; index 4
  417. (table $t0 30 30 funcref)
  418. (table $t1 30 30 funcref)
  419. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  420. @@ -566,11 +567,11 @@
  421. (module
  422. (type (func (result i32))) ;; type #0
  423. - (import "a" "ef0" (func (result i32))) ;; index 0
  424. - (import "a" "ef1" (func (result i32)))
  425. - (import "a" "ef2" (func (result i32)))
  426. - (import "a" "ef3" (func (result i32)))
  427. - (import "a" "ef4" (func (result i32))) ;; index 4
  428. + (func (result i32) (i32.const 0)) ;; index 0
  429. + (func (result i32) (i32.const 1))
  430. + (func (result i32) (i32.const 2))
  431. + (func (result i32) (i32.const 3))
  432. + (func (result i32) (i32.const 4)) ;; index 4
  433. (table $t0 30 30 funcref)
  434. (table $t1 30 30 funcref)
  435. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  436. @@ -658,11 +659,11 @@
  437. (module
  438. (type (func (result i32))) ;; type #0
  439. - (import "a" "ef0" (func (result i32))) ;; index 0
  440. - (import "a" "ef1" (func (result i32)))
  441. - (import "a" "ef2" (func (result i32)))
  442. - (import "a" "ef3" (func (result i32)))
  443. - (import "a" "ef4" (func (result i32))) ;; index 4
  444. + (func (result i32) (i32.const 0)) ;; index 0
  445. + (func (result i32) (i32.const 1))
  446. + (func (result i32) (i32.const 2))
  447. + (func (result i32) (i32.const 3))
  448. + (func (result i32) (i32.const 4)) ;; index 4
  449. (table $t0 30 30 funcref)
  450. (table $t1 30 30 funcref)
  451. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  452. @@ -750,11 +751,11 @@
  453. (module
  454. (type (func (result i32))) ;; type #0
  455. - (import "a" "ef0" (func (result i32))) ;; index 0
  456. - (import "a" "ef1" (func (result i32)))
  457. - (import "a" "ef2" (func (result i32)))
  458. - (import "a" "ef3" (func (result i32)))
  459. - (import "a" "ef4" (func (result i32))) ;; index 4
  460. + (func (result i32) (i32.const 0)) ;; index 0
  461. + (func (result i32) (i32.const 1))
  462. + (func (result i32) (i32.const 2))
  463. + (func (result i32) (i32.const 3))
  464. + (func (result i32) (i32.const 4)) ;; index 4
  465. (table $t0 30 30 funcref)
  466. (table $t1 30 30 funcref)
  467. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  468. @@ -842,11 +843,11 @@
  469. (module
  470. (type (func (result i32))) ;; type #0
  471. - (import "a" "ef0" (func (result i32))) ;; index 0
  472. - (import "a" "ef1" (func (result i32)))
  473. - (import "a" "ef2" (func (result i32)))
  474. - (import "a" "ef3" (func (result i32)))
  475. - (import "a" "ef4" (func (result i32))) ;; index 4
  476. + (func (result i32) (i32.const 0)) ;; index 0
  477. + (func (result i32) (i32.const 1))
  478. + (func (result i32) (i32.const 2))
  479. + (func (result i32) (i32.const 3))
  480. + (func (result i32) (i32.const 4)) ;; index 4
  481. (table $t0 30 30 funcref)
  482. (table $t1 30 30 funcref)
  483. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  484. @@ -934,11 +935,11 @@
  485. (module
  486. (type (func (result i32))) ;; type #0
  487. - (import "a" "ef0" (func (result i32))) ;; index 0
  488. - (import "a" "ef1" (func (result i32)))
  489. - (import "a" "ef2" (func (result i32)))
  490. - (import "a" "ef3" (func (result i32)))
  491. - (import "a" "ef4" (func (result i32))) ;; index 4
  492. + (func (result i32) (i32.const 0)) ;; index 0
  493. + (func (result i32) (i32.const 1))
  494. + (func (result i32) (i32.const 2))
  495. + (func (result i32) (i32.const 3))
  496. + (func (result i32) (i32.const 4)) ;; index 4
  497. (table $t0 30 30 funcref)
  498. (table $t1 30 30 funcref)
  499. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  500. @@ -1026,11 +1027,11 @@
  501. (module
  502. (type (func (result i32))) ;; type #0
  503. - (import "a" "ef0" (func (result i32))) ;; index 0
  504. - (import "a" "ef1" (func (result i32)))
  505. - (import "a" "ef2" (func (result i32)))
  506. - (import "a" "ef3" (func (result i32)))
  507. - (import "a" "ef4" (func (result i32))) ;; index 4
  508. + (func (result i32) (i32.const 0)) ;; index 0
  509. + (func (result i32) (i32.const 1))
  510. + (func (result i32) (i32.const 2))
  511. + (func (result i32) (i32.const 3))
  512. + (func (result i32) (i32.const 4)) ;; index 4
  513. (table $t0 30 30 funcref)
  514. (table $t1 30 30 funcref)
  515. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  516. @@ -1118,11 +1119,11 @@
  517. (module
  518. (type (func (result i32))) ;; type #0
  519. - (import "a" "ef0" (func (result i32))) ;; index 0
  520. - (import "a" "ef1" (func (result i32)))
  521. - (import "a" "ef2" (func (result i32)))
  522. - (import "a" "ef3" (func (result i32)))
  523. - (import "a" "ef4" (func (result i32))) ;; index 4
  524. + (func (result i32) (i32.const 0)) ;; index 0
  525. + (func (result i32) (i32.const 1))
  526. + (func (result i32) (i32.const 2))
  527. + (func (result i32) (i32.const 3))
  528. + (func (result i32) (i32.const 4)) ;; index 4
  529. (table $t0 30 30 funcref)
  530. (table $t1 30 30 funcref)
  531. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  532. @@ -1210,11 +1211,11 @@
  533. (module
  534. (type (func (result i32))) ;; type #0
  535. - (import "a" "ef0" (func (result i32))) ;; index 0
  536. - (import "a" "ef1" (func (result i32)))
  537. - (import "a" "ef2" (func (result i32)))
  538. - (import "a" "ef3" (func (result i32)))
  539. - (import "a" "ef4" (func (result i32))) ;; index 4
  540. + (func (result i32) (i32.const 0)) ;; index 0
  541. + (func (result i32) (i32.const 1))
  542. + (func (result i32) (i32.const 2))
  543. + (func (result i32) (i32.const 3))
  544. + (func (result i32) (i32.const 4)) ;; index 4
  545. (table $t0 30 30 funcref)
  546. (table $t1 30 30 funcref)
  547. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  548. @@ -1302,11 +1303,11 @@
  549. (module
  550. (type (func (result i32))) ;; type #0
  551. - (import "a" "ef0" (func (result i32))) ;; index 0
  552. - (import "a" "ef1" (func (result i32)))
  553. - (import "a" "ef2" (func (result i32)))
  554. - (import "a" "ef3" (func (result i32)))
  555. - (import "a" "ef4" (func (result i32))) ;; index 4
  556. + (func (result i32) (i32.const 0)) ;; index 0
  557. + (func (result i32) (i32.const 1))
  558. + (func (result i32) (i32.const 2))
  559. + (func (result i32) (i32.const 3))
  560. + (func (result i32) (i32.const 4)) ;; index 4
  561. (table $t0 30 30 funcref)
  562. (table $t1 30 30 funcref)
  563. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  564. @@ -1394,11 +1395,11 @@
  565. (module
  566. (type (func (result i32))) ;; type #0
  567. - (import "a" "ef0" (func (result i32))) ;; index 0
  568. - (import "a" "ef1" (func (result i32)))
  569. - (import "a" "ef2" (func (result i32)))
  570. - (import "a" "ef3" (func (result i32)))
  571. - (import "a" "ef4" (func (result i32))) ;; index 4
  572. + (func (result i32) (i32.const 0)) ;; index 0
  573. + (func (result i32) (i32.const 1))
  574. + (func (result i32) (i32.const 2))
  575. + (func (result i32) (i32.const 3))
  576. + (func (result i32) (i32.const 4)) ;; index 4
  577. (table $t0 30 30 funcref)
  578. (table $t1 30 30 funcref)
  579. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  580. @@ -1486,11 +1487,11 @@
  581. (module
  582. (type (func (result i32))) ;; type #0
  583. - (import "a" "ef0" (func (result i32))) ;; index 0
  584. - (import "a" "ef1" (func (result i32)))
  585. - (import "a" "ef2" (func (result i32)))
  586. - (import "a" "ef3" (func (result i32)))
  587. - (import "a" "ef4" (func (result i32))) ;; index 4
  588. + (func (result i32) (i32.const 0)) ;; index 0
  589. + (func (result i32) (i32.const 1))
  590. + (func (result i32) (i32.const 2))
  591. + (func (result i32) (i32.const 3))
  592. + (func (result i32) (i32.const 4)) ;; index 4
  593. (table $t0 30 30 funcref)
  594. (table $t1 30 30 funcref)
  595. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  596. @@ -1578,11 +1579,11 @@
  597. (module
  598. (type (func (result i32))) ;; type #0
  599. - (import "a" "ef0" (func (result i32))) ;; index 0
  600. - (import "a" "ef1" (func (result i32)))
  601. - (import "a" "ef2" (func (result i32)))
  602. - (import "a" "ef3" (func (result i32)))
  603. - (import "a" "ef4" (func (result i32))) ;; index 4
  604. + (func (result i32) (i32.const 0)) ;; index 0
  605. + (func (result i32) (i32.const 1))
  606. + (func (result i32) (i32.const 2))
  607. + (func (result i32) (i32.const 3))
  608. + (func (result i32) (i32.const 4)) ;; index 4
  609. (table $t0 30 30 funcref)
  610. (table $t1 30 30 funcref)
  611. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  612. diff --git a/test/core/table_init.wast b/test/core/table_init.wast
  613. index 0b2d26f..bdab6a0 100644
  614. --- a/test/core/table_init.wast
  615. +++ b/test/core/table_init.wast
  616. @@ -14,11 +14,12 @@
  617. (module
  618. (type (func (result i32))) ;; type #0
  619. - (import "a" "ef0" (func (result i32))) ;; index 0
  620. - (import "a" "ef1" (func (result i32)))
  621. - (import "a" "ef2" (func (result i32)))
  622. - (import "a" "ef3" (func (result i32)))
  623. - (import "a" "ef4" (func (result i32))) ;; index 4
  624. + ;; aot mode does not support module linking
  625. + (func (result i32) (i32.const 0)) ;; index 0
  626. + (func (result i32) (i32.const 1))
  627. + (func (result i32) (i32.const 2))
  628. + (func (result i32) (i32.const 3))
  629. + (func (result i32) (i32.const 4)) ;; index 4
  630. (table $t0 30 30 funcref)
  631. (table $t1 30 30 funcref)
  632. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  633. @@ -72,11 +73,12 @@
  634. (module
  635. (type (func (result i32))) ;; type #0
  636. - (import "a" "ef0" (func (result i32))) ;; index 0
  637. - (import "a" "ef1" (func (result i32)))
  638. - (import "a" "ef2" (func (result i32)))
  639. - (import "a" "ef3" (func (result i32)))
  640. - (import "a" "ef4" (func (result i32))) ;; index 4
  641. + ;; aot mode does not support module linking
  642. + (func (result i32) (i32.const 0)) ;; index 0
  643. + (func (result i32) (i32.const 1))
  644. + (func (result i32) (i32.const 2))
  645. + (func (result i32) (i32.const 3))
  646. + (func (result i32) (i32.const 4)) ;; index 4
  647. (table $t0 30 30 funcref)
  648. (table $t1 30 30 funcref)
  649. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  650. @@ -130,11 +132,12 @@
  651. (module
  652. (type (func (result i32))) ;; type #0
  653. - (import "a" "ef0" (func (result i32))) ;; index 0
  654. - (import "a" "ef1" (func (result i32)))
  655. - (import "a" "ef2" (func (result i32)))
  656. - (import "a" "ef3" (func (result i32)))
  657. - (import "a" "ef4" (func (result i32))) ;; index 4
  658. + ;; aot mode does not support module linking
  659. + (func (result i32) (i32.const 0)) ;; index 0
  660. + (func (result i32) (i32.const 1))
  661. + (func (result i32) (i32.const 2))
  662. + (func (result i32) (i32.const 3))
  663. + (func (result i32) (i32.const 4)) ;; index 4
  664. (table $t0 30 30 funcref)
  665. (table $t1 30 30 funcref)
  666. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  667. @@ -196,11 +199,12 @@
  668. (module
  669. (type (func (result i32))) ;; type #0
  670. - (import "a" "ef0" (func (result i32))) ;; index 0
  671. - (import "a" "ef1" (func (result i32)))
  672. - (import "a" "ef2" (func (result i32)))
  673. - (import "a" "ef3" (func (result i32)))
  674. - (import "a" "ef4" (func (result i32))) ;; index 4
  675. + ;; aot mode does not support module linking
  676. + (func (result i32) (i32.const 0)) ;; index 0
  677. + (func (result i32) (i32.const 1))
  678. + (func (result i32) (i32.const 2))
  679. + (func (result i32) (i32.const 3))
  680. + (func (result i32) (i32.const 4)) ;; index 4
  681. (table $t0 30 30 funcref)
  682. (table $t1 30 30 funcref)
  683. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  684. @@ -254,11 +258,12 @@
  685. (module
  686. (type (func (result i32))) ;; type #0
  687. - (import "a" "ef0" (func (result i32))) ;; index 0
  688. - (import "a" "ef1" (func (result i32)))
  689. - (import "a" "ef2" (func (result i32)))
  690. - (import "a" "ef3" (func (result i32)))
  691. - (import "a" "ef4" (func (result i32))) ;; index 4
  692. + ;; aot mode does not support module linking
  693. + (func (result i32) (i32.const 0)) ;; index 0
  694. + (func (result i32) (i32.const 1))
  695. + (func (result i32) (i32.const 2))
  696. + (func (result i32) (i32.const 3))
  697. + (func (result i32) (i32.const 4)) ;; index 4
  698. (table $t0 30 30 funcref)
  699. (table $t1 30 30 funcref)
  700. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  701. @@ -312,11 +317,12 @@
  702. (module
  703. (type (func (result i32))) ;; type #0
  704. - (import "a" "ef0" (func (result i32))) ;; index 0
  705. - (import "a" "ef1" (func (result i32)))
  706. - (import "a" "ef2" (func (result i32)))
  707. - (import "a" "ef3" (func (result i32)))
  708. - (import "a" "ef4" (func (result i32))) ;; index 4
  709. + ;; aot mode does not support module linking
  710. + (func (result i32) (i32.const 0)) ;; index 0
  711. + (func (result i32) (i32.const 1))
  712. + (func (result i32) (i32.const 2))
  713. + (func (result i32) (i32.const 3))
  714. + (func (result i32) (i32.const 4)) ;; index 4
  715. (table $t0 30 30 funcref)
  716. (table $t1 30 30 funcref)
  717. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  718. diff --git a/test/core/unreached-valid.wast b/test/core/unreached-valid.wast
  719. index b7ebabf..4f2abfb 100644
  720. --- a/test/core/unreached-valid.wast
  721. +++ b/test/core/unreached-valid.wast
  722. @@ -46,6 +46,7 @@
  723. ;; Validation after unreachable
  724. +(;
  725. (module
  726. (func (export "meet-bottom")
  727. (block (result f64)
  728. @@ -61,3 +62,4 @@
  729. )
  730. (assert_trap (invoke "meet-bottom") "unreachable")
  731. +;)