diff options
author | johnvg | 2004-04-14 12:36:24 +0000 |
---|---|---|
committer | johnvg | 2004-04-14 12:36:24 +0000 |
commit | 142cb15873fe0233248bdf0ae19f5d9996dda79c (patch) | |
tree | dd9c90fa7d75d278f071607e8acfc373133b19e4 /backendC/CleanCompilerSources/optimisations.c | |
parent | fix possible compiler crash if a type synonym has a . on the rhs (added case (diff) |
mark lazy and/or curried entries of cons for list of unboxed records
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1485 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources/optimisations.c')
-rw-r--r-- | backendC/CleanCompilerSources/optimisations.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/backendC/CleanCompilerSources/optimisations.c b/backendC/CleanCompilerSources/optimisations.c index e4bf8ea..9f210d6 100644 --- a/backendC/CleanCompilerSources/optimisations.c +++ b/backendC/CleanCompilerSources/optimisations.c @@ -1421,6 +1421,7 @@ static char *create_arguments_for_local_function (NodeP node_p,ArgS ***arg_h,Arg } } #endif + if (arg_node->node_kind==NodeIdNode && (arg_node->node_node_id->nid_mark & NID_LIFTED_BY_OPTIMISE) && arg_node->node_node_id->nid_forward_node_id!=NULL){ arg_node_id=arg_node->node_node_id->nid_forward_node_id; --arg_node_id->nid_refcount; @@ -3283,8 +3284,15 @@ static void ExamineSymbolApplication (struct node *node) symbol=node->node_symbol; - if (symbol->symb_kind!=definition) + if (symbol->symb_kind!=definition){ + if (symbol->symb_kind==cons_symb && symbol->symb_head_strictness==4){ + if (node->node_arity<2) + symbol->symb_unboxed_cons_sdef_p->sdef_mark |= SDEF_USED_CURRIED_MASK; + else if (IsLazyState (node->node_state)) + symbol->symb_unboxed_cons_sdef_p->sdef_mark |= SDEF_USED_LAZILY_MASK; + } return; + } sdef=symbol->symb_def; |