aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources/instructions.c
diff options
context:
space:
mode:
authorjohnvg2015-07-20 12:40:31 +0000
committerjohnvg2015-07-20 12:40:31 +0000
commit62dc482edf2885b9f47e21b10a7699d7bbe30418 (patch)
tree7f8088db12bf4fea155d14ba7f239eab1bc941ee /backendC/CleanCompilerSources/instructions.c
parentfix name in descriptor for unboxed lists of records if exporting local labels (diff)
fix names and export labels of tuple selectors > 6 if exporting local labels
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2577 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources/instructions.c')
-rw-r--r--backendC/CleanCompilerSources/instructions.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c
index 16ed2c6..fbf9e4b 100644
--- a/backendC/CleanCompilerSources/instructions.c
+++ b/backendC/CleanCompilerSources/instructions.c
@@ -3595,12 +3595,30 @@ void GenStart (SymbDef startsymb)
#ifdef NEW_SELECTOR_DESCRIPTORS
void GenSelectorDescriptor (Label sellab,int element_n)
{
+ if (sellab->lab_issymbol){
+ char *name;
+
+ name=sellab->lab_symbol->sdef_ident->ident_name;
+
+ put_directive_ (Dexport);
+ FPrintF (OutFile, "e_%s_" D_PREFIX "%s.%d",sellab->lab_mod, name, sellab->lab_post);
+ put_directive_ (Dexport);
+ FPrintF (OutFile, "e_%s_%s%s.%d",sellab->lab_mod, sellab->lab_pref, name, sellab->lab_post);
+
put_directive_ (Ddescs);
+ FPrintF (OutFile, "e_%s_" D_PREFIX "%s.%d e_%s_%s%s.%d _ %d 0 \"%s.%d\"",
+ sellab->lab_mod, name, sellab->lab_post,
+ sellab->lab_mod, sellab->lab_pref, name, sellab->lab_post,
+ element_n+1,
+ name, sellab->lab_post);
+ } else {
+ put_directive_ (Ddescs);
FPrintF (OutFile, D_PREFIX "%s.%d %s%s.%d _ %d 0 \"%s.%d\"",
sellab->lab_name, sellab->lab_post,
sellab->lab_pref, sellab->lab_name, sellab->lab_post,
element_n+1,
sellab->lab_name, sellab->lab_post);
+ }
}
#else
void GenSelectorDescriptor (Label sellab,char *g_pref)