Commit a1747cbb authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

prevent unnecessary scanning of abc files: fix test to only scan abc file of a...

prevent unnecessary scanning of abc files: fix test to only scan abc file of a system module if the strict entry of a function is called
parent 9d911014
...@@ -446,7 +446,7 @@ BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationT ...@@ -446,7 +446,7 @@ BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationT
char *cName; char *cName;
SymbolP moduleNameSymbol; SymbolP moduleNameSymbol;
DefMod dclModule; DefMod dclModule;
SymbolP saveSymbols; SymbolP saveSymbols,previous_all_symbols;
cName = ConvertCleanString (name); cName = ConvertCleanString (name);
...@@ -459,13 +459,16 @@ BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationT ...@@ -459,13 +459,16 @@ BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationT
gBEState.be_allSymbols = NULL; gBEState.be_allSymbols = NULL;
} }
previous_all_symbols = gBEState.be_allSymbols;
DeclareModule (moduleIndex, cName, isSystemModule, nFunctions, nTypes, nConstructors, nFields); DeclareModule (moduleIndex, cName, isSystemModule, nFunctions, nTypes, nConstructors, nFields);
dclModule = ConvertAllocType (DefRepr); dclModule = ConvertAllocType (DefRepr);
dclModule->dm_name = cName; dclModule->dm_name = cName;
dclModule->dm_modification_time = ConvertCleanString (modificationTime); dclModule->dm_modification_time = ConvertCleanString (modificationTime);
dclModule->dm_system_module = isSystemModule; dclModule->dm_system_module = isSystemModule;
dclModule->dm_symbols = gBEState.be_allSymbols; /* ??? too many symbols? */ dclModule->dm_symbols = gBEState.be_allSymbols;
dclModule->dm_symbols_end = previous_all_symbols;
dclModule->dm_system_module_table_kind = FirstSystemModuleTable + moduleIndex; dclModule->dm_system_module_table_kind = FirstSystemModuleTable + moduleIndex;
AddOpenDefinitionModule (moduleNameSymbol, dclModule); AddOpenDefinitionModule (moduleNameSymbol, dclModule);
......
...@@ -78,9 +78,11 @@ void ReadInlineCode (void) ...@@ -78,9 +78,11 @@ void ReadInlineCode (void)
def_mod=d_mod->mod_body; def_mod=d_mod->mod_body;
if (def_mod->dm_system_module){ if (def_mod->dm_system_module){
Symbol symbol; Symbol symbol,symbols_end;
for_l (symbol,def_mod->dm_symbols,symb_next) symbols_end=def_mod->dm_symbols_end;
for (symbol=def_mod->dm_symbols; symbol!=NULL && symbol!=symbols_end; symbol=symbol->symb_next)
if (symbol->symb_kind==definition){ if (symbol->symb_kind==definition){
SymbDef sdef; SymbDef sdef;
...@@ -89,7 +91,7 @@ void ReadInlineCode (void) ...@@ -89,7 +91,7 @@ void ReadInlineCode (void)
break; break;
} }
if (symbol!=NULL && d_mod->mod_name->symb_ident->ident_name!=CurrentModule) if (symbol!=NULL && symbol!=symbols_end && d_mod->mod_name->symb_ident->ident_name!=CurrentModule)
/* Get the inline instructions of all the rules that are defined in this module */ /* Get the inline instructions of all the rules that are defined in this module */
ScanInlineFile (d_mod->mod_name->symb_ident->ident_name,def_mod->dm_system_module_table_kind); ScanInlineFile (d_mod->mod_name->symb_ident->ident_name,def_mod->dm_system_module_table_kind);
} }
......
...@@ -688,6 +688,7 @@ typedef struct { ...@@ -688,6 +688,7 @@ typedef struct {
struct def_repr { struct def_repr {
char * dm_name; char * dm_name;
Symbol dm_symbols; Symbol dm_symbols;
Symbol dm_symbols_end;
TableKind dm_system_module_table_kind; TableKind dm_system_module_table_kind;
Bool dm_system_module; Bool dm_system_module;
#if WRITE_DCL_MODIFICATION_TIME #if WRITE_DCL_MODIFICATION_TIME
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment