Commit df5e109e authored by John van Groningen's avatar John van Groningen
Browse files

remove RecordNode, IdentNode, ApplyNode, ScopeNode and IndirectionNode

parent 57687b77
......@@ -283,28 +283,6 @@ NewUpdateNode (SymbolP symb, Args args, int arity)
return (NewNodeByKind (UpdateNode, symb, args, arity));
} /* NewUpdateNode */
NodeP
NewIdentifierNode (IdentP ident, Args args, int arity)
{
NodeP node;
node = NewNodeByKind (IdentNode, NIL, args, arity);
node->node_ident = ident;
return (node);
} /* NewIdentifierNode */
NodeP
NewApplyNode (NodeP function_node, Args args, int arity)
{
NodeP node;
node = NewNodeByKind (ApplyNode, NIL, args, arity);
node->node_node = function_node;
return (node);
} /* NewApplyNode */
NodeP
NewIfNode (void)
{
......@@ -342,24 +320,6 @@ NewSelectNode (SymbolP selectSymbol, NodeIdP selectId, int arity)
return (NewNode (selectSymbol, selectArg, arity));
} /* NewSelectNode */
NodeP
NewScopeNode (NodeP node, NodeDefP node_defs,ImpRuleS *imp_rules)
{
struct node *sc_node;
sc_node=CompAllocType (struct node);
sc_node->node_kind=ScopeNode;
sc_node->node_annotation=NoAnnot;
sc_node->node_node=node;
sc_node->node_scope_node_defs=node_defs;
sc_node->node_scope_imp_rules=imp_rules;
sc_node->node_arguments=NULL;
sc_node->node_arity=0;
return sc_node;
} /* NewScopeNode */
NodeDefs
NewNodeDefinition (NodeIdP nid, NodeP node)
{
......
......@@ -42,9 +42,7 @@ extern NodeP NewNode (SymbolP symb, Args args, int arity);
extern NodeP NewIfNode (void);
extern NodeP NewSelectorNode (SymbolP symb, Args args, int arity);
extern NodeP NewNodeIdNode (NodeIdP node_id);
extern NodeP NewApplyNode (NodeP function_node, Args args, int arity);
extern NodeP NewUpdateNode (SymbolP symb,Args args,int arity);
extern NodeP NewIdentifierNode (IdentP ident, Args args, int arity);
extern NodeP NewNodeByKind (NodeKind nodeKind, SymbolP symb, Args args, int arity);
# define NewNormalNode(symb, args, arity) NewNodeByKind (NormalNode, (symb), (args), (arity))
# define NewRecordNode(symb, args, arity) NewNodeByKind (RecordNode, (symb), (args), (arity))
......@@ -79,7 +77,6 @@ extern TypeNode NewTypeVarNode (TypeVar node_id,Annotation annot, AttributeKind
extern RuleTypes NewRuleType (TypeAlts type_alt, unsigned line_nr);
extern NodeP NewSelectNode (SymbolP selectSymbol, NodeIdP selectId, int arity);
extern NodeP NewScopeNode (NodeP node, NodeDefP node_defs,ImpRuleS *imp_rules);
extern NodeIdP BuildSelect (NodeP node, NodeDefs **node_defs_p);
extern NodeIdP BuildSelectors (NodeP pattern, NodeP node, NodeDefs **node_defs_p);
......
......@@ -397,8 +397,6 @@ STRUCT (if_node_contents,IfNodeContents){
typedef enum {
IfNode, NormalNode, SelectorNode, NodeIdNode, UpdateNode, MatchNode, /* normal nodes */
RecordNode, IdentNode, ApplyNode, ScopeNode, /* nodes in parser and checker */
IndirectionNode, /* nodes in optimise_lambda */
SwitchNode, CaseNode, DefaultNode, PushNode, GuardNode, TupleSelectorsNode, FillUniqueNode /* nodes in codegen */
} NodeKind;
......@@ -443,10 +441,6 @@ STRUCT (node,Node){
struct node_id_ref_count_list * u_node_id_ref_counts;
#endif
} su_u;
struct {
struct node_def * scope_node_defs;
struct imp_rule * scope_imp_rules;
} su_scope; /* for ScopeNode */
#if STRICT_LISTS
struct {
SymbolP push_symbol;
......@@ -493,9 +487,6 @@ STRUCT (node,Node){
#define node_else_strict_node_ids node_contents.contents_if->if_else_strict_node_ids
#define node_if_scope node_contents.contents_if->if_local_scope
#define node_scope_node_defs node_su.su_scope.scope_node_defs
#define node_scope_imp_rules node_su.su_scope.scope_imp_rules
#if STRICT_LISTS
# define node_push_symbol node_su.su_push.push_symbol
# define node_decons_node node_su.su_push.push_pu.pu_decons_node
......
Supports Markdown
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