Add a 'call_indirect' builtin to emit arbitrary calls (might trap at runtime); Optimize 'for' loop compilation a bit

This commit is contained in:
dcodeIO
2018-05-25 15:59:17 +02:00
parent 51ede113dd
commit 7ad13f9d65
47 changed files with 3311 additions and 22111 deletions

View File

@ -0,0 +1,21 @@
(module
(type $iv (func (param i32)))
(type $v (func))
(memory $0 1)
(export "test" (func $class-overloading/test))
(export "memory" (memory $0))
(start $start)
(func $class-overloading/Foo#baz (; 0 ;) (type $iv) (param $0 i32)
(nop)
)
(func $class-overloading/test (; 1 ;) (type $iv) (param $0 i32)
(call $class-overloading/Foo#baz
(get_local $0)
)
)
(func $start (; 2 ;) (type $v)
(call $class-overloading/test
(i32.const 0)
)
)
)