Skip to content

Commit

Permalink
Reverted change
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Nov 11, 2024
1 parent 274f751 commit f87daa2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,13 @@ ModuleStatus addTModel (str qualifiedModuleName, TModel tm, ModuleStatus ms){

private type[TModel] ReifiedTModel = #TModel; // precomputed for efficiency

tuple[bool, TModel, ModuleStatus] getTModelForModule(str qualifiedModuleName, ModuleStatus ms, bool convert2physical=false){
tuple[bool, TModel, ModuleStatus] getTModelForModule(str qualifiedModuleName, ModuleStatus ms){
if(traceTModelCache) println("getTModelForModule: <qualifiedModuleName>");
pcfg = ms.pathConfig;
if(ms.tmodels[qualifiedModuleName]?){
return <true, ms.tmodels[qualifiedModuleName], ms>;
tm = convertTModel2PhysicalLocs(ms.tmodels[qualifiedModuleName]);
ms.tmodels[qualifiedModuleName] = tm;
return <true, tm, ms>;
}
while(size(ms.tmodels) >= tmodelCacheSize && size(ms.tmodelLIFO) > 0 && ms.tmodelLIFO[-1] != qualifiedModuleName){
ms = removeOldestTModelFromCache(ms);
Expand All @@ -264,9 +266,7 @@ tuple[bool, TModel, ModuleStatus] getTModelForModule(str qualifiedModuleName, Mo
tm = readBinaryValueFile(ReifiedTModel, tplLoc);
if(tm.rascalTplVersion? && isValidRascalTplVersion(tm.rascalTplVersion)){
tm.usesPhysicalLocs = false; // temporary
if(convert2physical){
tm = convertTModel2PhysicalLocs(tm);
}
tm = convertTModel2PhysicalLocs(tm);
ms.tmodels[qualifiedModuleName] = tm;
mloc = getModuleLocation(qualifiedModuleName, pcfg);
if(isModuleLocationInLibs(qualifiedModuleName, mloc, pcfg)){
Expand Down

0 comments on commit f87daa2

Please sign in to comment.