Commit e7d9dd9c authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl

remove fields ident_environ and ident_symbol, add WARNED_NO_INLINE_CODE,...

remove fields ident_environ and ident_symbol, add WARNED_NO_INLINE_CODE, remove field dm_system_module_table_kind
parent 4baa8bab
......@@ -431,7 +431,6 @@ BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationT
dclModule->dm_system_module = isSystemModule;
dclModule->dm_function_symbol_a = gBEState.be_modules[moduleIndex].bem_functions;
dclModule->dm_n_function_symbols = gBEState.be_modules[moduleIndex].bem_nFunctions;
dclModule->dm_system_module_table_kind = FirstSystemModuleTable + moduleIndex;
AddOpenDefinitionModule (moduleNameSymbol, dclModule);
} /* BEDeclareDclModule */
......@@ -671,7 +670,6 @@ BESpecialArrayFunctionSymbol (BEArrayFunKind arrayFunKind, int functionIndex, in
newTypeAlt->type_alt_rhs = rhs;
newTypeAlt->type_alt_strict_positions = NULL;
newIdent->ident_symbol = newFunctionSymbol;
newIdent->ident_name = functionName;
newRuleType = ConvertAllocType (struct rule_type);
......@@ -2277,7 +2275,6 @@ DeclareFunctionC (char *name, int arity, int functionIndex, unsigned int ancesto
newIdent = ConvertAllocType (IdentS);
newIdent->ident_name = name;
newIdent->ident_symbol = &functions [functionIndex];
newSymbDef->sdef_ident = newIdent;
......@@ -2380,8 +2377,6 @@ BEDeclareRuleType (int functionIndex, int moduleIndex, CleanString name)
newIdent->ident_name = ConvertCleanString (name);
}
newIdent->ident_symbol = &functions [functionIndex];
newSymbDef = ConvertAllocType (SymbDefS);
newSymbDef->sdef_kind = NEWDEFINITION;
newSymbDef->sdef_exported = False;
......@@ -2459,7 +2454,6 @@ BEDeclareType (int typeIndex, int moduleIndex, CleanString name)
newIdent = ConvertAllocType (IdentS);
newIdent->ident_name = ConvertCleanString (name);
newIdent->ident_symbol = type_p;
/* RWS change this
newSymbDef = ConvertAllocType (SymbDefS);
*/
......@@ -2650,7 +2644,6 @@ BEFieldList (int fieldIndex, int moduleIndex, CleanString name, BETypeNodeP type
newIdent = ConvertAllocType (IdentS);
newIdent->ident_name = ConvertCleanString (name);
newIdent->ident_symbol = field_symbol_p;
field = ConvertAllocType (struct field_list);
field->fl_next = next_fields;
......@@ -2763,7 +2756,6 @@ BEDeclareConstructor (int constructorIndex, int moduleIndex, CleanString name)
newIdent = ConvertAllocType (IdentS);
newIdent->ident_name = ConvertCleanString (name);
newIdent->ident_symbol = constructor_p;
newSymbDef = ConvertAllocType (SymbDefS);
newSymbDef->sdef_kind = NEWDEFINITION;
......
......@@ -67,7 +67,7 @@ void ReadInlineCode (void)
if (i<n_function_symbols && d_mod->mod_name->symb_ident->ident_name!=CurrentModule)
/* 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,FirstSystemModuleTable+def_mod->dm_module_n);
}
}
}
......
......@@ -37,8 +37,6 @@ NewPredefinedTypeSymbol (SymbKind symbolKind, char *symbolName, IdentP *identPtr
symbol = NewSymbol (symbolKind);
ident = NewIdent (symbolName);
ident->ident_symbol = symbol;
ident->ident_environ= NULL;
*identPtr = ident;
return (symbol);
......@@ -53,8 +51,6 @@ NewPredefinedSymbol (SymbKind symbolKind, char *symbolName, IdentP *identPtr)
symbol = NewSymbol (symbolKind);
ident = NewIdent (symbolName);
ident->ident_symbol = symbol;
ident->ident_environ= NULL;
*identPtr = ident;
return (symbol);
......
......@@ -1338,8 +1338,8 @@ static void CallFunction2 (Label label, SymbDef def, Bool isjsr, StateS root_sta
if (!isjsr)
GenRtn (aout, bout, root_state);
} else {
if (def->sdef_ident->ident_environ && instr==NULL)
{ char *previous_module = CurrentModule;
if ((def->sdef_ident->ident_mark & WARNED_NO_INLINE_CODE)==0 && instr==NULL){
char *previous_module = CurrentModule;
char *previous_ext = CurrentExt;
CurrentModule = def->sdef_module;
......@@ -1350,7 +1350,7 @@ static void CallFunction2 (Label label, SymbDef def, Bool isjsr, StateS root_sta
CurrentModule = previous_module;
CurrentExt = previous_ext;
def->sdef_ident->ident_environ = (char *) NIL;
def->sdef_ident->ident_mark |= WARNED_NO_INLINE_CODE;
}
GenDStackLayout (ain, bin, fun_args);
if (isjsr){
......
......@@ -34,8 +34,7 @@ NewIdentInTable (TableKind tableKind, char *name)
ident->ident_name = name;
ident->ident_next = NULL;
ident->ident_environ = NULL;
ident->ident_symbol = NULL;
ident->ident_instructions = NULL;
ident->ident_mark = 0;
return (ident);
......@@ -69,8 +68,7 @@ NewIdent (char *name)
ident->ident_table = LastSystemModuleTable;
ident->ident_next = NULL;
ident->ident_environ = NULL;
ident->ident_symbol = NULL;
ident->ident_instructions = NULL;
ident->ident_mark = 0;
return ident;
......@@ -287,8 +285,6 @@ void ScanInlineFile (char *fname,TableKind system_module_table_kind)
*tail = '\0';
if (! (instrid = RetrieveFromSymbolTable (instr,system_module_table_kind)))
continue;
if (instrid->ident_environ!=importingModule)
continue;
if ((instrid->ident_mark & INLINE_MASK) != 0)
{
StaticMessage (True, "%s", "multiple .inline directives", instr);
......
......@@ -1177,8 +1177,7 @@ void ExamineTypesAndLhsOfSymbolDefinition (SymbDef def)
switch (def->sdef_kind){
case SYSRULE:
def->sdef_ident->ident_symbol = NULL;
def->sdef_ident->ident_environ = CurrentModule;
def->sdef_ident->ident_instructions = NULL;
case DEFRULE:
if (def->sdef_isused){
def->sdef_rule_type->rule_type_state_p = allocate_function_state (def->sdef_arity);
......
......@@ -159,21 +159,14 @@ STRUCT (symbol,Symbol) {
STRUCT(ident,Ident){
char * ident_name;
char * ident_environ;
union{
Symbol ident_u1_symbol;
char * ident_u1_instructions;
} ident_union1;
char * ident_instructions;
struct ident * ident_next;
unsigned char ident_table; /* TableKind */
unsigned char ident_mark;
};
#define ident_symbol ident_union1.ident_u1_symbol
#define ident_instructions ident_union1.ident_u1_instructions
#define INLINE_MASK 8
#define WARNED_NO_INLINE_CODE 16
/*
The order in which the annotationkinds appear in the enum type
......@@ -694,7 +687,6 @@ struct def_repr {
int dm_module_n;
int dm_n_function_symbols;
SymbolP dm_function_symbol_a;
TableKind dm_system_module_table_kind;
Bool dm_system_module;
ModuleFileTime dm_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