From a078bbaea4dd3e117bf0f0b836f6bd7484b78d37 Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 20 Aug 2015 10:55:26 +0000 Subject: add record label to .record directive for list of unboxed records git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2609 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backendC/CleanCompilerSources/instructions.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c index 9c79159..e7b4c1f 100644 --- a/backendC/CleanCompilerSources/instructions.c +++ b/backendC/CleanCompilerSources/instructions.c @@ -3130,19 +3130,22 @@ void GenUnboxedConsRecordDescriptor (SymbDef sdef,int tail_strict) GenABStackElemsOfRecord (tuple_arguments_state[0]); GenABStackElems (tuple_arguments_state[1]); - if (!has_unboxed_record){ - 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); - } else { - FPrintF (OutFile," %d %d ",asize,bsize); + FPrintF (OutFile," %d %d ",asize,bsize); + if (has_unboxed_record) GenUnboxedRecordLabelsReversedForRecord (tuple_arguments_state[0]); - if (ExportLocalLabels) - FPrintF (OutFile,tail_strict ? "\"_Cons#!%s\"" : "\"_Cons#\"",name); + + if (!sdef->sdef_exported && sdef->sdef_module==CurrentModule && !ExportLocalLabels){ + if (DoDebug) + FPrintF (OutFile, R_PREFIX "%s ",name); else - FPrintF (OutFile,tail_strict ? "\"[#%s!]\"" : "\"[#%s]\"",name); - } + FPrintF (OutFile, R_PREFIX "%u ",sdef->sdef_number); + } else + FPrintF (OutFile, "e_%s_" R_PREFIX "%s ",sdef->sdef_module,name); + + if (ExportLocalLabels) + FPrintF (OutFile,tail_strict ? "\"_Cons#!%s\"" : "\"_Cons#\"",name); + else + FPrintF (OutFile,tail_strict ? "\"[#%s!]\"" : "\"[#%s]\"",name); } #endif -- cgit v1.2.3