memory64_ignore_cases.patch 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859
  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 4f339be..0b5b3e6 100644
  67. --- a/test/core/data.wast
  68. +++ b/test/core/data.wast
  69. @@ -306,9 +306,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. @@ -317,7 +318,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. @@ -328,7 +329,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. @@ -348,7 +349,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. @@ -368,8 +369,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..dd1106c 100644
  115. --- a/test/core/elem.wast
  116. +++ b/test/core/elem.wast
  117. @@ -562,6 +562,7 @@
  118. (assert_return (invoke $module1 "call-8") (i32.const 65))
  119. (assert_return (invoke $module1 "call-9") (i32.const 66))
  120. +(;
  121. (module $module2
  122. (type $out-i32 (func (result i32)))
  123. (import "module1" "shared-table" (table 10 funcref))
  124. @@ -574,7 +575,9 @@
  125. (assert_return (invoke $module1 "call-7") (i32.const 67))
  126. (assert_return (invoke $module1 "call-8") (i32.const 68))
  127. (assert_return (invoke $module1 "call-9") (i32.const 66))
  128. +;)
  129. +(;
  130. (module $module3
  131. (type $out-i32 (func (result i32)))
  132. (import "module1" "shared-table" (table 10 funcref))
  133. @@ -587,3 +590,4 @@
  134. (assert_return (invoke $module1 "call-7") (i32.const 67))
  135. (assert_return (invoke $module1 "call-8") (i32.const 69))
  136. (assert_return (invoke $module1 "call-9") (i32.const 70))
  137. +;)
  138. diff --git a/test/core/global.wast b/test/core/global.wast
  139. index e40a305..8f8f25b 100644
  140. --- a/test/core/global.wast
  141. +++ b/test/core/global.wast
  142. @@ -328,10 +328,12 @@
  143. "type mismatch"
  144. )
  145. +(;
  146. (assert_invalid
  147. (module (global (import "" "") externref) (global funcref (global.get 0)))
  148. "type mismatch"
  149. )
  150. +;)
  151. (assert_invalid
  152. (module (global (import "test" "global-i32") i32) (global i32 (global.get 0) (global.get 0)))
  153. diff --git a/test/core/if.wast b/test/core/if.wast
  154. index 2ea45f6..b6dd504 100644
  155. --- a/test/core/if.wast
  156. +++ b/test/core/if.wast
  157. @@ -527,11 +527,12 @@
  158. ;; Atypical folded condition syntax
  159. - (func (export "atypical-condition")
  160. - i32.const 0
  161. - (if (then) (else))
  162. - (if (i32.const 1) (i32.eqz) (then) (else))
  163. - )
  164. + ;; FIXME: uncomment me if the next wabt can compile it w/o error
  165. + ;; (func (export "atypical-condition")
  166. + ;; i32.const 0
  167. + ;; (if (then) (else))
  168. + ;; (if (i32.const 1) (i32.eqz) (then) (else))
  169. + ;; )
  170. )
  171. (assert_return (invoke "empty" (i32.const 0)))
  172. @@ -730,7 +731,7 @@
  173. (assert_return (invoke "type-use"))
  174. -(assert_return (invoke "atypical-condition"))
  175. +;; (assert_return (invoke "atypical-condition"))
  176. (assert_malformed
  177. (module quote
  178. diff --git a/test/core/imports.wast b/test/core/imports.wast
  179. index 69f76a0..a3844c6 100644
  180. --- a/test/core/imports.wast
  181. +++ b/test/core/imports.wast
  182. @@ -572,6 +572,7 @@
  183. (assert_return (invoke "grow" (i32.const 1)) (i32.const -1))
  184. (assert_return (invoke "grow" (i32.const 0)) (i32.const 2))
  185. +(; unsupported by multi-module currently
  186. (module $Mgm
  187. (memory (export "memory") 1) ;; initial size is 1
  188. (func (export "grow") (result i32) (memory.grow (i32.const 1)))
  189. @@ -591,6 +592,7 @@
  190. (func (export "size") (result i32) (memory.size))
  191. )
  192. (assert_return (invoke $Mgim2 "size") (i32.const 3))
  193. +;)
  194. ;; Syntax errors
  195. diff --git a/test/core/linking.wast b/test/core/linking.wast
  196. index 994e0f4..d0bfb5f 100644
  197. --- a/test/core/linking.wast
  198. +++ b/test/core/linking.wast
  199. @@ -64,6 +64,7 @@
  200. (export "Mg.set_mut" (func $set_mut))
  201. )
  202. +(;
  203. (assert_return (get $Mg "glob") (i32.const 42))
  204. (assert_return (get $Ng "Mg.glob") (i32.const 42))
  205. (assert_return (get $Ng "glob") (i32.const 43))
  206. @@ -81,6 +82,7 @@
  207. (assert_return (get $Ng "Mg.mut_glob") (i32.const 241))
  208. (assert_return (invoke $Mg "get_mut") (i32.const 241))
  209. (assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
  210. +;)
  211. (assert_unlinkable
  212. @@ -165,6 +167,7 @@
  213. )
  214. )
  215. +(;
  216. (assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4))
  217. (assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4))
  218. (assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
  219. @@ -187,6 +190,7 @@
  220. (assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4))
  221. (assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call type mismatch")
  222. +;)
  223. (module $Ot
  224. (type (func (result i32)))
  225. @@ -201,6 +205,7 @@
  226. )
  227. )
  228. +(;
  229. (assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4))
  230. (assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4))
  231. (assert_return (invoke $Nt "call Mt.call" (i32.const 3)) (i32.const 4))
  232. @@ -225,6 +230,7 @@
  233. (assert_trap (invoke $Ot "call" (i32.const 0)) "uninitialized element")
  234. (assert_trap (invoke $Ot "call" (i32.const 20)) "undefined element")
  235. +;)
  236. (module
  237. (table (import "Mt" "tab") 0 funcref)
  238. @@ -263,6 +269,7 @@
  239. ;; Unlike in the v1 spec, active element segments stored before an
  240. ;; out-of-bounds access persist after the instantiation failure.
  241. +(;
  242. (assert_trap
  243. (module
  244. (table (import "Mt" "tab") 10 funcref)
  245. @@ -274,7 +281,9 @@
  246. )
  247. (assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
  248. (assert_trap (invoke $Mt "call" (i32.const 8)) "uninitialized element")
  249. +;)
  250. +(;
  251. (assert_trap
  252. (module
  253. (table (import "Mt" "tab") 10 funcref)
  254. @@ -286,6 +295,7 @@
  255. "out of bounds memory access"
  256. )
  257. (assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
  258. +;)
  259. (module $Mtable_ex
  260. @@ -299,6 +309,7 @@
  261. (table (import "Mtable_ex" "t-extern") 1 externref)
  262. )
  263. +(;
  264. (assert_unlinkable
  265. (module (table (import "Mtable_ex" "t-func") 1 externref))
  266. "incompatible import type"
  267. @@ -307,6 +318,7 @@
  268. (module (table (import "Mtable_ex" "t-extern") 1 funcref))
  269. "incompatible import type"
  270. )
  271. +;)
  272. ;; Memories
  273. @@ -346,10 +358,12 @@
  274. )
  275. )
  276. +(;
  277. (assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7))
  278. (assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7))
  279. (assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
  280. (assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7))
  281. +;)
  282. (module
  283. (memory (import "Mm" "mem") 0)
  284. @@ -372,6 +386,7 @@
  285. )
  286. )
  287. +(;
  288. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1))
  289. (assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1))
  290. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 3))
  291. @@ -380,6 +395,7 @@
  292. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
  293. (assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1))
  294. (assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
  295. +;)
  296. (assert_unlinkable
  297. (module
  298. @@ -403,8 +419,10 @@
  299. )
  300. "out of bounds memory access"
  301. )
  302. +(;
  303. (assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
  304. (assert_return (invoke $Mm "load" (i32.const 327670)) (i32.const 0))
  305. +;)
  306. (assert_trap
  307. (module
  308. @@ -416,7 +434,9 @@
  309. )
  310. "out of bounds table access"
  311. )
  312. +(;
  313. (assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
  314. +;)
  315. ;; Store is modified if the start function traps.
  316. (module $Ms
  317. @@ -432,6 +452,7 @@
  318. )
  319. (register "Ms" $Ms)
  320. +(;
  321. (assert_trap
  322. (module
  323. (import "Ms" "memory" (memory 1))
  324. @@ -451,3 +472,4 @@
  325. (assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h'
  326. (assert_return (invoke $Ms "get table[0]") (i32.const 0xdead))
  327. +;)
  328. diff --git a/test/core/memory.wast b/test/core/memory.wast
  329. index 1dd5b84..497b69f 100644
  330. --- a/test/core/memory.wast
  331. +++ b/test/core/memory.wast
  332. @@ -76,17 +76,17 @@
  333. "memory size must be at most 65536 pages (4GiB)"
  334. )
  335. -(assert_invalid
  336. +(assert_malformed
  337. (module quote "(memory 0x1_0000_0000)")
  338. - "memory size must be at most 65536 pages (4GiB)"
  339. + "i32 constant out of range"
  340. )
  341. -(assert_invalid
  342. +(assert_malformed
  343. (module quote "(memory 0x1_0000_0000 0x1_0000_0000)")
  344. - "memory size must be at most 65536 pages (4GiB)"
  345. + "i32 constant out of range"
  346. )
  347. -(assert_invalid
  348. +(assert_malformed
  349. (module quote "(memory 0 0x1_0000_0000)")
  350. - "memory size must be at most 65536 pages (4GiB)"
  351. + "i32 constant out of range"
  352. )
  353. (module
  354. diff --git a/test/core/ref_func.wast b/test/core/ref_func.wast
  355. index adb5cb7..590f626 100644
  356. --- a/test/core/ref_func.wast
  357. +++ b/test/core/ref_func.wast
  358. @@ -4,7 +4,8 @@
  359. (register "M")
  360. (module
  361. - (func $f (import "M" "f") (param i32) (result i32))
  362. + (; aot mode does not support module linking ;)
  363. + (func $f (param $x i32) (result i32) (local.get $x))
  364. (func $g (param $x i32) (result i32)
  365. (i32.add (local.get $x) (i32.const 1))
  366. )
  367. diff --git a/test/core/table_copy.wast b/test/core/table_copy.wast
  368. index 380e84e..f37e745 100644
  369. --- a/test/core/table_copy.wast
  370. +++ b/test/core/table_copy.wast
  371. @@ -14,11 +14,12 @@
  372. (module
  373. (type (func (result i32))) ;; type #0
  374. - (import "a" "ef0" (func (result i32))) ;; index 0
  375. - (import "a" "ef1" (func (result i32)))
  376. - (import "a" "ef2" (func (result i32)))
  377. - (import "a" "ef3" (func (result i32)))
  378. - (import "a" "ef4" (func (result i32))) ;; index 4
  379. + ;; aot mode does not support module linking
  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. @@ -106,11 +107,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 (export "ef0") (result i32) (i32.const 0)) ;; index 0
  397. + (func (export "ef1") (result i32) (i32.const 1))
  398. + (func (export "ef2") (result i32) (i32.const 2))
  399. + (func (export "ef3") (result i32) (i32.const 3))
  400. + (func (export "ef4") (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. @@ -198,11 +199,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. @@ -290,11 +291,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. @@ -382,11 +383,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. @@ -474,11 +475,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. @@ -566,11 +567,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 $t0) (i32.const 2) func 3 1 4 1)
  484. @@ -658,11 +659,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 $t0) (i32.const 2) func 3 1 4 1)
  500. @@ -750,11 +751,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 $t0) (i32.const 2) func 3 1 4 1)
  516. @@ -842,11 +843,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. @@ -934,11 +935,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. @@ -1026,11 +1027,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. @@ -1118,11 +1119,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. @@ -1210,11 +1211,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. @@ -1302,11 +1303,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. @@ -1394,11 +1395,11 @@
  613. (module
  614. (type (func (result i32))) ;; type #0
  615. - (import "a" "ef0" (func (result i32))) ;; index 0
  616. - (import "a" "ef1" (func (result i32)))
  617. - (import "a" "ef2" (func (result i32)))
  618. - (import "a" "ef3" (func (result i32)))
  619. - (import "a" "ef4" (func (result i32))) ;; index 4
  620. + (func (result i32) (i32.const 0)) ;; index 0
  621. + (func (result i32) (i32.const 1))
  622. + (func (result i32) (i32.const 2))
  623. + (func (result i32) (i32.const 3))
  624. + (func (result i32) (i32.const 4)) ;; index 4
  625. (table $t0 30 30 funcref)
  626. (table $t1 30 30 funcref)
  627. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  628. @@ -1486,11 +1487,11 @@
  629. (module
  630. (type (func (result i32))) ;; type #0
  631. - (import "a" "ef0" (func (result i32))) ;; index 0
  632. - (import "a" "ef1" (func (result i32)))
  633. - (import "a" "ef2" (func (result i32)))
  634. - (import "a" "ef3" (func (result i32)))
  635. - (import "a" "ef4" (func (result i32))) ;; index 4
  636. + (func (result i32) (i32.const 0)) ;; index 0
  637. + (func (result i32) (i32.const 1))
  638. + (func (result i32) (i32.const 2))
  639. + (func (result i32) (i32.const 3))
  640. + (func (result i32) (i32.const 4)) ;; index 4
  641. (table $t0 30 30 funcref)
  642. (table $t1 30 30 funcref)
  643. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  644. @@ -1578,11 +1579,11 @@
  645. (module
  646. (type (func (result i32))) ;; type #0
  647. - (import "a" "ef0" (func (result i32))) ;; index 0
  648. - (import "a" "ef1" (func (result i32)))
  649. - (import "a" "ef2" (func (result i32)))
  650. - (import "a" "ef3" (func (result i32)))
  651. - (import "a" "ef4" (func (result i32))) ;; index 4
  652. + (func (result i32) (i32.const 0)) ;; index 0
  653. + (func (result i32) (i32.const 1))
  654. + (func (result i32) (i32.const 2))
  655. + (func (result i32) (i32.const 3))
  656. + (func (result i32) (i32.const 4)) ;; index 4
  657. (table $t0 30 30 funcref)
  658. (table $t1 30 30 funcref)
  659. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  660. diff --git a/test/core/table_init.wast b/test/core/table_init.wast
  661. index 0b2d26f..bdab6a0 100644
  662. --- a/test/core/table_init.wast
  663. +++ b/test/core/table_init.wast
  664. @@ -14,11 +14,12 @@
  665. (module
  666. (type (func (result i32))) ;; type #0
  667. - (import "a" "ef0" (func (result i32))) ;; index 0
  668. - (import "a" "ef1" (func (result i32)))
  669. - (import "a" "ef2" (func (result i32)))
  670. - (import "a" "ef3" (func (result i32)))
  671. - (import "a" "ef4" (func (result i32))) ;; index 4
  672. + ;; aot mode does not support module linking
  673. + (func (result i32) (i32.const 0)) ;; index 0
  674. + (func (result i32) (i32.const 1))
  675. + (func (result i32) (i32.const 2))
  676. + (func (result i32) (i32.const 3))
  677. + (func (result i32) (i32.const 4)) ;; index 4
  678. (table $t0 30 30 funcref)
  679. (table $t1 30 30 funcref)
  680. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  681. @@ -72,11 +73,12 @@
  682. (module
  683. (type (func (result i32))) ;; type #0
  684. - (import "a" "ef0" (func (result i32))) ;; index 0
  685. - (import "a" "ef1" (func (result i32)))
  686. - (import "a" "ef2" (func (result i32)))
  687. - (import "a" "ef3" (func (result i32)))
  688. - (import "a" "ef4" (func (result i32))) ;; index 4
  689. + ;; aot mode does not support module linking
  690. + (func (result i32) (i32.const 0)) ;; index 0
  691. + (func (result i32) (i32.const 1))
  692. + (func (result i32) (i32.const 2))
  693. + (func (result i32) (i32.const 3))
  694. + (func (result i32) (i32.const 4)) ;; index 4
  695. (table $t0 30 30 funcref)
  696. (table $t1 30 30 funcref)
  697. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  698. @@ -130,11 +132,12 @@
  699. (module
  700. (type (func (result i32))) ;; type #0
  701. - (import "a" "ef0" (func (result i32))) ;; index 0
  702. - (import "a" "ef1" (func (result i32)))
  703. - (import "a" "ef2" (func (result i32)))
  704. - (import "a" "ef3" (func (result i32)))
  705. - (import "a" "ef4" (func (result i32))) ;; index 4
  706. + ;; aot mode does not support module linking
  707. + (func (result i32) (i32.const 0)) ;; index 0
  708. + (func (result i32) (i32.const 1))
  709. + (func (result i32) (i32.const 2))
  710. + (func (result i32) (i32.const 3))
  711. + (func (result i32) (i32.const 4)) ;; index 4
  712. (table $t0 30 30 funcref)
  713. (table $t1 30 30 funcref)
  714. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  715. @@ -196,11 +199,12 @@
  716. (module
  717. (type (func (result i32))) ;; type #0
  718. - (import "a" "ef0" (func (result i32))) ;; index 0
  719. - (import "a" "ef1" (func (result i32)))
  720. - (import "a" "ef2" (func (result i32)))
  721. - (import "a" "ef3" (func (result i32)))
  722. - (import "a" "ef4" (func (result i32))) ;; index 4
  723. + ;; aot mode does not support module linking
  724. + (func (result i32) (i32.const 0)) ;; index 0
  725. + (func (result i32) (i32.const 1))
  726. + (func (result i32) (i32.const 2))
  727. + (func (result i32) (i32.const 3))
  728. + (func (result i32) (i32.const 4)) ;; index 4
  729. (table $t0 30 30 funcref)
  730. (table $t1 30 30 funcref)
  731. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  732. @@ -254,11 +258,12 @@
  733. (module
  734. (type (func (result i32))) ;; type #0
  735. - (import "a" "ef0" (func (result i32))) ;; index 0
  736. - (import "a" "ef1" (func (result i32)))
  737. - (import "a" "ef2" (func (result i32)))
  738. - (import "a" "ef3" (func (result i32)))
  739. - (import "a" "ef4" (func (result i32))) ;; index 4
  740. + ;; aot mode does not support module linking
  741. + (func (result i32) (i32.const 0)) ;; index 0
  742. + (func (result i32) (i32.const 1))
  743. + (func (result i32) (i32.const 2))
  744. + (func (result i32) (i32.const 3))
  745. + (func (result i32) (i32.const 4)) ;; index 4
  746. (table $t0 30 30 funcref)
  747. (table $t1 30 30 funcref)
  748. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  749. @@ -312,11 +317,12 @@
  750. (module
  751. (type (func (result i32))) ;; type #0
  752. - (import "a" "ef0" (func (result i32))) ;; index 0
  753. - (import "a" "ef1" (func (result i32)))
  754. - (import "a" "ef2" (func (result i32)))
  755. - (import "a" "ef3" (func (result i32)))
  756. - (import "a" "ef4" (func (result i32))) ;; index 4
  757. + ;; aot mode does not support module linking
  758. + (func (result i32) (i32.const 0)) ;; index 0
  759. + (func (result i32) (i32.const 1))
  760. + (func (result i32) (i32.const 2))
  761. + (func (result i32) (i32.const 3))
  762. + (func (result i32) (i32.const 4)) ;; index 4
  763. (table $t0 30 30 funcref)
  764. (table $t1 30 30 funcref)
  765. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  766. diff --git a/test/core/unreached-valid.wast b/test/core/unreached-valid.wast
  767. index b7ebabf..4f2abfb 100644
  768. --- a/test/core/unreached-valid.wast
  769. +++ b/test/core/unreached-valid.wast
  770. @@ -46,6 +46,7 @@
  771. ;; Validation after unreachable
  772. +(;
  773. (module
  774. (func (export "meet-bottom")
  775. (block (result f64)
  776. @@ -61,3 +62,4 @@
  777. )
  778. (assert_trap (invoke "meet-bottom") "unreachable")
  779. +;)