extended_const.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. diff --git a/test/core/elem.wast b/test/core/elem.wast
  2. index 92dab52..3954bca 100644
  3. --- a/test/core/elem.wast
  4. +++ b/test/core/elem.wast
  5. @@ -571,6 +571,7 @@
  6. ;; Element sections across multiple modules change the same table
  7. +(;
  8. (module $module1
  9. (type $out-i32 (func (result i32)))
  10. (table (export "shared-table") 10 funcref)
  11. @@ -620,7 +621,7 @@
  12. (assert_return (invoke $module1 "call-7") (i32.const 67))
  13. (assert_return (invoke $module1 "call-8") (i32.const 69))
  14. (assert_return (invoke $module1 "call-9") (i32.const 70))
  15. -
  16. +;)
  17. ;; Element segments must match element type of table
  18. (assert_invalid
  19. @@ -659,24 +660,30 @@
  20. (func (export "set") (param $i i32) (param $x externref)
  21. (table.set $t (local.get $i) (local.get $x))))
  22. -(register "exporter" $m)
  23. +;; (register "exporter" $m)
  24. -(assert_return (invoke $m "get" (i32.const 0)) (ref.null extern))
  25. -(assert_return (invoke $m "get" (i32.const 1)) (ref.null extern))
  26. +;; (assert_return (invoke $m "get" (i32.const 0)) (ref.null extern))
  27. +;; (assert_return (invoke $m "get" (i32.const 1)) (ref.null extern))
  28. +(assert_return (invoke "get" (i32.const 0)) (ref.null extern))
  29. +(assert_return (invoke "get" (i32.const 1)) (ref.null extern))
  30. -(assert_return (invoke $m "set" (i32.const 0) (ref.extern 42)))
  31. -(assert_return (invoke $m "set" (i32.const 1) (ref.extern 137)))
  32. -
  33. -(assert_return (invoke $m "get" (i32.const 0)) (ref.extern 42))
  34. -(assert_return (invoke $m "get" (i32.const 1)) (ref.extern 137))
  35. +;; (assert_return (invoke $m "set" (i32.const 0) (ref.extern 42)))
  36. +;; (assert_return (invoke $m "set" (i32.const 1) (ref.extern 137)))
  37. +(assert_return (invoke "set" (i32.const 0) (ref.extern 42)))
  38. +(assert_return (invoke "set" (i32.const 1) (ref.extern 137)))
  39. +;; (assert_return (invoke $m "get" (i32.const 0)) (ref.extern 42))
  40. +;; (assert_return (invoke $m "get" (i32.const 1)) (ref.extern 137))
  41. +(assert_return (invoke "get" (i32.const 0)) (ref.extern 42))
  42. +(assert_return (invoke "get" (i32.const 1)) (ref.extern 137))
  43. +(;
  44. (module
  45. (import "exporter" "table" (table $t 2 externref))
  46. (elem (i32.const 0) externref (ref.null extern)))
  47. (assert_return (invoke $m "get" (i32.const 0)) (ref.null extern))
  48. (assert_return (invoke $m "get" (i32.const 1)) (ref.extern 137))
  49. -
  50. +;)
  51. ;; Initializing a table with imported funcref global
  52. (module $module4
  53. @@ -686,6 +693,7 @@
  54. (global (export "f") funcref (ref.func 0))
  55. )
  56. +(;
  57. (register "module4" $module4)
  58. (module
  59. @@ -699,6 +707,7 @@
  60. )
  61. (assert_return (invoke "call_imported_elem") (i32.const 42))
  62. +;)
  63. ;; Extended contant expressions
  64. diff --git a/test/core/ref_func.wast b/test/core/ref_func.wast
  65. index adb5cb7..6396013 100644
  66. --- a/test/core/ref_func.wast
  67. +++ b/test/core/ref_func.wast
  68. @@ -4,7 +4,7 @@
  69. (register "M")
  70. (module
  71. - (func $f (import "M" "f") (param i32) (result i32))
  72. + (func $f (param $x i32) (result i32) (local.get $x))
  73. (func $g (param $x i32) (result i32)
  74. (i32.add (local.get $x) (i32.const 1))
  75. )
  76. diff --git a/test/core/table_copy.wast b/test/core/table_copy.wast
  77. index 380e84e..59230cf 100644
  78. --- a/test/core/table_copy.wast
  79. +++ b/test/core/table_copy.wast
  80. @@ -14,11 +14,11 @@
  81. (module
  82. (type (func (result i32))) ;; type #0
  83. - (import "a" "ef0" (func (result i32))) ;; index 0
  84. - (import "a" "ef1" (func (result i32)))
  85. - (import "a" "ef2" (func (result i32)))
  86. - (import "a" "ef3" (func (result i32)))
  87. - (import "a" "ef4" (func (result i32))) ;; index 4
  88. + (func (result i32) (i32.const 0)) ;; index 0
  89. + (func (result i32) (i32.const 1))
  90. + (func (result i32) (i32.const 2))
  91. + (func (result i32) (i32.const 3))
  92. + (func (result i32) (i32.const 4)) ;; index 4
  93. (table $t0 30 30 funcref)
  94. (table $t1 30 30 funcref)
  95. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  96. @@ -106,11 +106,11 @@
  97. (module
  98. (type (func (result i32))) ;; type #0
  99. - (import "a" "ef0" (func (result i32))) ;; index 0
  100. - (import "a" "ef1" (func (result i32)))
  101. - (import "a" "ef2" (func (result i32)))
  102. - (import "a" "ef3" (func (result i32)))
  103. - (import "a" "ef4" (func (result i32))) ;; index 4
  104. + (func (result i32) (i32.const 0)) ;; index 0
  105. + (func (result i32) (i32.const 1))
  106. + (func (result i32) (i32.const 2))
  107. + (func (result i32) (i32.const 3))
  108. + (func (result i32) (i32.const 4)) ;; index 4
  109. (table $t0 30 30 funcref)
  110. (table $t1 30 30 funcref)
  111. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  112. @@ -198,11 +198,11 @@
  113. (module
  114. (type (func (result i32))) ;; type #0
  115. - (import "a" "ef0" (func (result i32))) ;; index 0
  116. - (import "a" "ef1" (func (result i32)))
  117. - (import "a" "ef2" (func (result i32)))
  118. - (import "a" "ef3" (func (result i32)))
  119. - (import "a" "ef4" (func (result i32))) ;; index 4
  120. + (func (result i32) (i32.const 0)) ;; index 0
  121. + (func (result i32) (i32.const 1))
  122. + (func (result i32) (i32.const 2))
  123. + (func (result i32) (i32.const 3))
  124. + (func (result i32) (i32.const 4)) ;; index 4
  125. (table $t0 30 30 funcref)
  126. (table $t1 30 30 funcref)
  127. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  128. @@ -290,11 +290,11 @@
  129. (module
  130. (type (func (result i32))) ;; type #0
  131. - (import "a" "ef0" (func (result i32))) ;; index 0
  132. - (import "a" "ef1" (func (result i32)))
  133. - (import "a" "ef2" (func (result i32)))
  134. - (import "a" "ef3" (func (result i32)))
  135. - (import "a" "ef4" (func (result i32))) ;; index 4
  136. + (func (result i32) (i32.const 0)) ;; index 0
  137. + (func (result i32) (i32.const 1))
  138. + (func (result i32) (i32.const 2))
  139. + (func (result i32) (i32.const 3))
  140. + (func (result i32) (i32.const 4)) ;; index 4
  141. (table $t0 30 30 funcref)
  142. (table $t1 30 30 funcref)
  143. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  144. @@ -382,11 +382,11 @@
  145. (module
  146. (type (func (result i32))) ;; type #0
  147. - (import "a" "ef0" (func (result i32))) ;; index 0
  148. - (import "a" "ef1" (func (result i32)))
  149. - (import "a" "ef2" (func (result i32)))
  150. - (import "a" "ef3" (func (result i32)))
  151. - (import "a" "ef4" (func (result i32))) ;; index 4
  152. + (func (result i32) (i32.const 0)) ;; index 0
  153. + (func (result i32) (i32.const 1))
  154. + (func (result i32) (i32.const 2))
  155. + (func (result i32) (i32.const 3))
  156. + (func (result i32) (i32.const 4)) ;; index 4
  157. (table $t0 30 30 funcref)
  158. (table $t1 30 30 funcref)
  159. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  160. @@ -474,11 +474,11 @@
  161. (module
  162. (type (func (result i32))) ;; type #0
  163. - (import "a" "ef0" (func (result i32))) ;; index 0
  164. - (import "a" "ef1" (func (result i32)))
  165. - (import "a" "ef2" (func (result i32)))
  166. - (import "a" "ef3" (func (result i32)))
  167. - (import "a" "ef4" (func (result i32))) ;; index 4
  168. + (func (result i32) (i32.const 0)) ;; index 0
  169. + (func (result i32) (i32.const 1))
  170. + (func (result i32) (i32.const 2))
  171. + (func (result i32) (i32.const 3))
  172. + (func (result i32) (i32.const 4)) ;; index 4
  173. (table $t0 30 30 funcref)
  174. (table $t1 30 30 funcref)
  175. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  176. @@ -566,11 +566,11 @@
  177. (module
  178. (type (func (result i32))) ;; type #0
  179. - (import "a" "ef0" (func (result i32))) ;; index 0
  180. - (import "a" "ef1" (func (result i32)))
  181. - (import "a" "ef2" (func (result i32)))
  182. - (import "a" "ef3" (func (result i32)))
  183. - (import "a" "ef4" (func (result i32))) ;; index 4
  184. + (func (result i32) (i32.const 0)) ;; index 0
  185. + (func (result i32) (i32.const 1))
  186. + (func (result i32) (i32.const 2))
  187. + (func (result i32) (i32.const 3))
  188. + (func (result i32) (i32.const 4)) ;; index 4
  189. (table $t0 30 30 funcref)
  190. (table $t1 30 30 funcref)
  191. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  192. @@ -658,11 +658,11 @@
  193. (module
  194. (type (func (result i32))) ;; type #0
  195. - (import "a" "ef0" (func (result i32))) ;; index 0
  196. - (import "a" "ef1" (func (result i32)))
  197. - (import "a" "ef2" (func (result i32)))
  198. - (import "a" "ef3" (func (result i32)))
  199. - (import "a" "ef4" (func (result i32))) ;; index 4
  200. + (func (result i32) (i32.const 0)) ;; index 0
  201. + (func (result i32) (i32.const 1))
  202. + (func (result i32) (i32.const 2))
  203. + (func (result i32) (i32.const 3))
  204. + (func (result i32) (i32.const 4)) ;; index 4
  205. (table $t0 30 30 funcref)
  206. (table $t1 30 30 funcref)
  207. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  208. @@ -750,11 +750,11 @@
  209. (module
  210. (type (func (result i32))) ;; type #0
  211. - (import "a" "ef0" (func (result i32))) ;; index 0
  212. - (import "a" "ef1" (func (result i32)))
  213. - (import "a" "ef2" (func (result i32)))
  214. - (import "a" "ef3" (func (result i32)))
  215. - (import "a" "ef4" (func (result i32))) ;; index 4
  216. + (func (result i32) (i32.const 0)) ;; index 0
  217. + (func (result i32) (i32.const 1))
  218. + (func (result i32) (i32.const 2))
  219. + (func (result i32) (i32.const 3))
  220. + (func (result i32) (i32.const 4)) ;; index 4
  221. (table $t0 30 30 funcref)
  222. (table $t1 30 30 funcref)
  223. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  224. @@ -842,11 +842,11 @@
  225. (module
  226. (type (func (result i32))) ;; type #0
  227. - (import "a" "ef0" (func (result i32))) ;; index 0
  228. - (import "a" "ef1" (func (result i32)))
  229. - (import "a" "ef2" (func (result i32)))
  230. - (import "a" "ef3" (func (result i32)))
  231. - (import "a" "ef4" (func (result i32))) ;; index 4
  232. + (func (result i32) (i32.const 0)) ;; index 0
  233. + (func (result i32) (i32.const 1))
  234. + (func (result i32) (i32.const 2))
  235. + (func (result i32) (i32.const 3))
  236. + (func (result i32) (i32.const 4)) ;; index 4
  237. (table $t0 30 30 funcref)
  238. (table $t1 30 30 funcref)
  239. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  240. @@ -934,11 +934,11 @@
  241. (module
  242. (type (func (result i32))) ;; type #0
  243. - (import "a" "ef0" (func (result i32))) ;; index 0
  244. - (import "a" "ef1" (func (result i32)))
  245. - (import "a" "ef2" (func (result i32)))
  246. - (import "a" "ef3" (func (result i32)))
  247. - (import "a" "ef4" (func (result i32))) ;; index 4
  248. + (func (result i32) (i32.const 0)) ;; index 0
  249. + (func (result i32) (i32.const 1))
  250. + (func (result i32) (i32.const 2))
  251. + (func (result i32) (i32.const 3))
  252. + (func (result i32) (i32.const 4)) ;; index 4
  253. (table $t0 30 30 funcref)
  254. (table $t1 30 30 funcref)
  255. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  256. @@ -1026,11 +1026,11 @@
  257. (module
  258. (type (func (result i32))) ;; type #0
  259. - (import "a" "ef0" (func (result i32))) ;; index 0
  260. - (import "a" "ef1" (func (result i32)))
  261. - (import "a" "ef2" (func (result i32)))
  262. - (import "a" "ef3" (func (result i32)))
  263. - (import "a" "ef4" (func (result i32))) ;; index 4
  264. + (func (result i32) (i32.const 0)) ;; index 0
  265. + (func (result i32) (i32.const 1))
  266. + (func (result i32) (i32.const 2))
  267. + (func (result i32) (i32.const 3))
  268. + (func (result i32) (i32.const 4)) ;; index 4
  269. (table $t0 30 30 funcref)
  270. (table $t1 30 30 funcref)
  271. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  272. @@ -1118,11 +1118,11 @@
  273. (module
  274. (type (func (result i32))) ;; type #0
  275. - (import "a" "ef0" (func (result i32))) ;; index 0
  276. - (import "a" "ef1" (func (result i32)))
  277. - (import "a" "ef2" (func (result i32)))
  278. - (import "a" "ef3" (func (result i32)))
  279. - (import "a" "ef4" (func (result i32))) ;; index 4
  280. + (func (result i32) (i32.const 0)) ;; index 0
  281. + (func (result i32) (i32.const 1))
  282. + (func (result i32) (i32.const 2))
  283. + (func (result i32) (i32.const 3))
  284. + (func (result i32) (i32.const 4)) ;; index 4
  285. (table $t0 30 30 funcref)
  286. (table $t1 30 30 funcref)
  287. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  288. @@ -1210,11 +1210,11 @@
  289. (module
  290. (type (func (result i32))) ;; type #0
  291. - (import "a" "ef0" (func (result i32))) ;; index 0
  292. - (import "a" "ef1" (func (result i32)))
  293. - (import "a" "ef2" (func (result i32)))
  294. - (import "a" "ef3" (func (result i32)))
  295. - (import "a" "ef4" (func (result i32))) ;; index 4
  296. + (func (result i32) (i32.const 0)) ;; index 0
  297. + (func (result i32) (i32.const 1))
  298. + (func (result i32) (i32.const 2))
  299. + (func (result i32) (i32.const 3))
  300. + (func (result i32) (i32.const 4)) ;; index 4
  301. (table $t0 30 30 funcref)
  302. (table $t1 30 30 funcref)
  303. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  304. @@ -1302,11 +1302,11 @@
  305. (module
  306. (type (func (result i32))) ;; type #0
  307. - (import "a" "ef0" (func (result i32))) ;; index 0
  308. - (import "a" "ef1" (func (result i32)))
  309. - (import "a" "ef2" (func (result i32)))
  310. - (import "a" "ef3" (func (result i32)))
  311. - (import "a" "ef4" (func (result i32))) ;; index 4
  312. + (func (result i32) (i32.const 0)) ;; index 0
  313. + (func (result i32) (i32.const 1))
  314. + (func (result i32) (i32.const 2))
  315. + (func (result i32) (i32.const 3))
  316. + (func (result i32) (i32.const 4)) ;; index 4
  317. (table $t0 30 30 funcref)
  318. (table $t1 30 30 funcref)
  319. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  320. @@ -1394,11 +1394,11 @@
  321. (module
  322. (type (func (result i32))) ;; type #0
  323. - (import "a" "ef0" (func (result i32))) ;; index 0
  324. - (import "a" "ef1" (func (result i32)))
  325. - (import "a" "ef2" (func (result i32)))
  326. - (import "a" "ef3" (func (result i32)))
  327. - (import "a" "ef4" (func (result i32))) ;; index 4
  328. + (func (result i32) (i32.const 0)) ;; index 0
  329. + (func (result i32) (i32.const 1))
  330. + (func (result i32) (i32.const 2))
  331. + (func (result i32) (i32.const 3))
  332. + (func (result i32) (i32.const 4)) ;; index 4
  333. (table $t0 30 30 funcref)
  334. (table $t1 30 30 funcref)
  335. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  336. @@ -1486,11 +1486,11 @@
  337. (module
  338. (type (func (result i32))) ;; type #0
  339. - (import "a" "ef0" (func (result i32))) ;; index 0
  340. - (import "a" "ef1" (func (result i32)))
  341. - (import "a" "ef2" (func (result i32)))
  342. - (import "a" "ef3" (func (result i32)))
  343. - (import "a" "ef4" (func (result i32))) ;; index 4
  344. + (func (result i32) (i32.const 0)) ;; index 0
  345. + (func (result i32) (i32.const 1))
  346. + (func (result i32) (i32.const 2))
  347. + (func (result i32) (i32.const 3))
  348. + (func (result i32) (i32.const 4)) ;; index 4
  349. (table $t0 30 30 funcref)
  350. (table $t1 30 30 funcref)
  351. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  352. @@ -1578,11 +1578,11 @@
  353. (module
  354. (type (func (result i32))) ;; type #0
  355. - (import "a" "ef0" (func (result i32))) ;; index 0
  356. - (import "a" "ef1" (func (result i32)))
  357. - (import "a" "ef2" (func (result i32)))
  358. - (import "a" "ef3" (func (result i32)))
  359. - (import "a" "ef4" (func (result i32))) ;; index 4
  360. + (func (result i32) (i32.const 0)) ;; index 0
  361. + (func (result i32) (i32.const 1))
  362. + (func (result i32) (i32.const 2))
  363. + (func (result i32) (i32.const 3))
  364. + (func (result i32) (i32.const 4)) ;; index 4
  365. (table $t0 30 30 funcref)
  366. (table $t1 30 30 funcref)
  367. (elem (table $t1) (i32.const 2) func 3 1 4 1)
  368. diff --git a/test/core/table_init.wast b/test/core/table_init.wast
  369. index 0b2d26f..3c595e5 100644
  370. --- a/test/core/table_init.wast
  371. +++ b/test/core/table_init.wast
  372. @@ -14,11 +14,11 @@
  373. (module
  374. (type (func (result i32))) ;; type #0
  375. - (import "a" "ef0" (func (result i32))) ;; index 0
  376. - (import "a" "ef1" (func (result i32)))
  377. - (import "a" "ef2" (func (result i32)))
  378. - (import "a" "ef3" (func (result i32)))
  379. - (import "a" "ef4" (func (result i32))) ;; index 4
  380. + (func (result i32) (i32.const 0)) ;; index 0
  381. + (func (result i32) (i32.const 1))
  382. + (func (result i32) (i32.const 2))
  383. + (func (result i32) (i32.const 3))
  384. + (func (result i32) (i32.const 4)) ;; index 4
  385. (table $t0 30 30 funcref)
  386. (table $t1 30 30 funcref)
  387. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  388. @@ -72,11 +72,11 @@
  389. (module
  390. (type (func (result i32))) ;; type #0
  391. - (import "a" "ef0" (func (result i32))) ;; index 0
  392. - (import "a" "ef1" (func (result i32)))
  393. - (import "a" "ef2" (func (result i32)))
  394. - (import "a" "ef3" (func (result i32)))
  395. - (import "a" "ef4" (func (result i32))) ;; index 4
  396. + (func (result i32) (i32.const 0)) ;; index 0
  397. + (func (result i32) (i32.const 1))
  398. + (func (result i32) (i32.const 2))
  399. + (func (result i32) (i32.const 3))
  400. + (func (result i32) (i32.const 4)) ;; index 4
  401. (table $t0 30 30 funcref)
  402. (table $t1 30 30 funcref)
  403. (elem (table $t0) (i32.const 2) func 3 1 4 1)
  404. @@ -130,11 +130,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. @@ -196,11 +196,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 $t1) (i32.const 2) func 3 1 4 1)
  436. @@ -254,11 +254,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 $t1) (i32.const 2) func 3 1 4 1)
  452. @@ -312,11 +312,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 $t1) (i32.const 2) func 3 1 4 1)