Commit c04d30b2 authored by johnvg@science.ru.nl's avatar johnvg@science.ru.nl
Browse files

remove verbose printing and some unused code and definitions from

backend
parent 8c44cc9d
...@@ -99,7 +99,6 @@ Bool CallCompiler (int argc, char **argv) ...@@ -99,7 +99,6 @@ Bool CallCompiler (int argc, char **argv)
#endif #endif
DoWarning = True; DoWarning = True;
DoVerbose = False;
DoCode = True; DoCode = True;
DoDebug = False; DoDebug = False;
DoStrictnessAnalysis = True; DoStrictnessAnalysis = True;
...@@ -144,7 +143,7 @@ Bool CallCompiler (int argc, char **argv) ...@@ -144,7 +143,7 @@ Bool CallCompiler (int argc, char **argv)
argv_i=argv[i]; argv_i=argv[i];
if (strcmp (argv_i, "-v") == 0) if (strcmp (argv_i, "-v") == 0)
DoVerbose = True; ;
else if (strcmp (argv_i, "-w") == 0){ else if (strcmp (argv_i, "-w") == 0){
DoWarning = False; DoWarning = False;
DoStrictWarning = False; DoStrictWarning = False;
...@@ -319,10 +318,7 @@ Bool CallCompiler (int argc, char **argv) ...@@ -319,10 +318,7 @@ Bool CallCompiler (int argc, char **argv)
if (fname) if (fname)
return Compile (fname,output_file_name); return Compile (fname,output_file_name);
else if (DoVerbose){ else {
FPrintF (StdOut, "\nConcurrent Clean Compiler (Version %d.%d)\n\n", VERSION / 1000, VERSION % 1000);
return True;
} else {
CmdError ("no input file given"); CmdError ("no input file given");
return False; return False;
} }
......
...@@ -1184,8 +1184,6 @@ void CodeGeneration (ImpMod imod, char *fname) ...@@ -1184,8 +1184,6 @@ void CodeGeneration (ImpMod imod, char *fname)
if (DoCode && !CompilerError){ if (DoCode && !CompilerError){
ImpRuleS *rule; ImpRuleS *rule;
Verbose ("Code generation");
if (!OpenABCFile (fname)){ if (!OpenABCFile (fname)){
StaticMessage (True, "<open file>","Can't create abc file '%s'",fname); StaticMessage (True, "<open file>","Can't create abc file '%s'",fname);
return; return;
......
#undef PROFILE
#include "compiledefines.h" #include "compiledefines.h"
#include "types.t" #include "types.t"
#include "system.h" #include "system.h"
...@@ -13,11 +11,6 @@ ...@@ -13,11 +11,6 @@
#include "codegen.h" #include "codegen.h"
#include "statesgen.h" #include "statesgen.h"
#ifdef _PROFILE_
/* FROM profile IMPORT */
extern DumpProfile ();
#endif
char *CurrentFilePath; char *CurrentFilePath;
static Bool RemoveExtension (char *name) static Bool RemoveExtension (char *name)
...@@ -41,8 +34,6 @@ static void AddExtension (char *name) ...@@ -41,8 +34,6 @@ static void AddExtension (char *name)
static void ExecCompiler (char *fname,char *output_file_name) static void ExecCompiler (char *fname,char *output_file_name)
{ {
ImpMod imod; ImpMod imod;
/* PrintVersion (); */
if (fname){ if (fname){
Bool hadext; Bool hadext;
...@@ -97,21 +88,12 @@ static void ExecCompiler (char *fname,char *output_file_name) ...@@ -97,21 +88,12 @@ static void ExecCompiler (char *fname,char *output_file_name)
CmdError ("No source file specified"); CmdError ("No source file specified");
} }
#ifdef PROFILE
#include "profile.h"
#endif
#ifdef _MAC_ #ifdef _MAC_
extern void GetInitialPathList (void); extern void GetInitialPathList (void);
#endif #endif
Bool Compile (char *fname,char *output_file_name) Bool Compile (char *fname,char *output_file_name)
{ {
#ifdef PROFILE
InitProfile (900,300);
freopen ("Profile","w",stdout);
#endif
#ifdef _MAC_ #ifdef _MAC_
GetInitialPathList(); GetInitialPathList();
#endif #endif
...@@ -124,9 +106,5 @@ Bool Compile (char *fname,char *output_file_name) ...@@ -124,9 +106,5 @@ Bool Compile (char *fname,char *output_file_name)
ExitCompiler (); ExitCompiler ();
#ifdef PROFILE
DumpProfile();
#endif
return ! CompilerError; return ! CompilerError;
} }
...@@ -440,19 +440,6 @@ void StaticMessage (Bool error, char *symbol_format, char *message_format, ...) ...@@ -440,19 +440,6 @@ void StaticMessage (Bool error, char *symbol_format, char *message_format, ...)
CompilerError = True; CompilerError = True;
} }
void Verbose (char *msg)
{
if (DoVerbose)
FPrintF (StdVerboseL, "%s \"%s%s\"\n", msg, CurrentModule, CurrentExt);
}
void PrintVersion (void)
{
if (DoVerbose)
FPrintF (StdVerboseL, "Concurrent Clean Compiler (Version %d.%d)\n",
VERSION / 1000, VERSION % 1000);
}
static char Init[] = "Compiler initialization"; static char Init[] = "Compiler initialization";
File OpenedFile; File OpenedFile;
......
...@@ -45,8 +45,6 @@ extern void CompFree (void); ...@@ -45,8 +45,6 @@ extern void CompFree (void);
extern Bool ArgParser (int argc, char *argv[]); extern Bool ArgParser (int argc, char *argv[]);
extern void FatalCompError (char *mod, char *proc, char *mess); extern void FatalCompError (char *mod, char *proc, char *mess);
extern void Verbose (char *msg);
extern void PrintVersion (void);
extern void InitSettings (void); extern void InitSettings (void);
extern void ExitOnInterrupt (void); extern void ExitOnInterrupt (void);
extern void InitCompiler (void); extern void InitCompiler (void);
......
...@@ -45,11 +45,7 @@ static void error_in_function (char *m) ...@@ -45,11 +45,7 @@ static void error_in_function (char *m)
*/ */
#define N_DoStrictnessAnalysis 4 #define N_DoStrictnessAnalysis 4
#define N_NoTimeProfiling 5 #define N_NoTimeProfiling 5
#define N_ExportLocalLabels 6 #define N_ExportLocalLabels 6
/*
#define N_DoVerbose 6
*/
#define N_DoWarning 7 #define N_DoWarning 7
#define N_System 8 #define N_System 8
#define N_DoFusion 9 #define N_DoFusion 9
...@@ -74,9 +70,6 @@ static void ConvertOptionsToString (char *optstring) ...@@ -74,9 +70,6 @@ static void ConvertOptionsToString (char *optstring)
optstring[N_NoTimeProfiling] = !DoTimeProfiling ? '1' : '0'; optstring[N_NoTimeProfiling] = !DoTimeProfiling ? '1' : '0';
optstring[N_ExportLocalLabels] = ExportLocalLabels ? '1' : '0'; optstring[N_ExportLocalLabels] = ExportLocalLabels ? '1' : '0';
/*
optstring[N_DoVerbose] = DoVerbose ? '1' : '0';
*/
optstring[N_DoWarning] = DoWarning ? '1' : '0'; optstring[N_DoWarning] = DoWarning ? '1' : '0';
optstring[N_System] = '0'; optstring[N_System] = '0';
......
...@@ -35,11 +35,7 @@ void FreePathList (void); ...@@ -35,11 +35,7 @@ void FreePathList (void);
#else #else
#define StdError stdout #define StdError stdout
#endif #endif
#define StdVerboseH stdout
#define StdVerboseL stdout
#define StdListTypes stdout
#define FGetC(f) fgetc(f) #define FGetC(f) fgetc(f)
#define FGetS(s,n,f) fgets(s,n,f) #define FGetS(s,n,f) fgets(s,n,f)
#define FPutC(c,f) fputc(c,f) #define FPutC(c,f) fputc(c,f)
...@@ -5696,8 +5696,6 @@ int init_strictness_analysis (ImpMod imod) ...@@ -5696,8 +5696,6 @@ int init_strictness_analysis (ImpMod imod)
StrictAllWarning = DoStrictAllWarning; StrictAllWarning = DoStrictAllWarning;
StrictChecks = DoStrictCheck; StrictChecks = DoStrictCheck;
StrictExportChecks = DoStrictExportChecks; StrictExportChecks = DoStrictExportChecks;
Verbose ("Strictness analysis");
/* Initialise all */ /* Initialise all */
#ifdef _DB_ #ifdef _DB_
......
...@@ -26,11 +26,6 @@ typedef FILE *File; ...@@ -26,11 +26,6 @@ typedef FILE *File;
extern FILE *std_out_file_p,*std_error_file_p; extern FILE *std_out_file_p,*std_error_file_p;
#define StdOut std_out_file_p #define StdOut std_out_file_p
#define StdError std_error_file_p #define StdError std_error_file_p
#define StdVerboseH std_out_file_p
#define StdVerboseL std_out_file_p
#define StdTrace std_out_file_p
#define StdDebug std_out_file_p
#define StdListTypes std_out_file_p
#define FGetC(f) fgetc(f) #define FGetC(f) fgetc(f)
#define FGetS(s,n,f) fgets(s,n,f) #define FGetS(s,n,f) fgets(s,n,f)
......
...@@ -32,27 +32,13 @@ typedef float FourBytesReal; ...@@ -32,27 +32,13 @@ typedef float FourBytesReal;
typedef FILE *File; typedef FILE *File;
/* special for MacIntosh command line support */
extern void InitIO (void);
extern void GetPreferences (char *fname);
#ifdef _MSC_VER #ifdef _MSC_VER
extern FILE *std_out_file_p,*std_error_file_p; extern FILE *std_out_file_p,*std_error_file_p;
# define StdOut std_out_file_p # define StdOut std_out_file_p
# define StdError std_error_file_p # define StdError std_error_file_p
# define StdVerboseH std_out_file_p
# define StdVerboseL std_out_file_p
# define StdTrace std_out_file_p
# define StdDebug std_out_file_p
# define StdListTypes std_out_file_p
#else #else
# define StdOut stdout # define StdOut stdout
# define StdError stderr # define StdError stderr
# define StdVerboseH stdout
# define StdVerboseL stdout
# define StdTrace stdout
# define StdDebug stdout;
# define StdListTypes stdout
#endif #endif
#define FGetC(f) fgetc(f) #define FGetC(f) fgetc(f)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment