aboutsummaryrefslogtreecommitdiff
path: root/backendC
diff options
context:
space:
mode:
Diffstat (limited to 'backendC')
-rw-r--r--backendC/CleanCompilerSources/codegen1.c15
-rw-r--r--backendC/CleanCompilerSources/codegen2.c11
-rw-r--r--backendC/CleanCompilerSources/instructions.c5
3 files changed, 21 insertions, 10 deletions
diff --git a/backendC/CleanCompilerSources/codegen1.c b/backendC/CleanCompilerSources/codegen1.c
index b96bed6..fc0a66e 100644
--- a/backendC/CleanCompilerSources/codegen1.c
+++ b/backendC/CleanCompilerSources/codegen1.c
@@ -1179,12 +1179,17 @@ void GenerateCodeForLazyUnboxedRecordListFunctions (void)
type_node_arguments_p=fun_def->sdef_rule_type->rule_type_rule->type_alt_lhs->type_node_arguments;
tail_strict=type_node_arguments_p->type_arg_next->type_arg_node->type_node_symbol->symb_tail_strictness;
- unboxed_record_cons_lab.lab_mod=ExportLocalLabels ? CurrentModule : NULL;
+ if (ExportLocalLabels){
+ unboxed_record_cons_lab.lab_mod=CurrentModule;
+ unboxed_record_cons_lab.lab_symbol=type_node_arguments_p->type_arg_node->type_node_symbol->symb_def;
+ unboxed_record_cons_lab.lab_issymbol=True;
+ } else {
+ unboxed_record_cons_lab.lab_name=type_node_arguments_p->type_arg_node->type_node_symbol->symb_def->sdef_ident->ident_name;
+ unboxed_record_cons_lab.lab_issymbol=False;
+ }
unboxed_record_cons_lab.lab_pref=tail_strict ? "r_Cons#!" : "r_Cons#";
- unboxed_record_cons_lab.lab_issymbol=False;
- unboxed_record_cons_lab.lab_name=type_node_arguments_p->type_arg_node->type_node_symbol->symb_def->sdef_ident->ident_name;
unboxed_record_cons_lab.lab_post='\0';
-
+
GenFillR (&unboxed_record_cons_lab,a_size,b_size,a_size,0,0,ReleaseAndFill,True);
GenRtn (1,0,OnAState);
@@ -2386,8 +2391,6 @@ SymbDef create_match_function (SymbolP constructor_symbol,int constructor_arity,
#if STRICT_LISTS
if (constructor_symbol->symb_kind==cons_symb && (constructor_symbol->symb_head_strictness>1 || constructor_symbol->symb_tail_strictness)){
- constructor_symbol->symb_def->sdef_constructor->cl_state_p;
-
if (constructor_symbol->symb_head_strictness>1){
if (constructor_symbol->symb_head_strictness==4)
head_and_tail_states[0]=*constructor_symbol->symb_state_p;
diff --git a/backendC/CleanCompilerSources/codegen2.c b/backendC/CleanCompilerSources/codegen2.c
index 2b1cb6a..f8d0d49 100644
--- a/backendC/CleanCompilerSources/codegen2.c
+++ b/backendC/CleanCompilerSources/codegen2.c
@@ -2879,10 +2879,15 @@ LabDef *unboxed_cons_label (SymbolP cons_symbol_p)
if (cons_symbol_p->symb_unboxed_cons_state_p->state_type==SimpleState && BETWEEN (IntObj,FileObj,cons_symbol_p->symb_unboxed_cons_state_p->state_object))
return &unboxed_cons_labels[cons_symbol_p->symb_unboxed_cons_state_p->state_object-IntObj][cons_symbol_p->symb_tail_strictness];
else if (cons_symbol_p->symb_unboxed_cons_state_p->state_type==RecordState){
- unboxed_record_cons_lab.lab_mod=ExportLocalLabels ? CurrentModule : NULL;
+ if (ExportLocalLabels){
+ unboxed_record_cons_lab.lab_mod=CurrentModule;
+ unboxed_record_cons_lab.lab_symbol=cons_symbol_p->symb_unboxed_cons_state_p->state_record_symbol;
+ unboxed_record_cons_lab.lab_issymbol=True;
+ } else {
+ unboxed_record_cons_lab.lab_name=cons_symbol_p->symb_unboxed_cons_state_p->state_record_symbol->sdef_ident->ident_name;
+ unboxed_record_cons_lab.lab_issymbol=False;
+ }
unboxed_record_cons_lab.lab_pref=cons_symbol_p->symb_tail_strictness ? "r_Cons#!" : "r_Cons#";
- unboxed_record_cons_lab.lab_issymbol=False;
- unboxed_record_cons_lab.lab_name=cons_symbol_p->symb_unboxed_cons_state_p->state_record_symbol->sdef_ident->ident_name;
unboxed_record_cons_lab.lab_post='\0';
return &unboxed_record_cons_lab;
diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c
index ebed588..9c03346 100644
--- a/backendC/CleanCompilerSources/instructions.c
+++ b/backendC/CleanCompilerSources/instructions.c
@@ -2812,7 +2812,10 @@ void GenUnboxedConsRecordDescriptor (SymbDef sdef,int tail_strict)
DetermineSizeOfState (tuple_state,&asize,&bsize);
- FPrintF (OutFile,tail_strict ? " %d %d \"[#%s!]\"" : " %d %d \"[#%s]\"",asize,bsize,name);
+ if (ExportLocalLabels)
+ FPrintF (OutFile,tail_strict ? " %d %d \"_Cons#!%s\"" : " %d %d \"_Cons#\"",asize,bsize,name);
+ else
+ FPrintF (OutFile,tail_strict ? " %d %d \"[#%s!]\"" : " %d %d \"[#%s]\"",asize,bsize,name);
}
#endif