optimize types

This commit is contained in:
NikVolf
2017-05-04 12:16:45 +03:00
parent db90487364
commit 67d32da16f
3 changed files with 82 additions and 22 deletions

View File

@@ -12,21 +12,13 @@ pub fn call() {
}
/* This produces the following code (after injecting gas counter & optimizing)
(module
(type (;0;) (func (result i32)))
(type (;1;) (func))
(type (;2;) (func (param i32)))
(type (;3;) (func (param i32 i32 i64 i32 i32) (result i32)))
(type (;4;) (func (param i32 i32 i32 i32 i32 i32) (result i32)))
(type (;5;) (func (param i32) (result i32)))
(type (;6;) (func (param i32 i32)))
(type (;7;) (func (param i32 i32 i32 i32 i32 i32) (result i32)))
(type (;8;) (func (param i32)))
(type (;0;) (func))
(type (;1;) (func (param i32)))
(import "env" "memory" (memory (;0;) 256 256))
(import "env" "table" (table (;0;) 0 0 anyfunc))
(import "env" "gas" (func (;0;) (type 8)))
(func (;1;) (type 1)
(import "env" "gas" (func (;0;) (type 1)))
(func (;1;) (type 0)
i32.const 2
call 0
nop)