summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-06-22 13:06:29 -0700
committerGitHub <noreply@github.com>2021-06-22 13:06:29 -0700
commit950042585626bc639c4b330bd47c7b9be4e11bac (patch)
tree686779003eb850260a004678e5d5663ba19d0c43 /test
parentc6cd63316ac53208900cda4d1089a22618b85256 (diff)
downloadwabt-950042585626bc639c4b330bd47c7b9be4e11bac.tar.gz
wabt-950042585626bc639c4b330bd47c7b9be4e11bac.tar.bz2
wabt-950042585626bc639c4b330bd47c7b9be4e11bac.zip
[EH] Replace event with tag (#1678)
We recently decided to change 'event' to 'tag', and 'event section' to 'tag section', out of the rationale that the section contains a generalized tag that references a type, which may be used for something other than exceptions, and the name 'event' can be confusing in the web context. See - https://github.com/WebAssembly/exception-handling/issues/159#issuecomment-857910130 - https://github.com/WebAssembly/exception-handling/pull/161
Diffstat (limited to 'test')
-rw-r--r--test/binary/bad-linking-tag-index.txt (renamed from test/binary/bad-linking-event-index.txt)12
-rw-r--r--test/binary/bad-tag-after-global.txt (renamed from test/binary/bad-event-after-global.txt)6
-rw-r--r--test/binary/bad-tag-before-memory.txt (renamed from test/binary/bad-event-before-memory.txt)2
-rw-r--r--test/desugar/try.txt4
-rw-r--r--test/dump/import.txt16
-rw-r--r--test/dump/rethrow.txt14
-rw-r--r--test/dump/tag.txt (renamed from test/dump/event.txt)38
-rw-r--r--test/dump/throw.txt14
-rw-r--r--test/dump/try-catch-all.txt12
-rw-r--r--test/dump/try-delegate.txt14
-rw-r--r--test/dump/try-multi.txt16
-rw-r--r--test/dump/try-unwind.txt12
-rw-r--r--test/dump/try.txt14
-rwxr-xr-xtest/gen-wasm.py2
-rw-r--r--test/parse/all-features.txt2
-rw-r--r--test/parse/expr/rethrow.txt2
-rw-r--r--test/parse/expr/throw.txt2
-rw-r--r--test/parse/expr/try-catch-all.txt4
-rw-r--r--test/parse/expr/try-delegate.txt2
-rw-r--r--test/parse/expr/try-multi.txt2
-rw-r--r--test/parse/expr/try.txt2
-rw-r--r--test/parse/module/event.txt8
-rw-r--r--test/parse/module/export-event.txt5
-rw-r--r--test/parse/module/export-tag.txt5
-rw-r--r--test/parse/module/import-tag.txt (renamed from test/parse/module/import-event.txt)2
-rw-r--r--test/parse/module/tag.txt8
-rw-r--r--test/roundtrip/fold-rethrow.txt4
-rw-r--r--test/roundtrip/fold-throw.txt8
-rw-r--r--test/roundtrip/generate-tag-names.txt (renamed from test/roundtrip/generate-event-names.txt)4
-rw-r--r--test/roundtrip/inline-export-tag.txt (renamed from test/roundtrip/inline-export-event.txt)6
-rw-r--r--test/roundtrip/inline-import-tag.txt (renamed from test/roundtrip/inline-import-event.txt)4
-rw-r--r--test/roundtrip/rethrow.txt4
-rw-r--r--test/spec/binary.txt4
-rw-r--r--test/spec/bulk-memory-operations/binary.txt4
-rw-r--r--test/spec/memory64/binary.txt4
-rw-r--r--test/typecheck/bad-delegate-depth.txt2
-rw-r--r--test/typecheck/bad-delegate-target.txt2
-rw-r--r--test/typecheck/bad-empty-catch.txt2
-rw-r--r--test/typecheck/bad-event-results.txt9
-rw-r--r--test/typecheck/bad-rethrow-depth.txt2
-rw-r--r--test/typecheck/bad-rethrow-not-in-catch.txt2
-rw-r--r--test/typecheck/bad-tag-results.txt9
-rw-r--r--test/typecheck/delegate.txt2
-rw-r--r--test/typecheck/rethrow.txt2
44 files changed, 147 insertions, 147 deletions
diff --git a/test/binary/bad-linking-event-index.txt b/test/binary/bad-linking-tag-index.txt
index 975c2d8d..262abe62 100644
--- a/test/binary/bad-linking-event-index.txt
+++ b/test/binary/bad-linking-tag-index.txt
@@ -4,7 +4,7 @@
magic
version
section(TYPE) { count[1] function params[0] results[0] }
-section(EVENT) {
+section(TAG) {
count[1]
attr[0]
sig[0]
@@ -19,12 +19,12 @@ section("linking") {
type[4]
flags[1]
index[1]
- str("event OOB")
+ str("tag OOB")
}
}
(;; STDERR ;;;
-error: invalid event index: 1
-000002e: error: OnEventSymbol callback failed
-error: invalid event index: 1
-000002e: error: OnEventSymbol callback failed
+error: invalid tag index: 1
+000002c: error: OnTagSymbol callback failed
+error: invalid tag index: 1
+000002c: error: OnTagSymbol callback failed
;;; STDERR ;;)
diff --git a/test/binary/bad-event-after-global.txt b/test/binary/bad-tag-after-global.txt
index ae236831..bcb6a3a9 100644
--- a/test/binary/bad-event-after-global.txt
+++ b/test/binary/bad-tag-after-global.txt
@@ -4,8 +4,8 @@
magic
version
section(GLOBAL) { count[0] }
-section(EVENT) { count[0] }
+section(TAG) { count[0] }
(;; STDERR ;;;
-000000d: error: section Event out of order
-000000d: error: section Event out of order
+000000d: error: section Tag out of order
+000000d: error: section Tag out of order
;;; STDERR ;;)
diff --git a/test/binary/bad-event-before-memory.txt b/test/binary/bad-tag-before-memory.txt
index 992531f0..1704e00a 100644
--- a/test/binary/bad-event-before-memory.txt
+++ b/test/binary/bad-tag-before-memory.txt
@@ -3,7 +3,7 @@
;;; ARGS2: --enable-exceptions
magic
version
-section(EVENT) { count[0] }
+section(TAG) { count[0] }
section(MEMORY) { count[0] }
(;; STDERR ;;;
000000d: error: section Memory out of order
diff --git a/test/desugar/try.txt b/test/desugar/try.txt
index ded7a240..dfe2fee3 100644
--- a/test/desugar/try.txt
+++ b/test/desugar/try.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat-desugar
;;; ARGS: --enable-exceptions
(module
- (event $ex (param i32))
+ (tag $ex (param i32))
(func (result i32)
try $try1 (result i32)
nop
@@ -13,7 +13,7 @@
)
(;; STDOUT ;;;
(module
- (event $ex (param i32))
+ (tag $ex (param i32))
(func (;0;) (result i32)
try $try1 (result i32)
nop
diff --git a/test/dump/import.txt b/test/dump/import.txt
index 5bffec3b..834acbb4 100644
--- a/test/dump/import.txt
+++ b/test/dump/import.txt
@@ -6,7 +6,7 @@
(import "ignored" "test2" (func (param i32) (result i32)))
(import "ignored" "testmem" (memory 0))
(import "ignored" "testtable" (table 0 anyfunc))
- (import "ignored" "testevent" (event (param i32)))
+ (import "ignored" "testtag" (tag (param i32)))
)
(;; STDERR ;;;
0000000: 0061 736d ; WASM_BINARY_MAGIC
@@ -73,12 +73,12 @@
; import header 4
0000066: 07 ; string length
0000067: 6967 6e6f 7265 64 ignored ; import module name
-000006e: 09 ; string length
-000006f: 7465 7374 6576 656e 74 testevent ; import field name
-0000078: 04 ; import kind
-0000079: 00 ; event attribute
-000007a: 02 ; event signature index
-000001c: 5e ; FIXUP section size
+000006e: 07 ; string length
+000006f: 7465 7374 7461 67 testtag ; import field name
+0000076: 04 ; import kind
+0000077: 00 ; tag attribute
+0000078: 02 ; tag signature index
+000001c: 5c ; FIXUP section size
;;; STDERR ;;)
(;; STDOUT ;;;
@@ -95,7 +95,7 @@ Import[5]:
- func[1] sig=1 <ignored.test2> <- ignored.test2
- memory[0] pages: initial=0 <- ignored.testmem
- table[0] type=funcref initial=0 <- ignored.testtable
- - event[0] sig=2 <ignored.testevent> <- ignored.testevent
+ - tag[0] sig=2 <ignored.testtag> <- ignored.testtag
Code Disassembly:
diff --git a/test/dump/rethrow.txt b/test/dump/rethrow.txt
index ff3c54bb..4ea3e491 100644
--- a/test/dump/rethrow.txt
+++ b/test/dump/rethrow.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e1)
+ (tag $e1)
(func
try
catch $e1
@@ -25,13 +25,13 @@
0000010: 01 ; num functions
0000011: 00 ; function 0 signature index
000000f: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000012: 0d ; section code
0000013: 00 ; section size (guess)
-0000014: 01 ; event count
-; event 0
-0000015: 00 ; event attribute
-0000016: 00 ; event signature index
+0000014: 01 ; tag count
+; tag 0
+0000015: 00 ; tag attribute
+0000016: 00 ; tag signature index
0000013: 03 ; FIXUP section size
; section "DataCount" (12)
0000017: 0c ; section code
@@ -48,7 +48,7 @@
000001f: 06 ; try
0000020: 40 ; void
0000021: 07 ; catch
-0000022: 00 ; catch event
+0000022: 00 ; catch tag
0000023: 09 ; rethrow
0000024: 00 ; rethrow depth
0000025: 0b ; end
diff --git a/test/dump/event.txt b/test/dump/tag.txt
index 09d6f3f4..2e569f98 100644
--- a/test/dump/event.txt
+++ b/test/dump/tag.txt
@@ -2,9 +2,9 @@
;;; ARGS0: -v
;;; ARGS1: -x
(module
- (event)
- (event (param i32))
- (event (param f32 f64)))
+ (tag)
+ (tag (param i32))
+ (tag (param f32 f64)))
(;; STDERR ;;;
0000000: 0061 736d ; WASM_BINARY_MAGIC
0000004: 0100 0000 ; WASM_BINARY_VERSION
@@ -28,24 +28,24 @@
0000015: 7c ; f64
0000016: 00 ; num results
0000009: 0d ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000017: 0d ; section code
0000018: 00 ; section size (guess)
-0000019: 03 ; event count
-; event 0
-000001a: 00 ; event attribute
-000001b: 00 ; event signature index
-; event 1
-000001c: 00 ; event attribute
-000001d: 01 ; event signature index
-; event 2
-000001e: 00 ; event attribute
-000001f: 02 ; event signature index
+0000019: 03 ; tag count
+; tag 0
+000001a: 00 ; tag attribute
+000001b: 00 ; tag signature index
+; tag 1
+000001c: 00 ; tag attribute
+000001d: 01 ; tag signature index
+; tag 2
+000001e: 00 ; tag attribute
+000001f: 02 ; tag signature index
0000018: 07 ; FIXUP section size
;;; STDERR ;;)
(;; STDOUT ;;;
-event.wasm: file format wasm 0x1
+tag.wasm: file format wasm 0x1
Section Details:
@@ -53,10 +53,10 @@ Type[3]:
- type[0] () -> nil
- type[1] (i32) -> nil
- type[2] (f32, f64) -> nil
-Event[3]:
- - event[0] sig=0
- - event[1] sig=1
- - event[2] sig=2
+Tag[3]:
+ - tag[0] sig=0
+ - tag[1] sig=1
+ - tag[2] sig=2
Code Disassembly:
diff --git a/test/dump/throw.txt b/test/dump/throw.txt
index 024b33aa..77698108 100644
--- a/test/dump/throw.txt
+++ b/test/dump/throw.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e (param i32))
+ (tag $e (param i32))
(func
i32.const 1
throw $e))
@@ -28,13 +28,13 @@
0000014: 01 ; num functions
0000015: 01 ; function 0 signature index
0000013: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000016: 0d ; section code
0000017: 00 ; section size (guess)
-0000018: 01 ; event count
-; event 0
-0000019: 00 ; event attribute
-000001a: 00 ; event signature index
+0000018: 01 ; tag count
+; tag 0
+0000019: 00 ; tag attribute
+000001a: 00 ; tag signature index
0000017: 03 ; FIXUP section size
; section "DataCount" (12)
000001b: 0c ; section code
@@ -51,7 +51,7 @@
0000023: 41 ; i32.const
0000024: 01 ; i32 literal
0000025: 08 ; throw
-0000026: 00 ; throw event
+0000026: 00 ; throw tag
0000027: 0b ; end
0000021: 06 ; FIXUP func body size
000001f: 08 ; FIXUP section size
diff --git a/test/dump/try-catch-all.txt b/test/dump/try-catch-all.txt
index 703765b2..72c18078 100644
--- a/test/dump/try-catch-all.txt
+++ b/test/dump/try-catch-all.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e (param i32))
+ (tag $e (param i32))
(func
try $try1 (result i32)
nop
@@ -33,13 +33,13 @@
0000014: 01 ; num functions
0000015: 01 ; function 0 signature index
0000013: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000016: 0d ; section code
0000017: 00 ; section size (guess)
-0000018: 01 ; event count
-; event 0
-0000019: 00 ; event attribute
-000001a: 00 ; event signature index
+0000018: 01 ; tag count
+; tag 0
+0000019: 00 ; tag attribute
+000001a: 00 ; tag signature index
0000017: 03 ; FIXUP section size
; section "DataCount" (12)
000001b: 0c ; section code
diff --git a/test/dump/try-delegate.txt b/test/dump/try-delegate.txt
index 459d4af9..a65dabe3 100644
--- a/test/dump/try-delegate.txt
+++ b/test/dump/try-delegate.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e (param i32))
+ (tag $e (param i32))
(func
try $try1 (result i32)
try
@@ -36,13 +36,13 @@
0000014: 01 ; num functions
0000015: 01 ; function 0 signature index
0000013: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000016: 0d ; section code
0000017: 00 ; section size (guess)
-0000018: 01 ; event count
-; event 0
-0000019: 00 ; event attribute
-000001a: 00 ; event signature index
+0000018: 01 ; tag count
+; tag 0
+0000019: 00 ; tag attribute
+000001a: 00 ; tag signature index
0000017: 03 ; FIXUP section size
; section "DataCount" (12)
000001b: 0c ; section code
@@ -66,7 +66,7 @@
000002a: 41 ; i32.const
000002b: 07 ; i32 literal
000002c: 07 ; catch
-000002d: 00 ; catch event
+000002d: 00 ; catch tag
000002e: 1a ; drop
000002f: 41 ; i32.const
0000030: 08 ; i32 literal
diff --git a/test/dump/try-multi.txt b/test/dump/try-multi.txt
index 9246aff6..f29f942f 100644
--- a/test/dump/try-multi.txt
+++ b/test/dump/try-multi.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e1 (param i32))
+ (tag $e1 (param i32))
(func
try (result i32 i32)
i32.const 1
@@ -50,13 +50,13 @@
000001a: 01 ; function 0 signature index
000001b: 01 ; function 1 signature index
0000018: 03 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
000001c: 0d ; section code
000001d: 00 ; section size (guess)
-000001e: 01 ; event count
-; event 0
-000001f: 00 ; event attribute
-0000020: 00 ; event signature index
+000001e: 01 ; tag count
+; tag 0
+000001f: 00 ; tag attribute
+0000020: 00 ; tag signature index
000001d: 03 ; FIXUP section size
; section "DataCount" (12)
0000021: 0c ; section code
@@ -77,7 +77,7 @@
000002d: 41 ; i32.const
000002e: 02 ; i32 literal
000002f: 07 ; catch
-0000030: 00 ; catch event
+0000030: 00 ; catch tag
0000031: 1a ; drop
0000032: 41 ; i32.const
0000033: 03 ; i32 literal
@@ -96,7 +96,7 @@
000003e: 00 ; block type function index
000003f: 1a ; drop
0000040: 07 ; catch
-0000041: 00 ; catch event
+0000041: 00 ; catch tag
0000042: 1a ; drop
0000043: 0b ; end
0000044: 0b ; end
diff --git a/test/dump/try-unwind.txt b/test/dump/try-unwind.txt
index d49e2155..50d3af2a 100644
--- a/test/dump/try-unwind.txt
+++ b/test/dump/try-unwind.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e (param i32))
+ (tag $e (param i32))
(func
try $try1 (result i32)
nop
@@ -34,13 +34,13 @@
0000014: 01 ; num functions
0000015: 01 ; function 0 signature index
0000013: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000016: 0d ; section code
0000017: 00 ; section size (guess)
-0000018: 01 ; event count
-; event 0
-0000019: 00 ; event attribute
-000001a: 00 ; event signature index
+0000018: 01 ; tag count
+; tag 0
+0000019: 00 ; tag attribute
+000001a: 00 ; tag signature index
0000017: 03 ; FIXUP section size
; section "DataCount" (12)
000001b: 0c ; section code
diff --git a/test/dump/try.txt b/test/dump/try.txt
index 23c750b7..672dc2a9 100644
--- a/test/dump/try.txt
+++ b/test/dump/try.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-objdump
;;; ARGS0: -v --enable-exceptions
(module
- (event $e (param i32))
+ (tag $e (param i32))
(func
try $try1 (result i32)
nop
@@ -34,13 +34,13 @@
0000014: 01 ; num functions
0000015: 01 ; function 0 signature index
0000013: 02 ; FIXUP section size
-; section "Event" (13)
+; section "Tag" (13)
0000016: 0d ; section code
0000017: 00 ; section size (guess)
-0000018: 01 ; event count
-; event 0
-0000019: 00 ; event attribute
-000001a: 00 ; event signature index
+0000018: 01 ; tag count
+; tag 0
+0000019: 00 ; tag attribute
+000001a: 00 ; tag signature index
0000017: 03 ; FIXUP section size
; section "DataCount" (12)
000001b: 0c ; section code
@@ -60,7 +60,7 @@
0000026: 41 ; i32.const
0000027: 07 ; i32 literal
0000028: 07 ; catch
-0000029: 00 ; catch event
+0000029: 00 ; catch tag
000002a: 1a ; drop
000002b: 41 ; i32.const
000002c: 08 ; i32 literal
diff --git a/test/gen-wasm.py b/test/gen-wasm.py
index 5794fbf9..13818620 100755
--- a/test/gen-wasm.py
+++ b/test/gen-wasm.py
@@ -64,7 +64,7 @@ NAMED_VALUES = {
'CODE': 10,
'DATA': 11,
'DATACOUNT': 12,
- 'EVENT': 13,
+ 'TAG': 13,
# name subsection codes
'NAME_MODULE': 0,
diff --git a/test/parse/all-features.txt b/test/parse/all-features.txt
index 3d52a445..9ddf2c2c 100644
--- a/test/parse/all-features.txt
+++ b/test/parse/all-features.txt
@@ -8,7 +8,7 @@
(global (mut i32) (i32.const 0))
;; exceptions
- (event $e)
+ (tag $e)
;; annotations
(func $f (@name "func") (result i32)
diff --git a/test/parse/expr/rethrow.txt b/test/parse/expr/rethrow.txt
index 7015463f..4225c025 100644
--- a/test/parse/expr/rethrow.txt
+++ b/test/parse/expr/rethrow.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event $e1)
+ (tag $e1)
(func
try
catch $e1
diff --git a/test/parse/expr/throw.txt b/test/parse/expr/throw.txt
index b5209817..6a723301 100644
--- a/test/parse/expr/throw.txt
+++ b/test/parse/expr/throw.txt
@@ -1,5 +1,5 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event $e1)
+ (tag $e1)
(func throw $e1))
diff --git a/test/parse/expr/try-catch-all.txt b/test/parse/expr/try-catch-all.txt
index c87f4719..c877b103 100644
--- a/test/parse/expr/try-catch-all.txt
+++ b/test/parse/expr/try-catch-all.txt
@@ -1,8 +1,8 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event $e1 (param i32))
- (event $e2 (param i32 i32))
+ (tag $e1 (param i32))
+ (tag $e2 (param i32 i32))
;; multiple catch clauses ending with catch_all
(func
diff --git a/test/parse/expr/try-delegate.txt b/test/parse/expr/try-delegate.txt
index 40814c81..93961154 100644
--- a/test/parse/expr/try-delegate.txt
+++ b/test/parse/expr/try-delegate.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event (param i32))
+ (tag (param i32))
(func
try
diff --git a/test/parse/expr/try-multi.txt b/test/parse/expr/try-multi.txt
index 870eb52b..c17297b3 100644
--- a/test/parse/expr/try-multi.txt
+++ b/test/parse/expr/try-multi.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event (param i32))
+ (tag (param i32))
;; try w/ multiple results
(func
diff --git a/test/parse/expr/try.txt b/test/parse/expr/try.txt
index fabb994c..c10eebc2 100644
--- a/test/parse/expr/try.txt
+++ b/test/parse/expr/try.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event (param i32))
+ (tag (param i32))
;; bare
(func
diff --git a/test/parse/module/event.txt b/test/parse/module/event.txt
deleted file mode 100644
index f04cb62e..00000000
--- a/test/parse/module/event.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-;;; TOOL: wat2wasm
-;;; ARGS: --enable-exceptions
-(module
- (type $t (func (param f64)))
- (event)
- (event $e1 (param i32))
- (event $e2 (param f32 f32 f32))
- (event $e3 (type $t)))
diff --git a/test/parse/module/export-event.txt b/test/parse/module/export-event.txt
deleted file mode 100644
index 98b88cc8..00000000
--- a/test/parse/module/export-event.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-;;; TOOL: wat2wasm
-;;; ARGS: --enable-exceptions
-(module
- (event (param i32 i32))
- (export "my_event" (event 0)))
diff --git a/test/parse/module/export-tag.txt b/test/parse/module/export-tag.txt
new file mode 100644
index 00000000..824afaa7
--- /dev/null
+++ b/test/parse/module/export-tag.txt
@@ -0,0 +1,5 @@
+;;; TOOL: wat2wasm
+;;; ARGS: --enable-exceptions
+(module
+ (tag (param i32 i32))
+ (export "my_tag" (tag 0)))
diff --git a/test/parse/module/import-event.txt b/test/parse/module/import-tag.txt
index 8dd99a02..f5aa6804 100644
--- a/test/parse/module/import-event.txt
+++ b/test/parse/module/import-tag.txt
@@ -1,4 +1,4 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (import "foo" "1" (event (param f64 f32))))
+ (import "foo" "1" (tag (param f64 f32))))
diff --git a/test/parse/module/tag.txt b/test/parse/module/tag.txt
new file mode 100644
index 00000000..fbbc82d4
--- /dev/null
+++ b/test/parse/module/tag.txt
@@ -0,0 +1,8 @@
+;;; TOOL: wat2wasm
+;;; ARGS: --enable-exceptions
+(module
+ (type $t (func (param f64)))
+ (tag)
+ (tag $e1 (param i32))
+ (tag $e2 (param f32 f32 f32))
+ (tag $e3 (type $t)))
diff --git a/test/roundtrip/fold-rethrow.txt b/test/roundtrip/fold-rethrow.txt
index d9c7a476..7dd0f840 100644
--- a/test/roundtrip/fold-rethrow.txt
+++ b/test/roundtrip/fold-rethrow.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs --enable-exceptions
(module
- (event $e0 (param i32))
+ (tag $e0 (param i32))
(func
try
@@ -19,5 +19,5 @@
(do)
(catch 0
(rethrow 0 (;@1;)))))
- (event (;0;) (type 0) (param i32)))
+ (tag (;0;) (type 0) (param i32)))
;;; STDOUT ;;)
diff --git a/test/roundtrip/fold-throw.txt b/test/roundtrip/fold-throw.txt
index 8a167fc4..965cd5a4 100644
--- a/test/roundtrip/fold-throw.txt
+++ b/test/roundtrip/fold-throw.txt
@@ -1,8 +1,8 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --fold-exprs --enable-exceptions
(module
- (event $e0 (param i32))
- (event $e1 (param f32 i32))
+ (tag $e0 (param i32))
+ (tag $e1 (param f32 i32))
(func i32.const 1 throw $e0)
(func f32.const 2 i32.const 1 throw $e1))
@@ -18,6 +18,6 @@
(throw 1
(f32.const 0x1p+1 (;=2;))
(i32.const 1)))
- (event (;0;) (type 0) (param i32))
- (event (;1;) (type 1) (param f32 i32)))
+ (tag (;0;) (type 0) (param i32))
+ (tag (;1;) (type 1) (param f32 i32)))
;;; STDOUT ;;)
diff --git a/test/roundtrip/generate-event-names.txt b/test/roundtrip/generate-tag-names.txt
index c01987a3..6c3bb11e 100644
--- a/test/roundtrip/generate-event-names.txt
+++ b/test/roundtrip/generate-tag-names.txt
@@ -1,9 +1,9 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --generate-names --enable-exceptions
(module
- (event (param i32)))
+ (tag (param i32)))
(;; STDOUT ;;;
(module
(type $t0 (func (param i32)))
- (event $e0 (type $t0) (param i32)))
+ (tag $e0 (type $t0) (param i32)))
;;; STDOUT ;;)
diff --git a/test/roundtrip/inline-export-event.txt b/test/roundtrip/inline-export-tag.txt
index 2a331133..27dcf116 100644
--- a/test/roundtrip/inline-export-event.txt
+++ b/test/roundtrip/inline-export-tag.txt
@@ -1,10 +1,10 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --inline-export --enable-exceptions
(module
- (event $foo (param i32))
- (export "foo" (event $foo)))
+ (tag $foo (param i32))
+ (export "foo" (tag $foo)))
(;; STDOUT ;;;
(module
(type (;0;) (func (param i32)))
- (event (;0;) (export "foo") (type 0) (param i32)))
+ (tag (;0;) (export "foo") (type 0) (param i32)))
;;; STDOUT ;;)
diff --git a/test/roundtrip/inline-import-event.txt b/test/roundtrip/inline-import-tag.txt
index cf78f2f3..2524e7e6 100644
--- a/test/roundtrip/inline-import-event.txt
+++ b/test/roundtrip/inline-import-tag.txt
@@ -1,10 +1,10 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --inline-import --enable-exceptions
(module
- (import "mod" "e1" (event (param i32 f32)))
+ (import "mod" "e1" (tag (param i32 f32)))
)
(;; STDOUT ;;;
(module
(type (;0;) (func (param i32 f32)))
- (event (;0;) (import "mod" "e1") (type 0) (param i32 f32)))
+ (tag (;0;) (import "mod" "e1") (type 0) (param i32 f32)))
;;; STDOUT ;;)
diff --git a/test/roundtrip/rethrow.txt b/test/roundtrip/rethrow.txt
index 97850b85..dc445e86 100644
--- a/test/roundtrip/rethrow.txt
+++ b/test/roundtrip/rethrow.txt
@@ -1,7 +1,7 @@
;;; TOOL: run-roundtrip
;;; ARGS: --stdout --enable-exceptions
(module
- (event $e0 (param i32))
+ (tag $e0 (param i32))
(func
try
@@ -19,5 +19,5 @@
catch 0
rethrow 0 (;@1;)
end)
- (event (;0;) (type 0) (param i32)))
+ (tag (;0;) (type 0) (param i32)))
;;; STDOUT ;;)
diff --git a/test/spec/binary.txt b/test/spec/binary.txt
index be2221d0..d65853db 100644
--- a/test/spec/binary.txt
+++ b/test/spec/binary.txt
@@ -118,9 +118,9 @@ out/test/spec/binary.wast:481: assert_malformed passed:
out/test/spec/binary.wast:492: assert_malformed passed:
000000e: error: unfinished section (expected end: 0x11)
out/test/spec/binary.wast:511: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/binary.wast:521: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/binary.wast:532: assert_malformed passed:
000000e: error: malformed import kind: 5
out/test/spec/binary.wast:542: assert_malformed passed:
diff --git a/test/spec/bulk-memory-operations/binary.txt b/test/spec/bulk-memory-operations/binary.txt
index 8435472f..92c52273 100644
--- a/test/spec/bulk-memory-operations/binary.txt
+++ b/test/spec/bulk-memory-operations/binary.txt
@@ -126,9 +126,9 @@ out/test/spec/bulk-memory-operations/binary.wast:593: assert_malformed passed:
out/test/spec/bulk-memory-operations/binary.wast:604: assert_malformed passed:
000000e: error: unfinished section (expected end: 0x11)
out/test/spec/bulk-memory-operations/binary.wast:623: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/bulk-memory-operations/binary.wast:633: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/bulk-memory-operations/binary.wast:644: assert_malformed passed:
000000e: error: malformed import kind: 5
out/test/spec/bulk-memory-operations/binary.wast:654: assert_malformed passed:
diff --git a/test/spec/memory64/binary.txt b/test/spec/memory64/binary.txt
index 7c7ff4a1..97f4080e 100644
--- a/test/spec/memory64/binary.txt
+++ b/test/spec/memory64/binary.txt
@@ -119,9 +119,9 @@ out/test/spec/memory64/binary.wast:481: assert_malformed passed:
out/test/spec/memory64/binary.wast:492: assert_malformed passed:
000000e: error: unfinished section (expected end: 0x11)
out/test/spec/memory64/binary.wast:511: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/memory64/binary.wast:521: assert_malformed passed:
- 000000e: error: invalid import event kind: exceptions not allowed
+ 000000e: error: invalid import tag kind: exceptions not allowed
out/test/spec/memory64/binary.wast:532: assert_malformed passed:
000000e: error: malformed import kind: 5
out/test/spec/memory64/binary.wast:542: assert_malformed passed:
diff --git a/test/typecheck/bad-delegate-depth.txt b/test/typecheck/bad-delegate-depth.txt
index a8bfced7..0e108608 100644
--- a/test/typecheck/bad-delegate-depth.txt
+++ b/test/typecheck/bad-delegate-depth.txt
@@ -2,7 +2,7 @@
;;; ERROR: 1
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
try
block
diff --git a/test/typecheck/bad-delegate-target.txt b/test/typecheck/bad-delegate-target.txt
index e8145919..4fd657ef 100644
--- a/test/typecheck/bad-delegate-target.txt
+++ b/test/typecheck/bad-delegate-target.txt
@@ -2,7 +2,7 @@
;;; ERROR: 1
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
try
block
diff --git a/test/typecheck/bad-empty-catch.txt b/test/typecheck/bad-empty-catch.txt
index d8009866..61c127f4 100644
--- a/test/typecheck/bad-empty-catch.txt
+++ b/test/typecheck/bad-empty-catch.txt
@@ -2,7 +2,7 @@
;;; ARGS: --enable-exceptions
;;; ERROR: 1
(module
- (event (param i32))
+ (tag (param i32))
(func
try
catch 0
diff --git a/test/typecheck/bad-event-results.txt b/test/typecheck/bad-event-results.txt
deleted file mode 100644
index 1e98ca00..00000000
--- a/test/typecheck/bad-event-results.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-;;; TOOL: wat2wasm
-;;; ARGS: --enable-exceptions
-;;; ERROR: 1
-(module (event (result i32)))
-(;; STDERR ;;;
-out/test/typecheck/bad-event-results.txt:4:10: error: Event signature must have 0 results.
-(module (event (result i32)))
- ^^^^^
-;;; STDERR ;;)
diff --git a/test/typecheck/bad-rethrow-depth.txt b/test/typecheck/bad-rethrow-depth.txt
index fb7ef4a2..571ae130 100644
--- a/test/typecheck/bad-rethrow-depth.txt
+++ b/test/typecheck/bad-rethrow-depth.txt
@@ -2,7 +2,7 @@
;;; ERROR: 1
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
try $l1
nop
diff --git a/test/typecheck/bad-rethrow-not-in-catch.txt b/test/typecheck/bad-rethrow-not-in-catch.txt
index e91cccbd..45a7c0a2 100644
--- a/test/typecheck/bad-rethrow-not-in-catch.txt
+++ b/test/typecheck/bad-rethrow-not-in-catch.txt
@@ -2,7 +2,7 @@
;;; ERROR: 1
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
block
try
diff --git a/test/typecheck/bad-tag-results.txt b/test/typecheck/bad-tag-results.txt
new file mode 100644
index 00000000..75b7ec43
--- /dev/null
+++ b/test/typecheck/bad-tag-results.txt
@@ -0,0 +1,9 @@
+;;; TOOL: wat2wasm
+;;; ARGS: --enable-exceptions
+;;; ERROR: 1
+(module (tag (result i32)))
+(;; STDERR ;;;
+out/test/typecheck/bad-tag-results.txt:4:10: error: Tag signature must have 0 results.
+(module (tag (result i32)))
+ ^^^
+;;; STDERR ;;)
diff --git a/test/typecheck/delegate.txt b/test/typecheck/delegate.txt
index 937cf0f9..419ecd4a 100644
--- a/test/typecheck/delegate.txt
+++ b/test/typecheck/delegate.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
try
try
diff --git a/test/typecheck/rethrow.txt b/test/typecheck/rethrow.txt
index 0ba4e465..1029a9de 100644
--- a/test/typecheck/rethrow.txt
+++ b/test/typecheck/rethrow.txt
@@ -1,7 +1,7 @@
;;; TOOL: wat2wasm
;;; ARGS: --enable-exceptions
(module
- (event $e)
+ (tag $e)
(func
try $l1
nop