// Put it in the cache now to prevent circular import from recursing.
NModuleType mod = new NModuleType(Util.moduleNameFor(file), file, globaltable);
moduleTable.put(file, new NUrl("file://" + file), mod, NBinding.Kind.MODULE);
try {
NModule ast = null;
if (contents != null) {
ast = getAstForFile(file, contents);
} else {
ast = getAstForFile(file);
}
if (ast == null) {
return null;
}
finer("resolving: " + file);
ast.resolve(globaltable);
finer("[success]");
loadedFiles++;
return mod;
} catch (OutOfMemoryError e) {
if (astCache != null) {