|
1 | | -diff --git a/test/core/imports.wast b/test/core/imports.wast |
2 | | -index 0cc07cb..4e8367a 100644 |
3 | | ---- a/test/core/imports.wast |
4 | | -+++ b/test/core/imports.wast |
5 | | -@@ -86,7 +86,7 @@ |
6 | | - (assert_return (invoke "print64" (i64.const 24))) |
7 | | - |
8 | | - (assert_invalid |
9 | | -- (module |
10 | | -+ (module |
11 | | - (type (func (result i32))) |
12 | | - (import "test" "func" (func (type 1))) |
13 | | - ) |
14 | | -@@ -578,6 +578,7 @@ |
15 | | - (assert_return (invoke "grow" (i32.const 1)) (i32.const -1)) |
16 | | - (assert_return (invoke "grow" (i32.const 0)) (i32.const 2)) |
17 | | - |
18 | | -+(; |
19 | | - (module $Mgm |
20 | | - (memory (export "memory") 1) ;; initial size is 1 |
21 | | - (func (export "grow") (result i32) (memory.grow (i32.const 1))) |
22 | | -@@ -586,7 +587,7 @@ |
23 | | - (assert_return (invoke $Mgm "grow") (i32.const 1)) ;; now size is 2 |
24 | | - (module $Mgim1 |
25 | | - ;; imported memory limits should match, because external memory size is 2 now |
26 | | -- (memory (export "memory") (import "grown-memory" "memory") 2) |
27 | | -+ (memory (export "memory") (import "grown-memory" "memory") 2) |
28 | | - (func (export "grow") (result i32) (memory.grow (i32.const 1))) |
29 | | - ) |
30 | | - (register "grown-imported-memory" $Mgim1) |
31 | | -@@ -597,7 +598,7 @@ |
32 | | - (func (export "size") (result i32) (memory.size)) |
33 | | - ) |
34 | | - (assert_return (invoke $Mgim2 "size") (i32.const 3)) |
35 | | -- |
36 | | -+;) |
37 | | - |
38 | | - ;; Syntax errors |
39 | | - |
40 | | -@@ -669,6 +670,7 @@ |
41 | | - "import after memory" |
42 | | - ) |
43 | | - |
44 | | -+(; |
45 | | - ;; This module is required to validate, regardless of whether it can be |
46 | | - ;; linked. Overloading is not possible in wasm itself, but it is possible |
47 | | - ;; in modules from which wasm can import. |
48 | | -@@ -695,3 +697,4 @@ |
49 | | - ) |
50 | | - "unknown import" |
51 | | - ) |
52 | | -+;) |
53 | | -\ No newline at end of file |
54 | 1 | diff --git a/test/core/linking.wast b/test/core/linking.wast |
55 | | -index 994e0f4..8fbcc02 100644 |
| 2 | +index 8fbcc02..a2254b3 100644 |
56 | 3 | --- a/test/core/linking.wast |
57 | 4 | +++ b/test/core/linking.wast |
58 | | -@@ -19,11 +19,11 @@ |
59 | | - (assert_return (invoke $Nf "call") (i32.const 3)) |
60 | | - (assert_return (invoke $Nf "call Mf.call") (i32.const 2)) |
61 | | - |
62 | | --(module |
63 | | -+(module $M1 |
| 5 | +@@ -23,6 +23,8 @@ |
64 | 6 | (import "spectest" "print_i32" (func $f (param i32))) |
65 | 7 | (export "print" (func $f)) |
66 | 8 | ) |
67 | | --(register "reexport_f") |
68 | | -+(register "reexport_f" $M1) |
| 9 | ++ |
| 10 | ++(; doesn't support empty files |
| 11 | + (register "reexport_f" $M1) |
69 | 12 | (assert_unlinkable |
70 | 13 | (module (import "reexport_f" "print" (func (param i64)))) |
| 14 | +@@ -32,9 +34,11 @@ |
| 15 | + (module (import "reexport_f" "print" (func (param i32) (result i32)))) |
71 | 16 | "incompatible import type" |
72 | | -@@ -35,7 +35,6 @@ |
| 17 | + ) |
| 18 | ++;) |
73 | 19 |
|
74 | 20 |
|
75 | 21 | ;; Globals |
76 | | -- |
| 22 | ++(; aot doesn't support to import globals |
77 | 23 | (module $Mg |
78 | 24 | (global $glob (export "glob") i32 (i32.const 42)) |
79 | 25 | (func (export "get") (result i32) (global.get $glob)) |
80 | | -@@ -47,6 +46,7 @@ |
| 26 | +@@ -45,6 +49,7 @@ |
| 27 | + (func (export "set_mut") (param i32) (global.set $mut_glob (local.get 0))) |
81 | 28 | ) |
82 | 29 | (register "Mg" $Mg) |
| 30 | ++;) |
83 | 31 |
|
84 | | -+(; only sharing initial values |
| 32 | + (; only sharing initial values |
85 | 33 | (module $Ng |
86 | | - (global $x (import "Mg" "glob") i32) |
87 | | - (global $mut_glob (import "Mg" "mut_glob") (mut i32)) |
88 | | -@@ -81,7 +81,7 @@ |
89 | | - (assert_return (get $Ng "Mg.mut_glob") (i32.const 241)) |
90 | | - (assert_return (invoke $Mg "get_mut") (i32.const 241)) |
| 34 | +@@ -83,6 +88,7 @@ |
91 | 35 | (assert_return (invoke $Ng "Mg.get_mut") (i32.const 241)) |
92 | | -- |
93 | | -+;) |
| 36 | + ;) |
94 | 37 |
|
| 38 | ++(; |
95 | 39 | (assert_unlinkable |
96 | 40 | (module (import "Mg" "mut_glob" (global i32))) |
97 | | -@@ -130,7 +130,7 @@ |
98 | | - |
| 41 | + "incompatible import type" |
| 42 | +@@ -92,7 +98,6 @@ |
| 43 | + "incompatible import type" |
| 44 | + ) |
99 | 45 |
|
100 | | - ;; Tables |
101 | 46 | - |
102 | | -+(; no such support |
103 | | - (module $Mt |
104 | | - (type (func (result i32))) |
105 | | - (type (func)) |
106 | | -@@ -307,10 +307,11 @@ |
107 | | - (module (table (import "Mtable_ex" "t-extern") 1 funcref)) |
| 47 | + (module $Mref_ex |
| 48 | + (global (export "g-const-func") funcref (ref.null func)) |
| 49 | + (global (export "g-var-func") (mut funcref) (ref.null func)) |
| 50 | +@@ -127,6 +132,7 @@ |
| 51 | + (module (global (import "Mref_ex" "g-var-extern") (mut funcref))) |
108 | 52 | "incompatible import type" |
109 | 53 | ) |
110 | 54 | +;) |
111 | 55 |
|
112 | 56 |
|
113 | | - ;; Memories |
114 | | -- |
115 | | -+(; no such support |
116 | | - (module $Mm |
117 | | - (memory (export "mem") 1 5) |
118 | | - (data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09") |
119 | | -@@ -451,3 +452,4 @@ |
120 | | - |
121 | | - (assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h' |
122 | | - (assert_return (invoke $Ms "get table[0]") (i32.const 0xdead)) |
123 | | -+;) |
124 | | -\ No newline at end of file |
| 57 | + ;; Tables |
0 commit comments