diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-06-18 14:20:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-18 14:20:03 -0700 |
commit | 28e88b9f993a2e45662fde0b10920aa22e7b1b7f (patch) | |
tree | 77bbd5f1dd1bfcb089b12f6fa9fcf828c135c099 /test/binaryen.js/event.js | |
parent | 97e277c51218778d1d76fd59fed3b4ca7756382e (diff) | |
download | binaryen-28e88b9f993a2e45662fde0b10920aa22e7b1b7f.tar.gz binaryen-28e88b9f993a2e45662fde0b10920aa22e7b1b7f.tar.bz2 binaryen-28e88b9f993a2e45662fde0b10920aa22e7b1b7f.zip |
[EH] Replace event with tag (#3937)
We recently decided to change 'event' to 'tag', and to '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/binaryen.js/event.js')
-rw-r--r-- | test/binaryen.js/event.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/test/binaryen.js/event.js b/test/binaryen.js/event.js deleted file mode 100644 index f705edc38..000000000 --- a/test/binaryen.js/event.js +++ /dev/null @@ -1,33 +0,0 @@ -function cleanInfo(info) { - var ret = {}; - for (var x in info) { - ret[x] = info[x]; - } - return ret; -} - -var module = new binaryen.Module(); -module.setFeatures(binaryen.Features.ReferenceTypes | - binaryen.Features.ExceptionHandling | - binaryen.Features.Multivalue); - -var pairType = binaryen.createType([binaryen.i32, binaryen.f32]); - -var event_ = module.addEvent("a-event", 0, binaryen.i32, binaryen.none); - -console.log("GetEvent is equal: " + (event_ === module.getEvent("a-event"))); - -var eventInfo = binaryen.getEventInfo(event_); -console.log("getEventInfo=" + JSON.stringify(cleanInfo(eventInfo))); - -module.addEventExport("a-event", "a-event-exp"); -module.addEventImport("a-event-imp", "module", "base", 0, pairType, binaryen.none); - -assert(module.validate()); -console.log(module.emitText()); - -module.removeExport("a-event-exp"); -module.removeEvent("a-event"); - -assert(module.validate()); -console.log(module.emitText()); |