Commit 777c3dbf authored by John van Groningen's avatar John van Groningen
Browse files

fix label names for unboxed lists of records with dynamics

parent 3e7a6df3
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
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