Commit 2989b654 authored by John van Groningen's avatar John van Groningen
Browse files

in struct strict_node_id remove unused fields snid_ident and snid_mark

parent 6ef5b893
......@@ -2341,7 +2341,6 @@ BEStrictNodeId (BENodeIdP nodeId)
StrictNodeId strictNodeId;
strictNodeId = ConvertAllocType (struct strict_node_id);
strictNodeId->snid_mark = 0;
strictNodeId->snid_node_id = nodeId;
/* +++ remove this hack */
......
......@@ -97,25 +97,11 @@ NewStrictNodeId (NodeId nodeId, StrictNodeIdP next)
strictNodeId = NewStrict (next);
strictNodeId->snid_mark = 0;
strictNodeId->snid_node_id = nodeId;
return (strictNodeId);
} /* NewStrictNodeId */
StrictNodeIdP
NewStrictIdent (Ident ident, StrictNodeIdP next)
{
StrictNodeIdP strictNodeId;
strictNodeId = NewStrict (next);
strictNodeId->snid_mark = STRICT_NODE_ID_IDENT_MASK;
strictNodeId->snid_ident = ident;
return (strictNodeId);
} /* NewStrictIdent */
TypeVar
NewTypeVar (IdentP nid)
{
......
......@@ -47,7 +47,6 @@ extern NodeP NewIntNode (int value);
extern NodeIdP NewNodeId (IdentP nid);
extern StrictNodeIdP NewStrictNodeId (NodeIdP node_id, StrictNodeIdP next);
extern StrictNodeIdP NewStrictIdent (Ident ident, StrictNodeIdP next);
extern TypeVar NewTypeVar (IdentP nid);
extern NodeDefs NewNodeDefinition (NodeIdP nid, NodeP node);
extern SymbolP NewSymbol (SymbKind symbolKind);
......
......@@ -393,12 +393,8 @@ void PrintRuleNode (Node node,Bool brackets,int n_leading_spaces,File file)
FPutS ("let! ", file);
for_l (strict_node_id,node->node_strict_node_ids,snid_next){
if (strict_node_id->snid_mark & STRICT_NODE_ID_IDENT_MASK){
FPrintF (file, " %s",strict_node_id->snid_ident->ident_name);
} else {
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
FPutC ('\n',file);
print_spaces (n_leading_spaces+4,file);
......@@ -439,12 +435,8 @@ void PrintRuleNode (Node node,Bool brackets,int n_leading_spaces,File file)
FPutS ("let! ", file);
for_l (strict_node_id,node->node_strict_node_ids,snid_next){
if (strict_node_id->snid_mark & STRICT_NODE_ID_IDENT_MASK){
FPrintF (file, " %s",strict_node_id->snid_ident->ident_name);
} else {
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
FPutC ('\n',file);
print_spaces (n_leading_spaces+4,file);
......@@ -583,12 +575,8 @@ void PrintRuleAlt (RuleAlts rulealt,int n_leading_spaces,File file)
FPutS ("let! ", file);
for_l (strict_node_id,rulealt->alt_strict_node_ids,snid_next){
if (strict_node_id->snid_mark & STRICT_NODE_ID_IDENT_MASK){
FPrintF (file, " %s",strict_node_id->snid_ident->ident_name);
} else {
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
DPrintNodeId (strict_node_id->snid_node_id,file);
FPutS ("; ",file);
}
FPutC ('\n',file);
print_spaces (n_leading_spaces,file);
......
......@@ -378,7 +378,6 @@ static StrictNodeIdP copy_strict_node_ids (StrictNodeIdP old_strict_node_ids)
new = CompAllocType (StrictNodeIdS);
new->snid_mark = old_p->snid_mark;
#ifdef OBSERVE_ARRAY_SELECTS_IN_PATTERN
new->snid_array_select_in_pattern=old_p->snid_array_select_in_pattern;
#endif
......@@ -639,7 +638,6 @@ static Node copy_root_node (Node old)
for_l (strict_node_id_p,case_node_p->node_strict_node_ids,snid_next){
new_strict_node_id=CompAllocType (StrictNodeIdS);
new_strict_node_id->snid_mark=0;
*strict_node_id_h=new_strict_node_id;
new_strict_node_id->snid_node_id = strict_node_id_p->snid_node_id->nid_forward_node_id;
......@@ -686,7 +684,6 @@ static Node copy_root_node (Node old)
for_l (strict_node_id_p,old->node_guard_strict_node_ids,snid_next){
new_strict_node_id=CompAllocType (StrictNodeIdS);
new_strict_node_id->snid_mark=0;
*strict_node_id_h=new_strict_node_id;
new_strict_node_id->snid_node_id = strict_node_id_p->snid_node_id->nid_forward_node_id;
......
......@@ -297,22 +297,13 @@ typedef struct imp_rule *ImpRules;
typedef struct rule_type *RuleTypes;
STRUCT (strict_node_id,StrictNodeId){
union {
NodeId val_node_id; /* if snid_kind==0 */
Ident val_ident; /* if snid_kind==1 */
} snid_val;
NodeId snid_node_id;
struct strict_node_id * snid_next;
unsigned snid_mark:8;
#ifdef OBSERVE_ARRAY_SELECTS_IN_PATTERN
unsigned snid_array_select_in_pattern:1;
#endif
};
#define STRICT_NODE_ID_IDENT_MASK 1
#define snid_node_id snid_val.val_node_id
#define snid_ident snid_val.val_ident
STRUCT (if_node_contents,IfNodeContents){
NodeDefs if_then_node_defs;
ImpRules if_then_rules;
......
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