add("<a href=\"overview.html\"><b>Overview</b></a> <a href=\"index-1.html\"><b>Index</b></a> <a href=\"index.html\" target=\"_top\"><b>With Frames</b></a>\n")
add("</td></tr></table>")
add("Visibility: ")
+ var module = module
if (not inside_mode and not intrude_mode) or module == null then
add("<b>Public</b> ")
else
redef fun prototype_head(dctx) do return "module "
var _known_owner_of_cache: Map[MMModule, MMModule] = new HashMap[MMModule, MMModule]
+
+ # Return the owner of `module` from the point of view of `self`
fun known_owner_of(module: MMModule): MMModule
- do
+ do
if _known_owner_of_cache.has_key(module) then return _known_owner_of_cache[module]
var res = module
- if mhe < module and visibility_for(module) != 0 then
+ # is module is publicly imported by self?
+ if mhe < module and visibility_for(module) != 0 then
res = known_owner_of_intern(module, self, false)
else
+ # Return the canonnical owner of module from the point of view of self
res = module.owner(self)
end
_known_owner_of_cache[module] = res
return res
end
+ # ???
private fun known_owner_of_intern(module: MMModule, from: MMModule, as_owner: Bool): MMModule
do
if module == self then return self
if not m.mhe <= module then continue
candidates.add(m.known_owner_of_intern(module, from, true))
end
- assert not candidates.is_empty
+ # FIXME: I do not know what this does
+ if candidates.is_empty then return module.owner(from)
var max = candidates.first
for m in candidates do
if max.mhe < m then max = m
dctx.add("<h1>Module {self}</h1>\n<dl>")
var s = ""
var d: nullable MMDirectory = directory
- while d == null do
+ while d != null do
if d.owner != null and (d.owner != self or dctx.inside_mode or dctx.intrude_mode) then
s = "{d.owner.html_link(dctx)}::{s}"
end
if not c2 isa MMConcreteClass then continue
c2.compute_super_classes
c2.compute_ancestors
- c2.inherit_global_properties
end
for c2 in c.cshe.direct_smallers do
if c2.global.intro == c2 then