Initial module level function exports

This commit is contained in:
dcodeIO
2017-12-02 23:33:01 +01:00
parent 9e053f311e
commit eaf9253b96
8 changed files with 33 additions and 18 deletions

View File

@ -2,6 +2,8 @@
(type $iv (func (param i32)))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "loopDo" (func $do/loopDo))
(export "loopDoInDo" (func $do/loopDoInDo))
(export "memory" (memory $0))
(func $do/loopDo (; 0 ;) (type $iv) (param $0 i32)
(block $break$1.1

View File

@ -4,6 +4,8 @@
(global $export/b (mut i32) (i32.const 2))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "add" (func $export/add))
(export "renamed_sub" (func $export/sub))
(export "memory" (memory $0))
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(return

View File

@ -2,6 +2,9 @@
(type $ii (func (param i32) (result i32)))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "ifThenElse" (func $if/ifThenElse))
(export "ifThen" (func $if/ifThen))
(export "ifThenElseBlock" (func $if/ifThenElseBlock))
(export "memory" (memory $0))
(func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32)
(if

View File

@ -3,6 +3,10 @@
(type $v (func))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "add" (func $export/add))
(export "renamed_sub" (func $export/sub))
(export "renamed_add" (func $export/add))
(export "rerenamed_sub" (func $export/sub))
(export "memory" (memory $0))
(start $start)
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)

View File

@ -2,6 +2,9 @@
(type $ii (func (param i32) (result i32)))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "doSwitch" (func $switch/doSwitch))
(export "doSwitchDefaultFirst" (func $switch/doSwitchDefaultFirst))
(export "doSwitchDefaultOmitted" (func $switch/doSwitchDefaultOmitted))
(export "memory" (memory $0))
(func $switch/doSwitch (; 0 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)

View File

@ -2,6 +2,8 @@
(type $iv (func (param i32)))
(memory $0 1)
(data (i32.const 4) "\08\00\00\00")
(export "loopWhile" (func $while/loopWhile))
(export "loopWhileInWhile" (func $while/loopWhileInWhile))
(export "memory" (memory $0))
(func $while/loopWhile (; 0 ;) (type $iv) (param $0 i32)
(block $break$1.1