diff options
Diffstat (limited to 'backendC')
| -rw-r--r-- | backendC/CleanCompilerSources/backend.c | 6 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/backend.h | 14 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/compiledefines.h | 2 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/instructions.c | 12 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/instructions.h | 4 | ||||
| -rw-r--r-- | backendC/CleanCompilerSources/syntaxtr.t | 10 | 
6 files changed, 32 insertions, 16 deletions
| diff --git a/backendC/CleanCompilerSources/backend.c b/backendC/CleanCompilerSources/backend.c index bb09c6f..aef2907 100644 --- a/backendC/CleanCompilerSources/backend.c +++ b/backendC/CleanCompilerSources/backend.c @@ -367,7 +367,7 @@ BESetMainDclModuleN (int main_dcl_module_n_parameter)  }  void -BEDeclareIclModule (CleanString name, int nFunctions, int nTypes, int nConstructors, int nFields) +BEDeclareIclModule (CleanString name, CleanString modificationTime, int nFunctions, int nTypes, int nConstructors, int nFields)  {  	int		i;  	char	*cName; @@ -399,6 +399,7 @@ BEDeclareIclModule (CleanString name, int nFunctions, int nTypes, int nConstruct  	iclModule	= icl->beicl_module;  	iclModule->im_name			= moduleNameSymbol; +	iclModule->im_modification_time	= ConvertCleanString (modificationTime);  	iclModule->im_def_module	= NULL;  	iclModule->im_rules			= NULL;  	iclModule->im_start			= NULL; @@ -431,7 +432,7 @@ BEDeclareIclModule (CleanString name, int nFunctions, int nTypes, int nConstruct  } /* BEDeclareIclModule */  void -BEDeclareDclModule (int moduleIndex, CleanString name, int isSystemModule, int nFunctions, int nTypes, int nConstructors, int nFields) +BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationTime, int isSystemModule, int nFunctions, int nTypes, int nConstructors, int nFields)  {  	char	*cName;  	SymbolP	moduleNameSymbol; @@ -453,6 +454,7 @@ BEDeclareDclModule (int moduleIndex, CleanString name, int isSystemModule, int n  	dclModule	= ConvertAllocType (DefRepr);  	dclModule->dm_name			= moduleNameSymbol; +	dclModule->dm_modification_time	= ConvertCleanString (modificationTime);  	dclModule->dm_system_module	= isSystemModule;  	dclModule->dm_symbols		= gBEState.be_allSymbols; /* ??? too many symbols? */ diff --git a/backendC/CleanCompilerSources/backend.h b/backendC/CleanCompilerSources/backend.h index de0e54c..acfcf3e 100644 --- a/backendC/CleanCompilerSources/backend.h +++ b/backendC/CleanCompilerSources/backend.h @@ -1,15 +1,15 @@  /* version info */  // increment this for every release -# define	kBEVersionCurrent				0x02000212 +# define	kBEVersionCurrent				0x02000213  // change this to the same value as kBEVersionCurrent if the new release is not  // upward compatible (for example when a function is added) -# define	kBEVersionOldestDefinition		0x02000212 +# define	kBEVersionOldestDefinition		0x02000213  // 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	0x02000212 +# define	kBEVersionOldestImplementation	0x02000213  # define	kBEDebug	1 @@ -491,11 +491,11 @@ Clean (BEAbcCodeBlock:: Bool BEStringListP BackEnd -> (BECodeBlockP, BackEnd))  BECodeBlockP BEAnyCodeBlock (BECodeParameterP inParams, BECodeParameterP outParams, BEStringListP instructions);  Clean (BEAnyCodeBlock:: BECodeParameterP BECodeParameterP BEStringListP BackEnd -> (BECodeBlockP, BackEnd)) -void BEDeclareIclModule (CleanString name, int nFunctions, int nTypes, int nConstructors, int nFields); -Clean (BEDeclareIclModule ::  String Int Int Int Int BackEnd -> BackEnd) +void BEDeclareIclModule (CleanString name, CleanString modificationTime, int nFunctions, int nTypes, int nConstructors, int nFields); +Clean (BEDeclareIclModule ::  String String Int Int Int Int BackEnd -> BackEnd) -void BEDeclareDclModule (int moduleIndex, CleanString name, int systemModule, int nFunctions, int nTypes, int nConstructors, int nFields); -Clean (BEDeclareDclModule :: Int String Bool Int Int Int Int BackEnd -> BackEnd) +void BEDeclareDclModule (int moduleIndex, CleanString name, CleanString modificationTime, int systemModule, int nFunctions, int nTypes, int nConstructors, int nFields); +Clean (BEDeclareDclModule :: Int String String Bool Int Int Int Int BackEnd -> BackEnd)  void BEDeclarePredefinedModule (int nTypes, int nConstructors);  Clean (BEDeclarePredefinedModule :: Int Int BackEnd -> BackEnd) diff --git a/backendC/CleanCompilerSources/compiledefines.h b/backendC/CleanCompilerSources/compiledefines.h index 3e89a85..df91918 100644 --- a/backendC/CleanCompilerSources/compiledefines.h +++ b/backendC/CleanCompilerSources/compiledefines.h @@ -1,5 +1,5 @@ -#define CLEAN2 +#define CLEAN2 1  #define SHORT_CLASS_NAMES  #define U_RECORD_SELECTORS 1 diff --git a/backendC/CleanCompilerSources/instructions.c b/backendC/CleanCompilerSources/instructions.c index dafb606..9e29575 100644 --- a/backendC/CleanCompilerSources/instructions.c +++ b/backendC/CleanCompilerSources/instructions.c @@ -3200,7 +3200,7 @@ void GenFieldSelectorDescriptor (SymbDef sdef,int has_gc_apply_entry)  void GenModuleDescriptor (  #if WRITE_DCL_MODIFICATION_TIME -						FileTime file_time +						ModuleFileTime file_time  #else  						void  #endif @@ -3213,7 +3213,11 @@ void GenModuleDescriptor (  	if (WriteModificationTimes){  		FPutC (' ',OutFile);  		FPutC ('\"',OutFile); +# if CLEAN2 +		FPutS (file_time,OutFile); +# else  		FWriteFileTime (file_time,OutFile); +# endif  		FPutC ('\"',OutFile);  	}  #endif @@ -3221,7 +3225,7 @@ void GenModuleDescriptor (  void GenDepend (char *modname  #if WRITE_DCL_MODIFICATION_TIME -				,FileTime file_time +				,ModuleFileTime file_time  #endif  				)  { @@ -3235,7 +3239,11 @@ void GenDepend (char *modname  	if (WriteModificationTimes){  		FPutC (' ',OutFile);  		FPutC ('\"',OutFile); +# if CLEAN2 +		FPutS (file_time,OutFile); +# else  		FWriteFileTime (file_time,OutFile); +# endif  		FPutC ('\"',OutFile);  	}  #endif diff --git a/backendC/CleanCompilerSources/instructions.h b/backendC/CleanCompilerSources/instructions.h index c140d80..532aee7 100644 --- a/backendC/CleanCompilerSources/instructions.h +++ b/backendC/CleanCompilerSources/instructions.h @@ -173,8 +173,8 @@ void GenStrictConstructorDescriptor (SymbDef sdef,StateP constructor_arg_state_p  void GenArrayFunctionDescriptor (SymbDef arr_fun_def, Label desclab, int arity);  #if defined(WRITE_DCL_MODIFICATION_TIME) && WRITE_DCL_MODIFICATION_TIME -void GenModuleDescriptor (FileTime file_time); -void GenDepend (char *modname,FileTime file_time); +void GenModuleDescriptor (ModuleFileTime file_time); +void GenDepend (char *modname,ModuleFileTime file_time);  #else  void GenModuleDescriptor (void);  void GenDepend (char *modname); diff --git a/backendC/CleanCompilerSources/syntaxtr.t b/backendC/CleanCompilerSources/syntaxtr.t index 3b58edb..7ce4b8d 100644 --- a/backendC/CleanCompilerSources/syntaxtr.t +++ b/backendC/CleanCompilerSources/syntaxtr.t @@ -935,6 +935,12 @@ struct string_list {  };  #endif +#if CLEAN2 +typedef char * ModuleFileTime; +#else +typedef FileTime ModuleFileTime; +#endif +  typedef struct {  	Symbol				im_name;  	Symbol				im_symbols; @@ -957,7 +963,7 @@ typedef struct {  	struct string_list *	im_imported_libs;  #endif  #if WRITE_DCL_MODIFICATION_TIME -	FileTime			im_modification_time; +	ModuleFileTime		im_modification_time;  #endif  } *ImpMod, ImpRepr; @@ -979,6 +985,6 @@ struct def_repr {  	struct module_info *	dm_module_info;  #endif  #if WRITE_DCL_MODIFICATION_TIME -	FileTime	dm_modification_time; +	ModuleFileTime	dm_modification_time;  #endif  }; | 
