ignore_cases.patch 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  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/table_copy.wast b/test/core/table_copy.wast
  302. index 380e84e..f37e745 100644
  303. --- a/test/core/table_copy.wast
  304. +++ b/test/core/table_copy.wast
  305. @@ -14,11 +14,12 @@
  306. (module
  307. (type (func (result i32))) ;; type #0
  308. - (import "a" "ef0" (func (result i32))) ;; index 0
  309. - (import "a" "ef1" (func (result i32)))
  310. - (import "a" "ef2" (func (result i32)))
  311. - (import "a" "ef3" (func (result i32)))
  312. - (import "a" "ef4" (func (result i32))) ;; index 4
  313. + ;; aot mode does not support module linking
  314. + (func (result i32) (i32.const 0)) ;; index 0
  315. + (func (result i32) (i32.const 1))
  316. + (func (result i32) (i32.const 2))
  317. + (func (result i32) (i32.const 3))
  318. + (func (result i32) (i32.const 4)) ;; index 4
  319. (table $t0 30 30 funcref)
  320. (table $t1 30 30 funcref)
  321. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  322. @@ -106,11 +107,11 @@
  323. (module
  324. (type (func (result i32))) ;; type #0
  325. - (import "a" "ef0" (func (result i32))) ;; index 0
  326. - (import "a" "ef1" (func (result i32)))
  327. - (import "a" "ef2" (func (result i32)))
  328. - (import "a" "ef3" (func (result i32)))
  329. - (import "a" "ef4" (func (result i32))) ;; index 4
  330. + (func (export "ef0") (result i32) (i32.const 0)) ;; index 0
  331. + (func (export "ef1") (result i32) (i32.const 1))
  332. + (func (export "ef2") (result i32) (i32.const 2))
  333. + (func (export "ef3") (result i32) (i32.const 3))
  334. + (func (export "ef4") (result i32) (i32.const 4)) ;; index 4
  335. (table $t0 30 30 funcref)
  336. (table $t1 30 30 funcref)
  337. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  338. @@ -198,11 +199,11 @@
  339. (module
  340. (type (func (result i32))) ;; type #0
  341. - (import "a" "ef0" (func (result i32))) ;; index 0
  342. - (import "a" "ef1" (func (result i32)))
  343. - (import "a" "ef2" (func (result i32)))
  344. - (import "a" "ef3" (func (result i32)))
  345. - (import "a" "ef4" (func (result i32))) ;; index 4
  346. + (func (result i32) (i32.const 0)) ;; index 0
  347. + (func (result i32) (i32.const 1))
  348. + (func (result i32) (i32.const 2))
  349. + (func (result i32) (i32.const 3))
  350. + (func (result i32) (i32.const 4)) ;; index 4
  351. (table $t0 30 30 funcref)
  352. (table $t1 30 30 funcref)
  353. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  354. @@ -290,11 +291,11 @@
  355. (module
  356. (type (func (result i32))) ;; type #0
  357. - (import "a" "ef0" (func (result i32))) ;; index 0
  358. - (import "a" "ef1" (func (result i32)))
  359. - (import "a" "ef2" (func (result i32)))
  360. - (import "a" "ef3" (func (result i32)))
  361. - (import "a" "ef4" (func (result i32))) ;; index 4
  362. + (func (result i32) (i32.const 0)) ;; index 0
  363. + (func (result i32) (i32.const 1))
  364. + (func (result i32) (i32.const 2))
  365. + (func (result i32) (i32.const 3))
  366. + (func (result i32) (i32.const 4)) ;; index 4
  367. (table $t0 30 30 funcref)
  368. (table $t1 30 30 funcref)
  369. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  370. @@ -382,11 +383,11 @@
  371. (module
  372. (type (func (result i32))) ;; type #0
  373. - (import "a" "ef0" (func (result i32))) ;; index 0
  374. - (import "a" "ef1" (func (result i32)))
  375. - (import "a" "ef2" (func (result i32)))
  376. - (import "a" "ef3" (func (result i32)))
  377. - (import "a" "ef4" (func (result i32))) ;; index 4
  378. + (func (result i32) (i32.const 0)) ;; index 0
  379. + (func (result i32) (i32.const 1))
  380. + (func (result i32) (i32.const 2))
  381. + (func (result i32) (i32.const 3))
  382. + (func (result i32) (i32.const 4)) ;; index 4
  383. (table $t0 30 30 funcref)
  384. (table $t1 30 30 funcref)
  385. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  386. @@ -474,11 +475,11 @@
  387. (module
  388. (type (func (result i32))) ;; type #0
  389. - (import "a" "ef0" (func (result i32))) ;; index 0
  390. - (import "a" "ef1" (func (result i32)))
  391. - (import "a" "ef2" (func (result i32)))
  392. - (import "a" "ef3" (func (result i32)))
  393. - (import "a" "ef4" (func (result i32))) ;; index 4
  394. + (func (result i32) (i32.const 0)) ;; index 0
  395. + (func (result i32) (i32.const 1))
  396. + (func (result i32) (i32.const 2))
  397. + (func (result i32) (i32.const 3))
  398. + (func (result i32) (i32.const 4)) ;; index 4
  399. (table $t0 30 30 funcref)
  400. (table $t1 30 30 funcref)
  401. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  402. @@ -566,11 +567,11 @@
  403. (module
  404. (type (func (result i32))) ;; type #0
  405. - (import "a" "ef0" (func (result i32))) ;; index 0
  406. - (import "a" "ef1" (func (result i32)))
  407. - (import "a" "ef2" (func (result i32)))
  408. - (import "a" "ef3" (func (result i32)))
  409. - (import "a" "ef4" (func (result i32))) ;; index 4
  410. + (func (result i32) (i32.const 0)) ;; index 0
  411. + (func (result i32) (i32.const 1))
  412. + (func (result i32) (i32.const 2))
  413. + (func (result i32) (i32.const 3))
  414. + (func (result i32) (i32.const 4)) ;; index 4
  415. (table $t0 30 30 funcref)
  416. (table $t1 30 30 funcref)
  417. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  418. @@ -658,11 +659,11 @@
  419. (module
  420. (type (func (result i32))) ;; type #0
  421. - (import "a" "ef0" (func (result i32))) ;; index 0
  422. - (import "a" "ef1" (func (result i32)))
  423. - (import "a" "ef2" (func (result i32)))
  424. - (import "a" "ef3" (func (result i32)))
  425. - (import "a" "ef4" (func (result i32))) ;; index 4
  426. + (func (result i32) (i32.const 0)) ;; index 0
  427. + (func (result i32) (i32.const 1))
  428. + (func (result i32) (i32.const 2))
  429. + (func (result i32) (i32.const 3))
  430. + (func (result i32) (i32.const 4)) ;; index 4
  431. (table $t0 30 30 funcref)
  432. (table $t1 30 30 funcref)
  433. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  434. @@ -750,11 +751,11 @@
  435. (module
  436. (type (func (result i32))) ;; type #0
  437. - (import "a" "ef0" (func (result i32))) ;; index 0
  438. - (import "a" "ef1" (func (result i32)))
  439. - (import "a" "ef2" (func (result i32)))
  440. - (import "a" "ef3" (func (result i32)))
  441. - (import "a" "ef4" (func (result i32))) ;; index 4
  442. + (func (result i32) (i32.const 0)) ;; index 0
  443. + (func (result i32) (i32.const 1))
  444. + (func (result i32) (i32.const 2))
  445. + (func (result i32) (i32.const 3))
  446. + (func (result i32) (i32.const 4)) ;; index 4
  447. (table $t0 30 30 funcref)
  448. (table $t1 30 30 funcref)
  449. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  450. @@ -842,11 +843,11 @@
  451. (module
  452. (type (func (result i32))) ;; type #0
  453. - (import "a" "ef0" (func (result i32))) ;; index 0
  454. - (import "a" "ef1" (func (result i32)))
  455. - (import "a" "ef2" (func (result i32)))
  456. - (import "a" "ef3" (func (result i32)))
  457. - (import "a" "ef4" (func (result i32))) ;; index 4
  458. + (func (result i32) (i32.const 0)) ;; index 0
  459. + (func (result i32) (i32.const 1))
  460. + (func (result i32) (i32.const 2))
  461. + (func (result i32) (i32.const 3))
  462. + (func (result i32) (i32.const 4)) ;; index 4
  463. (table $t0 30 30 funcref)
  464. (table $t1 30 30 funcref)
  465. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  466. @@ -934,11 +935,11 @@
  467. (module
  468. (type (func (result i32))) ;; type #0
  469. - (import "a" "ef0" (func (result i32))) ;; index 0
  470. - (import "a" "ef1" (func (result i32)))
  471. - (import "a" "ef2" (func (result i32)))
  472. - (import "a" "ef3" (func (result i32)))
  473. - (import "a" "ef4" (func (result i32))) ;; index 4
  474. + (func (result i32) (i32.const 0)) ;; index 0
  475. + (func (result i32) (i32.const 1))
  476. + (func (result i32) (i32.const 2))
  477. + (func (result i32) (i32.const 3))
  478. + (func (result i32) (i32.const 4)) ;; index 4
  479. (table $t0 30 30 funcref)
  480. (table $t1 30 30 funcref)
  481. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  482. @@ -1026,11 +1027,11 @@
  483. (module
  484. (type (func (result i32))) ;; type #0
  485. - (import "a" "ef0" (func (result i32))) ;; index 0
  486. - (import "a" "ef1" (func (result i32)))
  487. - (import "a" "ef2" (func (result i32)))
  488. - (import "a" "ef3" (func (result i32)))
  489. - (import "a" "ef4" (func (result i32))) ;; index 4
  490. + (func (result i32) (i32.const 0)) ;; index 0
  491. + (func (result i32) (i32.const 1))
  492. + (func (result i32) (i32.const 2))
  493. + (func (result i32) (i32.const 3))
  494. + (func (result i32) (i32.const 4)) ;; index 4
  495. (table $t0 30 30 funcref)
  496. (table $t1 30 30 funcref)
  497. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  498. @@ -1118,11 +1119,11 @@
  499. (module
  500. (type (func (result i32))) ;; type #0
  501. - (import "a" "ef0" (func (result i32))) ;; index 0
  502. - (import "a" "ef1" (func (result i32)))
  503. - (import "a" "ef2" (func (result i32)))
  504. - (import "a" "ef3" (func (result i32)))
  505. - (import "a" "ef4" (func (result i32))) ;; index 4
  506. + (func (result i32) (i32.const 0)) ;; index 0
  507. + (func (result i32) (i32.const 1))
  508. + (func (result i32) (i32.const 2))
  509. + (func (result i32) (i32.const 3))
  510. + (func (result i32) (i32.const 4)) ;; index 4
  511. (table $t0 30 30 funcref)
  512. (table $t1 30 30 funcref)
  513. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  514. @@ -1210,11 +1211,11 @@
  515. (module
  516. (type (func (result i32))) ;; type #0
  517. - (import "a" "ef0" (func (result i32))) ;; index 0
  518. - (import "a" "ef1" (func (result i32)))
  519. - (import "a" "ef2" (func (result i32)))
  520. - (import "a" "ef3" (func (result i32)))
  521. - (import "a" "ef4" (func (result i32))) ;; index 4
  522. + (func (result i32) (i32.const 0)) ;; index 0
  523. + (func (result i32) (i32.const 1))
  524. + (func (result i32) (i32.const 2))
  525. + (func (result i32) (i32.const 3))
  526. + (func (result i32) (i32.const 4)) ;; index 4
  527. (table $t0 30 30 funcref)
  528. (table $t1 30 30 funcref)
  529. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  530. @@ -1302,11 +1303,11 @@
  531. (module
  532. (type (func (result i32))) ;; type #0
  533. - (import "a" "ef0" (func (result i32))) ;; index 0
  534. - (import "a" "ef1" (func (result i32)))
  535. - (import "a" "ef2" (func (result i32)))
  536. - (import "a" "ef3" (func (result i32)))
  537. - (import "a" "ef4" (func (result i32))) ;; index 4
  538. + (func (result i32) (i32.const 0)) ;; index 0
  539. + (func (result i32) (i32.const 1))
  540. + (func (result i32) (i32.const 2))
  541. + (func (result i32) (i32.const 3))
  542. + (func (result i32) (i32.const 4)) ;; index 4
  543. (table $t0 30 30 funcref)
  544. (table $t1 30 30 funcref)
  545. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  546. @@ -1394,11 +1395,11 @@
  547. (module
  548. (type (func (result i32))) ;; type #0
  549. - (import "a" "ef0" (func (result i32))) ;; index 0
  550. - (import "a" "ef1" (func (result i32)))
  551. - (import "a" "ef2" (func (result i32)))
  552. - (import "a" "ef3" (func (result i32)))
  553. - (import "a" "ef4" (func (result i32))) ;; index 4
  554. + (func (result i32) (i32.const 0)) ;; index 0
  555. + (func (result i32) (i32.const 1))
  556. + (func (result i32) (i32.const 2))
  557. + (func (result i32) (i32.const 3))
  558. + (func (result i32) (i32.const 4)) ;; index 4
  559. (table $t0 30 30 funcref)
  560. (table $t1 30 30 funcref)
  561. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  562. @@ -1486,11 +1487,11 @@
  563. (module
  564. (type (func (result i32))) ;; type #0
  565. - (import "a" "ef0" (func (result i32))) ;; index 0
  566. - (import "a" "ef1" (func (result i32)))
  567. - (import "a" "ef2" (func (result i32)))
  568. - (import "a" "ef3" (func (result i32)))
  569. - (import "a" "ef4" (func (result i32))) ;; index 4
  570. + (func (result i32) (i32.const 0)) ;; index 0
  571. + (func (result i32) (i32.const 1))
  572. + (func (result i32) (i32.const 2))
  573. + (func (result i32) (i32.const 3))
  574. + (func (result i32) (i32.const 4)) ;; index 4
  575. (table $t0 30 30 funcref)
  576. (table $t1 30 30 funcref)
  577. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  578. @@ -1578,11 +1579,11 @@
  579. (module
  580. (type (func (result i32))) ;; type #0
  581. - (import "a" "ef0" (func (result i32))) ;; index 0
  582. - (import "a" "ef1" (func (result i32)))
  583. - (import "a" "ef2" (func (result i32)))
  584. - (import "a" "ef3" (func (result i32)))
  585. - (import "a" "ef4" (func (result i32))) ;; index 4
  586. + (func (result i32) (i32.const 0)) ;; index 0
  587. + (func (result i32) (i32.const 1))
  588. + (func (result i32) (i32.const 2))
  589. + (func (result i32) (i32.const 3))
  590. + (func (result i32) (i32.const 4)) ;; index 4
  591. (table $t0 30 30 funcref)
  592. (table $t1 30 30 funcref)
  593. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  594. diff --git a/test/core/table_init.wast b/test/core/table_init.wast
  595. index 0b2d26f..bdab6a0 100644
  596. --- a/test/core/table_init.wast
  597. +++ b/test/core/table_init.wast
  598. @@ -14,11 +14,12 @@
  599. (module
  600. (type (func (result i32))) ;; type #0
  601. - (import "a" "ef0" (func (result i32))) ;; index 0
  602. - (import "a" "ef1" (func (result i32)))
  603. - (import "a" "ef2" (func (result i32)))
  604. - (import "a" "ef3" (func (result i32)))
  605. - (import "a" "ef4" (func (result i32))) ;; index 4
  606. + ;; aot mode does not support module linking
  607. + (func (result i32) (i32.const 0)) ;; index 0
  608. + (func (result i32) (i32.const 1))
  609. + (func (result i32) (i32.const 2))
  610. + (func (result i32) (i32.const 3))
  611. + (func (result i32) (i32.const 4)) ;; index 4
  612. (table $t0 30 30 funcref)
  613. (table $t1 30 30 funcref)
  614. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  615. @@ -72,11 +73,12 @@
  616. (module
  617. (type (func (result i32))) ;; type #0
  618. - (import "a" "ef0" (func (result i32))) ;; index 0
  619. - (import "a" "ef1" (func (result i32)))
  620. - (import "a" "ef2" (func (result i32)))
  621. - (import "a" "ef3" (func (result i32)))
  622. - (import "a" "ef4" (func (result i32))) ;; index 4
  623. + ;; aot mode does not support module linking
  624. + (func (result i32) (i32.const 0)) ;; index 0
  625. + (func (result i32) (i32.const 1))
  626. + (func (result i32) (i32.const 2))
  627. + (func (result i32) (i32.const 3))
  628. + (func (result i32) (i32.const 4)) ;; index 4
  629. (table $t0 30 30 funcref)
  630. (table $t1 30 30 funcref)
  631. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  632. @@ -130,11 +132,12 @@
  633. (module
  634. (type (func (result i32))) ;; type #0
  635. - (import "a" "ef0" (func (result i32))) ;; index 0
  636. - (import "a" "ef1" (func (result i32)))
  637. - (import "a" "ef2" (func (result i32)))
  638. - (import "a" "ef3" (func (result i32)))
  639. - (import "a" "ef4" (func (result i32))) ;; index 4
  640. + ;; aot mode does not support module linking
  641. + (func (result i32) (i32.const 0)) ;; index 0
  642. + (func (result i32) (i32.const 1))
  643. + (func (result i32) (i32.const 2))
  644. + (func (result i32) (i32.const 3))
  645. + (func (result i32) (i32.const 4)) ;; index 4
  646. (table $t0 30 30 funcref)
  647. (table $t1 30 30 funcref)
  648. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  649. @@ -196,11 +199,12 @@
  650. (module
  651. (type (func (result i32))) ;; type #0
  652. - (import "a" "ef0" (func (result i32))) ;; index 0
  653. - (import "a" "ef1" (func (result i32)))
  654. - (import "a" "ef2" (func (result i32)))
  655. - (import "a" "ef3" (func (result i32)))
  656. - (import "a" "ef4" (func (result i32))) ;; index 4
  657. + ;; aot mode does not support module linking
  658. + (func (result i32) (i32.const 0)) ;; index 0
  659. + (func (result i32) (i32.const 1))
  660. + (func (result i32) (i32.const 2))
  661. + (func (result i32) (i32.const 3))
  662. + (func (result i32) (i32.const 4)) ;; index 4
  663. (table $t0 30 30 funcref)
  664. (table $t1 30 30 funcref)
  665. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  666. @@ -254,11 +258,12 @@
  667. (module
  668. (type (func (result i32))) ;; type #0
  669. - (import "a" "ef0" (func (result i32))) ;; index 0
  670. - (import "a" "ef1" (func (result i32)))
  671. - (import "a" "ef2" (func (result i32)))
  672. - (import "a" "ef3" (func (result i32)))
  673. - (import "a" "ef4" (func (result i32))) ;; index 4
  674. + ;; aot mode does not support module linking
  675. + (func (result i32) (i32.const 0)) ;; index 0
  676. + (func (result i32) (i32.const 1))
  677. + (func (result i32) (i32.const 2))
  678. + (func (result i32) (i32.const 3))
  679. + (func (result i32) (i32.const 4)) ;; index 4
  680. (table $t0 30 30 funcref)
  681. (table $t1 30 30 funcref)
  682. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  683. @@ -312,11 +317,12 @@
  684. (module
  685. (type (func (result i32))) ;; type #0
  686. - (import "a" "ef0" (func (result i32))) ;; index 0
  687. - (import "a" "ef1" (func (result i32)))
  688. - (import "a" "ef2" (func (result i32)))
  689. - (import "a" "ef3" (func (result i32)))
  690. - (import "a" "ef4" (func (result i32))) ;; index 4
  691. + ;; aot mode does not support module linking
  692. + (func (result i32) (i32.const 0)) ;; index 0
  693. + (func (result i32) (i32.const 1))
  694. + (func (result i32) (i32.const 2))
  695. + (func (result i32) (i32.const 3))
  696. + (func (result i32) (i32.const 4)) ;; index 4
  697. (table $t0 30 30 funcref)
  698. (table $t1 30 30 funcref)
  699. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  700. diff --git a/test/core/unreached-valid.wast b/test/core/unreached-valid.wast
  701. index b7ebabf..4f2abfb 100644
  702. --- a/test/core/unreached-valid.wast
  703. +++ b/test/core/unreached-valid.wast
  704. @@ -46,6 +46,7 @@
  705. ;; Validation after unreachable
  706. +(;
  707. (module
  708. (func (export "meet-bottom")
  709. (block (result f64)
  710. @@ -61,3 +62,4 @@
  711. )
  712. (assert_trap (invoke "meet-bottom") "unreachable")
  713. +;)