diff options
Diffstat (limited to 'backendC')
-rw-r--r-- | backendC/CleanCompilerSources/codegen2.c | 4 | ||||
-rw-r--r-- | backendC/CleanCompilerSources/optimisations.c | 8 | ||||
-rw-r--r-- | backendC/CleanCompilerSources/syntaxtr.t | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/backendC/CleanCompilerSources/codegen2.c b/backendC/CleanCompilerSources/codegen2.c index e1446a0..b3054ac 100644 --- a/backendC/CleanCompilerSources/codegen2.c +++ b/backendC/CleanCompilerSources/codegen2.c @@ -3499,7 +3499,7 @@ int is_unique_record_update (NodeIdP record_node_id,NodeP record_node) #endif if ((record_node_id->nid_state.state_mark & STATE_UNIQUE_MASK)!=0 && -#if 1 +#if BOXED_RECORDS ( ((record_node_id->nid_mark2 & (NID_RECORD_USED_BY_UPDATE | NID_RECORD_USED_BY_NON_SELECTOR_OR_UPDATES))==NID_RECORD_USED_BY_UPDATE && record_node_id->nid_refcount==-2) @@ -3516,7 +3516,7 @@ int is_unique_record_update (NodeIdP record_node_id,NodeP record_node) return 1; } -# if 1 +#if BOXED_RECORDS # if 0 printf ("%d %d %d %d\n",record_node_id->nid_state.state_type==SimpleState,record_node_id->nid_mark2,record_node_id->nid_mark,record_node_id->nid_refcount); # endif diff --git a/backendC/CleanCompilerSources/optimisations.c b/backendC/CleanCompilerSources/optimisations.c index 9ceed19..2e8517a 100644 --- a/backendC/CleanCompilerSources/optimisations.c +++ b/backendC/CleanCompilerSources/optimisations.c @@ -2638,9 +2638,9 @@ static void optimise_node_in_then_or_else (NodeP node,FreeUniqueNodeIdsS **f_nod node_id=arg->arg_node->node_node_id; if ((node_id->nid_mark2 & NID_HAS_REFCOUNT_WITHOUT_UPDATES)!=0 && node_id->nid_refcount==-2) ++node_id->nid_number; - +# if BOXED_RECORDS node_id->nid_mark2 |= NID_RECORD_USED_BY_UPDATE; - +# endif arg=arg->arg_next; } # if BOXED_RECORDS @@ -2915,9 +2915,9 @@ static void optimise_node (NodeP node,FreeUniqueNodeIdsS **f_node_ids_l) node_id=arg->arg_node->node_node_id; if ((node_id->nid_mark2 & NID_HAS_REFCOUNT_WITHOUT_UPDATES)!=0 && node_id->nid_refcount==-2) ++node_id->nid_number; - +# if BOXED_RECORDS node_id->nid_mark2 |= NID_RECORD_USED_BY_UPDATE; - +# endif arg=arg->arg_next; } # if BOXED_RECORDS diff --git a/backendC/CleanCompilerSources/syntaxtr.t b/backendC/CleanCompilerSources/syntaxtr.t index c51183b..233ac3c 100644 --- a/backendC/CleanCompilerSources/syntaxtr.t +++ b/backendC/CleanCompilerSources/syntaxtr.t @@ -340,8 +340,10 @@ STRUCT (node_id,NodeId){ /* Masks for nid_mark2 */ #define NID_SELECTION_NODE_ID 1 -#define NID_RECORD_USED_BY_UPDATE 2 -#define NID_RECORD_USED_BY_NON_SELECTOR_OR_UPDATES 4 +#if BOXED_RECORDS +# define NID_RECORD_USED_BY_UPDATE 2 +# define NID_RECORD_USED_BY_NON_SELECTOR_OR_UPDATES 4 +#endif #define NID_FIELD_NAME_MASK 32 /* typechecker */ #define NID_COMPONENT_DETERMINED_MASK 256 /* optimise_lambda */ |