Commit 6e5a5f52 authored by John van Groningen's avatar John van Groningen
Browse files

allow record update nodes with more than 2 arguments

parent f9d47e14
...@@ -2027,8 +2027,11 @@ BEUpdateNode (BEArgP args) ...@@ -2027,8 +2027,11 @@ BEUpdateNode (BEArgP args)
{ {
NodeP node; NodeP node;
SymbolP recordSymbol; SymbolP recordSymbol;
int n_args;
Assert (CountArgs (args) == 2); n_args = CountArgs (args);
Assert (n_args >= 2);
Assert (args->arg_next->arg_node->node_kind == SelectorNode); Assert (args->arg_next->arg_node->node_kind == SelectorNode);
Assert (args->arg_next->arg_node->node_arity == BESelector); Assert (args->arg_next->arg_node->node_arity == BESelector);
...@@ -2039,7 +2042,7 @@ BEUpdateNode (BEArgP args) ...@@ -2039,7 +2042,7 @@ BEUpdateNode (BEArgP args)
node->node_annotation = NoAnnot; node->node_annotation = NoAnnot;
node->node_kind = UpdateNode; node->node_kind = UpdateNode;
node->node_symbol = recordSymbol; node->node_symbol = recordSymbol;
node->node_arity = 2; node->node_arity = n_args;
node->node_arguments = args; node->node_arguments = args;
node->node_number=0; node->node_number=0;
...@@ -3190,6 +3193,10 @@ RemoveSpecialArrayFunctionsFromSymbolList (SymbolP *symbolH) ...@@ -3190,6 +3193,10 @@ RemoveSpecialArrayFunctionsFromSymbolList (SymbolP *symbolH)
} }
} /* RemoveSpecialArrayFunctionsFromSymbolList */ } /* RemoveSpecialArrayFunctionsFromSymbolList */
#if 0
File rules_file;
#endif
int int
BEGenerateCode (CleanString outputFile) BEGenerateCode (CleanString outputFile)
{ {
...@@ -3214,25 +3221,27 @@ BEGenerateCode (CleanString outputFile) ...@@ -3214,25 +3221,27 @@ BEGenerateCode (CleanString outputFile)
#if 0 #if 0
{ {
File f; rules_file=fopen ("Rules","w");
if (rules_file){
f=fopen ("Rules","w");
if (f){
ImpRuleS *rule; ImpRuleS *rule;
for (rule=gBEState.be_icl.beicl_module->im_rules; rule!=NULL; rule=rule->rule_next){ for (rule=gBEState.be_icl.beicl_module->im_rules; rule!=NULL; rule=rule->rule_next){
PrintImpRule (rule,4,f); PrintImpRule (rule,4,rules_file);
if (rule->rule_next!=NULL) if (rule->rule_next!=NULL)
FPutC ('\n',f); FPutC ('\n',rules_file);
} }
fclose (f);
} }
} }
#endif #endif
CodeGeneration (gBEState.be_icl.beicl_module, outputFileName); CodeGeneration (gBEState.be_icl.beicl_module, outputFileName);
#if 0
if (rules_file)
fclose (rules_file);
#endif
return (!CompilerError); return (!CompilerError);
} /* BEGenerateCode */ } /* BEGenerateCode */
......
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