aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r--backendC/CleanCompilerSources/backend.c15
-rw-r--r--backendC/CleanCompilerSources/backend.h4
2 files changed, 13 insertions, 6 deletions
diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c
index d830ccc..726cfd6 100644
--- a/backendC/CleanCompilerSources/backend.c
+++ b/backendC/CleanCompilerSources/backend.c
@@ -370,9 +370,11 @@ BEDeclareIclModule (CleanString name, int nFunctions, int nTypes, int nConstruct
ImpMod iclModule;
BEIclP icl;
-/* cName = ConvertCleanString (name); */
cName = gBEState.be_modules [main_dcl_module_n].bem_name;
+ if (cName == NULL)
+ cName = ConvertCleanString (name);
+
moduleNameSymbol = ConvertAllocType (SymbolS);
moduleNameSymbol->symb_ident = Identifier (cName);
@@ -449,9 +451,9 @@ BEDeclareDclModule (int moduleIndex, CleanString name, int isSystemModule, int n
dclModule->dm_system_module = isSystemModule;
dclModule->dm_symbols = gBEState.be_allSymbols; /* ??? too many symbols? */
- if (moduleIndex != main_dcl_module_n)
- AddOpenDefinitionModule (moduleNameSymbol, dclModule);
- else
+ AddOpenDefinitionModule (moduleNameSymbol, dclModule);
+
+ if (moduleIndex == main_dcl_module_n)
gBEState.be_allSymbols = saveSymbols;
} /* BEDeclareDclModule */
@@ -468,10 +470,15 @@ BEDeclarePredefinedModule (int nTypes, int nConstructors)
void
BEDeclareModules (int nModules)
{
+ int i;
+
Assert (gBEState.be_modules == NULL);
gBEState.be_nModules = (unsigned int) nModules;
gBEState.be_modules = (BEModuleP) ConvertAlloc (nModules * sizeof (BEModuleS));
+
+ for (i = 0; i < nModules; i++)
+ gBEState.be_modules [i].bem_name = NULL;
} /* BEDeclareModules */
BESymbolP
diff --git a/backendC/CleanCompilerSources/backend.h b/backendC/CleanCompilerSources/backend.h
index 0411868..2198250 100644
--- a/backendC/CleanCompilerSources/backend.h
+++ b/backendC/CleanCompilerSources/backend.h
@@ -1,7 +1,7 @@
/* version info */
// increment this for every release
-# define kBEVersionCurrent 0x02000208
+# define kBEVersionCurrent 0x02000209
// change this to the same value as kBEVersionCurrent if the new release is not
// upward compatible (for example when a function is added)
@@ -9,7 +9,7 @@
// change this to the same value as kBEVersionCurrent if the new release is not
// downward compatible (for example when a function is removed)
-# define kBEVersionOldestImplementation 0x02000208
+# define kBEVersionOldestImplementation 0x02000209
# define kBEDebug 1