memory64_ignore_cases.patch 27 KB

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