Commit 9fa28186 authored by John van Groningen's avatar John van Groningen
Browse files

refactor, in the backend rename nothing_symb as none_symb and nothing_sym as none_sym

parent b7e0bb14
......@@ -242,7 +242,7 @@ InitPredefinedSymbols (void)
gBasicSymbols [nil_symb] = PredefinedSymbol (nil_symb, 0);
gBasicSymbols [cons_symb] = PredefinedSymbol (cons_symb, 2);
gBasicSymbols [nothing_symb]= PredefinedSymbol (nothing_symb, 0);
gBasicSymbols [none_symb] = PredefinedSymbol (none_symb, 0);
gBasicSymbols [just_symb] = PredefinedSymbol (just_symb, 1);
for (i = 0; i < MaxNodeArity; i++)
......@@ -1323,7 +1323,7 @@ void BEAdjustOverloadedNothingFunction (int functionIndex,int moduleIndex)
symbol_p=&gBEState.be_modules[moduleIndex].bem_functions[functionIndex];
symbol_p->symb_kind = nothing_symb;
symbol_p->symb_kind = none_symb;
symbol_p->symb_head_strictness=OVERLOADED_CONS;
}
......
......@@ -3650,7 +3650,7 @@ void generate_is_constructor (ImpRuleP rule)
GenEqDesc (&cons_lab,case_node->node_arity,0);
break;
}
case nothing_symb:
case none_symb:
GenEqDesc (&nothing_lab,case_node->node_arity,0);
break;
case just_symb:
......@@ -4569,7 +4569,7 @@ static int generate_code_for_switch_node (NodeP node,int asp,int bsp,struct esc
}
}
break;
case nothing_symb:
case none_symb:
if (case_number==1){
GenJmp (&case_label);
matches_always=1;
......
......@@ -3671,7 +3671,7 @@ static void FillNormalNode (Node node,int *asp_p,int *bsp_p,NodeId update_node_i
*asp_p-=node->node_arity;
}
return;
case nothing_symb:
case none_symb:
if ((symb->symb_head_strictness & 1) && !simple_expression_without_node_ids (node->node_arguments->arg_node)){
BuildArg (node->node_arguments,asp_p,bsp_p,code_gen_node_ids_p);
GenPopA (1);
......
......@@ -1033,7 +1033,7 @@ static void CodeNormalRootNode (Node root,NodeId rootid,int asp,int bsp,CodeGenN
FillRhsRoot (&nil_lab, root, asp, bsp,code_gen_node_ids_p);
return;
case nothing_symb:
case none_symb:
if (rootsymb->symb_head_strictness & 1){
if (!simple_expression_without_node_ids (root->node_arguments->arg_node)){
BuildArg (root->node_arguments,&asp,&bsp,code_gen_node_ids_p);
......
......@@ -340,7 +340,7 @@ char *symbol_to_string (Symbol symbol)
return "[]";
case just_symb:
return "+?";
case nothing_symb:
case none_symb:
return "-?";
case select_symb:
return "_Select";
......
......@@ -1349,7 +1349,7 @@ static char *create_arguments_for_local_function (NodeP node_p,ArgS ***arg_h,Arg
#endif
#ifdef THUNK_LIFT_0_CONSTRUCTORS
case nil_symb:
case nothing_symb:
case none_symb:
if (arg_node->node_arity==0){
NodeP function_node;
ArgP new_arg;
......@@ -1591,7 +1591,7 @@ static char *create_arguments_for_local_function (NodeP node_p,ArgS ***arg_h,Arg
call_state_p=&node_id->nid_node->node_state;
} else if (arg_node->node_kind==NormalNode){
#ifdef STRICT_STATE_FOR_LAZY_TUPLE_CONSTRUCTORS
if (BETWEEN (tuple_symb,nothing_symb,arg_node->node_symbol->symb_kind)
if (BETWEEN (tuple_symb,none_symb,arg_node->node_symbol->symb_kind)
&& !(arg_node->node_symbol->symb_kind==cons_symb && (arg_node->node_symbol->symb_head_strictness>LAZY_CONS || arg_node->node_symbol->symb_tail_strictness))
&& !(arg_node->node_symbol->symb_kind==just_symb && arg_node->node_symbol->symb_head_strictness>LAZY_CONS)
&& arg_node->node_state.state_type==SimpleState && arg_node->node_state.state_kind==OnA)
......@@ -2239,7 +2239,7 @@ static void optimise_normal_node (Node node)
#else
if ((BETWEEN (int_denot,real_denot,symbol->symb_kind)
|| symbol->symb_kind==string_denot
|| (BETWEEN (tuple_symb,nothing_symb,symbol->symb_kind)
|| (BETWEEN (tuple_symb,none_symb,symbol->symb_kind)
&& !(symbol->symb_kind==cons_symb && (symbol->symb_head_strictness>1 || symbol->symb_tail_strictness))
&& !(symbol->symb_kind==just_symb && (symbol->symb_head_strictness>1))
)
......@@ -3166,7 +3166,7 @@ static void optimise_strict_constructor_in_lazy_context (NodeP node,FreeUniqueNo
#endif
}
}
} else if (symbol->symb_kind==nothing_symb){
} else if (symbol->symb_kind==none_symb){
if (node->node_state.state_type==SimpleState && node->node_state.state_kind==OnA && node->node_arity==0)
if ((symbol->symb_head_strictness & 1)==0)
node->node_state.state_kind=StrictOnA;
......
......@@ -114,7 +114,7 @@ static Fun
* tuplesym[MaxNodeArity], /* the tuple ids */
* lazy_just_sym0,
* strict_just_sym0,
* nothing_sym,
* none_sym,
* strict_sym[MaxNrAnnots], /* the strict ids */
* fail_sym, /* the fail id */
* inffunct_sym, /* the E2 id */
......@@ -2252,9 +2252,9 @@ static Exp ConvertNode (Node node, NodeId nid)
e->e_fun = lazy_just_sym0+arity;
}
break;
case nothing_symb:
case none_symb:
e->e_hnf = True;
e->e_fun = nothing_sym;
e->e_fun = none_sym;
break;
case apply_symb:
e->e_fun = apsym;
......@@ -2671,9 +2671,9 @@ static Exp convert_pattern (SymbolP symbol_p,int arity,NodeIdListElementP node_i
e->e_fun = lazy_just_sym0+arity;
}
break;
case nothing_symb:
case none_symb:
e->e_hnf = True;
e->e_fun = nothing_sym;
e->e_fun = none_sym;
break;
case definition:
{
......@@ -3509,7 +3509,7 @@ static void init_predefined_symbols (void)
conssym = lazy_cons_sym0+2;
#endif
nothing_sym = f;
none_sym = f;
f->fun_symbol = NULL;
f->fun_arity = 0;
f->fun_kind = Constructor;
......
......@@ -2113,7 +2113,7 @@ static Bool NodeInAStrictContext (Node node,StateS demanded_state,int local_scop
SetUnaryState (&node->node_state, StrictOnA, MaybeObj);
break;
case nothing_symb:
case none_symb:
if (rootsymb->symb_head_strictness & 1)
parallel = DetermineStrictArgContext (node->node_arguments,StrictState,local_scope);
......
......@@ -48,7 +48,7 @@ typedef enum {
integer_denot,
string_denot,
tuple_symb,
cons_symb, just_symb, nil_symb, nothing_symb,
cons_symb, just_symb, nil_symb, none_symb,
apply_symb, if_symb, fail_symb, seq_symb,
select_symb,
Nr_Of_Predef_FunsOrConses,
......
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