Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
clean-compiler-and-rts
compiler
Commits
c04d30b2
Commit
c04d30b2
authored
Jun 27, 2019
by
johnvg@science.ru.nl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove verbose printing and some unused code and definitions from
backend
parent
8c44cc9d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
2 additions
and
77 deletions
+2
-77
backendC/CleanCompilerSources/cocl.c
backendC/CleanCompilerSources/cocl.c
+2
-6
backendC/CleanCompilerSources/codegen.c
backendC/CleanCompilerSources/codegen.c
+0
-2
backendC/CleanCompilerSources/compiler.c
backendC/CleanCompilerSources/compiler.c
+0
-22
backendC/CleanCompilerSources/comsupport.c
backendC/CleanCompilerSources/comsupport.c
+0
-13
backendC/CleanCompilerSources/comsupport.h
backendC/CleanCompilerSources/comsupport.h
+0
-2
backendC/CleanCompilerSources/instructions.c
backendC/CleanCompilerSources/instructions.c
+0
-7
backendC/CleanCompilerSources/mac.h
backendC/CleanCompilerSources/mac.h
+0
-4
backendC/CleanCompilerSources/sa.c
backendC/CleanCompilerSources/sa.c
+0
-2
backendC/CleanCompilerSources/sun.h
backendC/CleanCompilerSources/sun.h
+0
-5
backendC/CleanCompilerSources/windows_io.h
backendC/CleanCompilerSources/windows_io.h
+0
-14
No files found.
backendC/CleanCompilerSources/cocl.c
View file @
c04d30b2
...
@@ -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
,
"
\n
Concurrent 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
;
}
}
...
...
backendC/CleanCompilerSources/codegen.c
View file @
c04d30b2
...
@@ -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
;
...
...
backendC/CleanCompilerSources/compiler.c
View file @
c04d30b2
#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
;
}
}
backendC/CleanCompilerSources/comsupport.c
View file @
c04d30b2
...
@@ -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
;
...
...
backendC/CleanCompilerSources/comsupport.h
View file @
c04d30b2
...
@@ -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
);
...
...
backendC/CleanCompilerSources/instructions.c
View file @
c04d30b2
...
@@ -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'
;
...
...
backendC/CleanCompilerSources/mac.h
View file @
c04d30b2
...
@@ -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)
backendC/CleanCompilerSources/sa.c
View file @
c04d30b2
...
@@ -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_
...
...
backendC/CleanCompilerSources/sun.h
View file @
c04d30b2
...
@@ -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)
...
...
backendC/CleanCompilerSources/windows_io.h
View file @
c04d30b2
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment