Elements can be namespaces; Static properties and methods

This commit is contained in:
dcodeIO
2017-12-15 02:50:55 +01:00
parent b69c07af45
commit 8085a02df3
8 changed files with 460 additions and 224 deletions

View File

@ -0,0 +1,34 @@
(module
(type $iii (func (param i32 i32) (result i32)))
(type $fff (func (param f32 f32) (result f32)))
(type $v (func))
(memory $0 1)
(export "memory" (memory $0))
(start $start)
(func $class/Animal.add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
(i32.add
(get_local $0)
(get_local $1)
)
)
(func $class/Animal.sub<f32> (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
(f32.sub
(get_local $0)
(get_local $1)
)
)
(func $start (; 2 ;) (type $v)
(drop
(call $class/Animal.add
(i32.const 1)
(i32.const 2)
)
)
(drop
(call $class/Animal.sub<f32>
(f32.const 1)
(f32.const 2)
)
)
)
)