Branch: Tag:

2016-07-11

2016-07-11 12:46:43 by Martin Nilsson <nilsson@fastmail.com>

Modify _static_modules kludge to not have to expose the joinnode cache. Still uncertain the kludge is actually needed.

2226:    protected mixed `->(string index)    {    if( (< "dirname", "name", "is_resolv_dirnode", -  "module", "cache", "delete_value" >)[index] ) +  "module", "delete_value" >)[index] )    return ::`->(index);    return `[](index);    }
2463:    protected mixed `->(string index)    {    if( (< "joined_modules", "fallback_module", "name", "is_resolv_joinnode", -  "cache", "add_path", "rem_path", "delete_value", "_encode", +  "add_path", "rem_path", "delete_value", "_encode",    "_decode" >)[index] )    return ::`->(index);    return `[](index);
2995:    }    }    -  node = joinnode(({ instantiate_static_modules(static_modules), +  node = joinnode(({ +  // Kluge to get _static_modules to work at top level. +  ([ "_static_modules" : static_modules ]), +  instantiate_static_modules(static_modules),    // Copy relevant stuff from the root module.    @filter(root_module->joined_modules,    lambda(mixed x) {
3005:    root_module->fallback_module,    "predef::");    -  // FIXME: Is this needed? -  // Kluge to get _static_modules to work at top level. -  node->cache->_static_modules = static_modules; -  +     return node;    }