Skip to content

Commit 404b7e7

Browse files
authored
[interpreter/test] Fix validation for elem.drop (WebAssembly#137)
1 parent 11388e7 commit 404b7e7

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

interpreter/valid/valid.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ let rec check_instr (c : context) (e : instr) (s : infer_stack_type) : op_type =
261261
[I32Type; I32Type; I32Type] --> []
262262

263263
| ElemDrop x ->
264-
ignore (table c (0l @@ e.at));
265264
ignore (elem c x);
266265
[] --> []
267266

@@ -295,7 +294,6 @@ let rec check_instr (c : context) (e : instr) (s : infer_stack_type) : op_type =
295294
[I32Type; I32Type; I32Type] --> []
296295

297296
| DataDrop x ->
298-
ignore (memory c (0l @@ e.at));
299297
ignore (data c x);
300298
[] --> []
301299

test/core/memory_init.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
(module
190190
(func (export "test")
191191
(data.drop 0)))
192-
"unknown memory 0")
192+
"unknown data segment")
193193

194194
(assert_invalid
195195
(module

test/core/table_init.wast

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
(module
194194
(func (export "test")
195195
(elem.drop 0)))
196-
"unknown table 0")
196+
"unknown elem segment 0")
197197

198198
(assert_invalid
199199
(module
@@ -207,7 +207,7 @@
207207
(func (result i32) (i32.const 0))
208208
(func (export "test")
209209
(elem.drop 4)))
210-
"unknown table 0")
210+
"unknown elem segment 4")
211211

212212
(assert_invalid
213213
(module

0 commit comments

Comments
 (0)