Search parent namespaces when resolving identifiers

This commit is contained in:
dcodeIO
2017-12-27 19:17:29 +01:00
parent ba61a5e414
commit eccac129ad
9 changed files with 264 additions and 253 deletions

View File

@ -1,12 +1,16 @@
(module
(type $i (func (result i32)))
(type $v (func))
(global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0))
(memory $0 1)
(export "test" (func $namespace/test))
(export "memory" (memory $0))
(func $namespace/Outer.Inner.aFunc (; 0 ;) (type $v)
(nop)
(start $start)
(func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32)
(get_global $namespace/Outer.Inner.aVar)
)
(func $namespace/test (; 1 ;) (type $v)
(call $namespace/Outer.Inner.aFunc)
(func $start (; 1 ;) (type $v)
(drop
(call $namespace/Outer.Inner.aFunc)
)
)
)