the compiler is now aware of packages

This commit is contained in:
Araq 2014-03-02 23:46:20 +01:00
commit 614557994e
5 changed files with 18 additions and 25 deletions

View file

@ -1044,8 +1044,10 @@ proc genMainProc(m: BModule) =
appcg(m, m.s[cfsProcs], otherMain, [])
proc getSomeInitName(m: PSym, suffix: string): PRope =
assert m.kind == skModule
assert m.owner.kind == skPackage
if {sfSystemModule, sfMainModule} * m.flags == {}:
result = m.info.toFullPath.getPackageName.mangle.toRope
result = m.owner.name.s.mangle.toRope
result.app m.name.s
result.app suffix