diff options
author | johnvg | 2003-12-09 14:54:09 +0000 |
---|---|---|
committer | johnvg | 2003-12-09 14:54:09 +0000 |
commit | f9792b9f3a6016a22dd2853569afcdd50752acb7 (patch) | |
tree | ac16e47cff450ae9046f29aa6e989e859ee8ae9d /backendC/CleanCompilerSources | |
parent | bug fix for strict and unboxed list constructors on a cycle in (diff) |
propagate strictness to strict head and/or tail of a strict
list constructor on a cycle
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1423 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r-- | backendC/CleanCompilerSources/statesgen.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/backendC/CleanCompilerSources/statesgen.c b/backendC/CleanCompilerSources/statesgen.c index 1fe9494..16667a9 100644 --- a/backendC/CleanCompilerSources/statesgen.c +++ b/backendC/CleanCompilerSources/statesgen.c @@ -2262,7 +2262,29 @@ static Bool NodeInASemiStrictContext (Node node,int local_scope) } } else DecrRefCountCopiesOfArgs (node->node_arguments IF_OPTIMIZE_LAZY_TUPLE_RECURSION(local_scope)); - } else + } +#if STRICT_LISTS + else if (symb->symb_kind==cons_symb && node->node_arity==2){ + ArgP arg_p; + + arg_p=node->node_arguments; + if (symb->symb_head_strictness>1){ + if (ArgInAStrictContext (arg_p,StrictState,True,local_scope)) + parallel = True; + } else + if (ShouldDecrRefCount) + DecrRefCountCopiesOfArg (arg_p IF_OPTIMIZE_LAZY_TUPLE_RECURSION(local_scope)); + + arg_p=arg_p->arg_next; + if (symb->symb_tail_strictness){ + if (ArgInAStrictContext (arg_p,StrictState,True,local_scope)) + parallel = True; + } else + if (ShouldDecrRefCount) + DecrRefCountCopiesOfArg (arg_p IF_OPTIMIZE_LAZY_TUPLE_RECURSION(local_scope)); + } +#endif + else DecrRefCountCopiesOfArgs (node->node_arguments IF_OPTIMIZE_LAZY_TUPLE_RECURSION(local_scope)); if (parallel) |