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

don't generate abc code to build dictionary for overloaded Nil

parent 5ce1019e
......@@ -2898,6 +2898,22 @@ LabDef *unboxed_cons_label (SymbolP cons_symbol_p)
}
#endif
#if STRICT_LISTS
int simple_expression_without_node_ids (NodeP node_p)
{
if (node_p->node_kind==NormalNode){
ArgP arg_p;
for_l (arg_p,node_p->node_arguments,arg_next)
if (!simple_expression_without_node_ids (arg_p->arg_node))
return False;
return True;
}
return False;
}
#endif
static void FillNormalNode (Node node,int *asp_p,int *bsp_p,NodeId update_node_id,CodeGenNodeIdsP code_gen_node_ids_p)
{
Symbol symb;
......@@ -3082,7 +3098,7 @@ static void FillNormalNode (Node node,int *asp_p,int *bsp_p,NodeId update_node_i
return;
case nil_symb:
#if STRICT_LISTS
if (symb->symb_head_strictness & 1){
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);
--*asp_p;
......
......@@ -707,6 +707,10 @@ static int CodeRhsNodeDefsAndRestoreNodeIdStates (Node root_node,NodeDefs defs,i
#define BETWEEN(l,h,v) ((unsigned)((v)-(l)) <= (unsigned)((h)-(l)))
#if STRICT_LISTS
extern int simple_expression_without_node_ids (NodeP node_p);
#endif
static void CodeNormalRootNode (Node root,NodeId rootid,int asp,int bsp,CodeGenNodeIdsP code_gen_node_ids_p,StateS resultstate)
{
Symbol rootsymb;
......@@ -792,9 +796,11 @@ static void CodeNormalRootNode (Node root,NodeId rootid,int asp,int bsp,CodeGenN
case nil_symb:
#if STRICT_LISTS
if (rootsymb->symb_head_strictness & 1){
BuildArg (root->node_arguments,&asp,&bsp,code_gen_node_ids_p);
GenPopA (1);
--asp;
if (!simple_expression_without_node_ids (root->node_arguments->arg_node)){
BuildArg (root->node_arguments,&asp,&bsp,code_gen_node_ids_p);
GenPopA (1);
--asp;
}
if (resultstate.state_kind==StrictRedirection){
GenPopA (asp);
......
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