summaryrefslogtreecommitdiff
path: root/test/passes/simplify-locals-notee.txt
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-05-24 16:39:52 -0700
committerGitHub <noreply@github.com>2019-05-24 16:39:52 -0700
commit899263882c48dba8e34717af1e28005f8888dca7 (patch)
tree1cea8fa707526b4408a247db5cade5b50e6fa667 /test/passes/simplify-locals-notee.txt
parentdc37d7b74edde1876f2114ad8edd10ab076e778f (diff)
downloadbinaryen-899263882c48dba8e34717af1e28005f8888dca7.tar.gz
binaryen-899263882c48dba8e34717af1e28005f8888dca7.tar.bz2
binaryen-899263882c48dba8e34717af1e28005f8888dca7.zip
Refactor type and function parsing (#2143)
- Refactored & fixed typeuse parsing rules so now the rules more closely follow the spec. There have been multiple parsing rules that were different in subtle ways, which are supposed to be the same according to the spec. - Duplicate types, i.e., types with the same signature, in the type section are allowed as long as they don't have the same given name. If a name is given, we use it; if type name is not given, we generate one in the form of `$FUNCSIG$` + signature string. If the same generated name already exists in the type section, we append `_` at the end. This causes most of the changes in the autogenerated type names in test outputs. - A typeuse has to be in the order of (type) -> (param) -> (result), if more than one of them exist. In case of function definitions, (local) has to be after all of these. Fixed some test cases that violate this rule. - When only (param)/(result) are given, its type will be the type with the smallest existing type index whose parameter and result are the same. If there's no such type, a new type will be created and inserted. - Added a test case `duplicate_types.wast` to test type namings for duplicate types. - Refactored `parseFunction` function. - Add more overrides to helper functions: `getSig` and `ensureFunctionType`.
Diffstat (limited to 'test/passes/simplify-locals-notee.txt')
-rw-r--r--test/passes/simplify-locals-notee.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/passes/simplify-locals-notee.txt b/test/passes/simplify-locals-notee.txt
index bf5b17d07..66cf78ead 100644
--- a/test/passes/simplify-locals-notee.txt
+++ b/test/passes/simplify-locals-notee.txt
@@ -1,6 +1,6 @@
(module
- (type $0 (func))
- (func $contrast (; 0 ;) (type $0)
+ (type $FUNCSIG$v (func))
+ (func $contrast (; 0 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i32)
(local $z i32)