aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r--backendC/CleanCompilerSources/codegen1.c19
-rw-r--r--backendC/CleanCompilerSources/instructions.c9
-rw-r--r--backendC/CleanCompilerSources/instructions.h1
3 files changed, 20 insertions, 9 deletions
diff --git a/backendC/CleanCompilerSources/codegen1.c b/backendC/CleanCompilerSources/codegen1.c
index 2835e22..bdffb6b 100644
--- a/backendC/CleanCompilerSources/codegen1.c
+++ b/backendC/CleanCompilerSources/codegen1.c
@@ -51,6 +51,7 @@ char d_pref[] = "d";
char n_pref[] = "n";
char ea_pref[] = "ea";
+char eu_pref[] = "eu";
char l_pref[] = "l";
char s_pref[] = "s";
@@ -890,7 +891,7 @@ static void GenerateConstructorDescriptorAndFunction (ConstructorList constructo
static void GenLazyRecordEntry (SymbDef rdef)
{
- LabDef record_label,d_label,ea_label,*ea_label_p;
+ LabDef record_label,d_label,eu_label,*eu_label_p;
States argstates;
int asp,bsp,arity;
int maxasize,asize,bsize;
@@ -905,31 +906,31 @@ static void GenLazyRecordEntry (SymbDef rdef)
if (rdef->sdef_boxed_record){
if (rdef->sdef_exported){
- GenExportEaEntry (rdef);
- MakeSymbolLabel (&ea_label,CurrentModule,ea_pref,rdef,0);
+ GenExportEuEntry (rdef);
+ MakeSymbolLabel (&eu_label,CurrentModule,eu_pref,rdef,0);
} else {
- MakeSymbolLabel (&ea_label,NULL,ea_pref,rdef,0);
+ MakeSymbolLabel (&eu_label,NULL,eu_pref,rdef,0);
}
- ea_label_p=&ea_label;
+ eu_label_p=&eu_label;
} else
- ea_label_p=NULL;
+ eu_label_p=NULL;
if (DoTimeProfiling)
GenPB (rdef->sdef_ident->ident_name);
GenLazyRecordDescriptorAndExport (rdef);
- GenLazyRecordNodeEntryDirective (arity,&d_label,ea_label_p);
+ GenLazyRecordNodeEntryDirective (arity,&d_label,eu_label_p);
GenOAStackLayout (1);
GenLabelDefinition (&CurrentAltLabel);
GenPushNode (ReduceError,asp);
- if (ea_label_p!=NULL){
+ if (eu_label_p!=NULL){
GenOAStackLayout (arity+1);
if (DoTimeProfiling)
GenPN();
- GenLabelDefinition (&ea_label);
+ GenLabelDefinition (&eu_label);
}
asize=0;
diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c
index 5987c76..b1a07f1 100644
--- a/backendC/CleanCompilerSources/instructions.c
+++ b/backendC/CleanCompilerSources/instructions.c
@@ -91,6 +91,7 @@ static void ConvertOptionsToString (char *optstring)
#define L_PREFIX "l"
#define EA_PREFIX "ea"
+#define EU_PREFIX "eu"
#define S_PREFIX "s"
#define R_PREFIX "r"
@@ -2564,6 +2565,14 @@ void GenExportEaEntry (SymbDef sdef)
}
}
+void GenExportEuEntry (SymbDef sdef)
+{
+ if (sdef->sdef_calledwithrootnode){
+ put_directive_ (Dexport);
+ FPrintF (OutFile,"e_%s_" EU_PREFIX "%s",CurrentModule,sdef->sdef_ident->ident_name);
+ }
+}
+
void GenDAStackLayout (int asize)
{
if (DoStackLayout){
diff --git a/backendC/CleanCompilerSources/instructions.h b/backendC/CleanCompilerSources/instructions.h
index 62d2b6c..21b4dce 100644
--- a/backendC/CleanCompilerSources/instructions.h
+++ b/backendC/CleanCompilerSources/instructions.h
@@ -145,6 +145,7 @@ void GenExportRecord (SymbDef sdef);
void GenExportFieldSelector (SymbDef sdef);
void GenExportStrictAndEaEntry (SymbDef sdef);
void GenExportEaEntry (SymbDef sdef);
+void GenExportEuEntry (SymbDef sdef);
void GenDAStackLayout (int asize);
void GenDStackLayoutOfStates (int asize,int bsize,int n_states,StateP state_p);