From 8a70121a421204e05d020c67294e7e517c2d15d2 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Mon, 25 Nov 2019 15:46:56 -0800 Subject: Remove FunctionType from Event (#2466) This is the start of a larger refactoring to remove FunctionType entirely and store types and signatures directly on the entities that use them. This PR updates BrOnExn and Events to remove their use of FunctionType and makes the BinaryWriter traverse the module and collect types rather than using the global FunctionType list. While we are collecting types, we also sort them by frequency as an optimization. Remaining uses of FunctionType in Function, CallIndirect, and parsing will be removed in a future PR. --- test/binaryen.js/exception-handling.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/binaryen.js/exception-handling.js') diff --git a/test/binaryen.js/exception-handling.js b/test/binaryen.js/exception-handling.js index adf67d2fa..00faf8f26 100644 --- a/test/binaryen.js/exception-handling.js +++ b/test/binaryen.js/exception-handling.js @@ -20,8 +20,7 @@ var module = new Binaryen.Module(); module.setFeatures(Binaryen.Features.ExceptionHandling); var v = module.addFunctionType("v", Binaryen.none, []); -var vi = module.addFunctionType("vi", Binaryen.none, [Binaryen.i32]); -var event_ = module.addEvent("e", 0, vi); +var event_ = module.addEvent("e", 0, Binaryen.i32, Binaryen.none); // (try // (throw $e (i32.const 0)) -- cgit v1.2.3