|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.compiler.Compiler | +--at.dms.kjc.Main
The entry point of the compiler, containing the main
method.
Inner Class Summary | |
(package private) static class |
Main.ThreadedChecker
|
(package private) static class |
Main.ThreadedGenerator
|
(package private) static class |
Main.ThreadedParser
Helper class that implements multithreaded parsing. |
(package private) static class |
Main.ThreadedVisitor
|
Field Summary | |
protected boolean |
errorFound
Was there at least one error. |
protected java.util.List |
infiles
Files to compiler. |
protected KjcOptions |
options
Command-line options. |
Constructor Summary | |
Main()
|
Method Summary | |
protected void |
acceptMultiProc(JCompilationUnit[] tree)
|
protected void |
checkBody(JCompilationUnit cunit)
check that body of a given compilation unit is correct side effect: increment error number |
protected void |
checkBodyMultiProc(JCompilationUnit[] tree)
|
protected void |
checkInitializers(JCompilationUnit cunit)
check that interface of a given compilation unit is correct side effect: increment error number |
protected void |
checkInterface(JCompilationUnit cunit)
check that interface of a given compilation unit is correct side effect: increment error number |
protected void |
checkTransformedInterfaces(JCompilationUnit cunit)
check that interface of the transformed types in a given compilation unit is correct side effect: increment error number |
protected void |
checkTransformedTypesBody(JCompilationUnit cunit)
check that body of a given compilation unit is correct side effect: increment error number |
static boolean |
compile(java.lang.String[] args)
Second entry point |
protected boolean |
filterWarning(CWarning warning)
|
void |
genCode(java.lang.String destination)
Generates the code from an array of compilation unit and a destination |
protected void |
genCodeMultiProc(CSourceClass[] tree,
java.lang.String destination)
|
protected void |
generateJavaCode(JCompilationUnit cunit)
generate the source code of parsed compilation unit |
CSourceClass[] |
getClasses()
Returns the classes to generate |
protected WarningFilter |
getFilter()
|
KjcPrettyPrinter |
getPrettyPrinter(java.lang.String fileName)
Shows an error/warning and set error flag to true |
protected void |
initialize()
Initialize the compiler (read classpath, check classes.zip) |
static void |
main(java.lang.String[] args)
Entry point |
int |
optimizeCode()
|
boolean |
parseArguments(java.lang.String[] args)
Parse the argument list. |
boolean |
parseComments()
Returns true iff comments should be parsed (false if to be skipped) |
protected JCompilationUnit |
parseFile(java.io.File file)
parse the given file and return a compilation unit. |
protected void |
parseMultiProc(JCompilationUnit[] tree)
Parse each file in multi thread |
void |
reportTrouble(PositionedError trouble)
Reports a trouble (error or warning). |
boolean |
run(java.lang.String[] args)
Runs a compilation session. |
protected void |
transformTypes(JCompilationUnit cunit)
Transform classes before code generation. |
boolean |
verboseMode()
Returns true iff compilation runs in verbose mode. |
Methods inherited from class at.dms.compiler.Compiler |
checkDestination, getTimestamp, inform, inform, inform, inform, inform, inform, inform, run, setDebug, setErr, setWorkingDirectory, verifyFiles |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.util.List infiles
protected boolean errorFound
protected KjcOptions options
Constructor Detail |
public Main()
Method Detail |
public boolean run(java.lang.String[] args)
run
in class Compiler
args
- The command line arguments.public boolean parseArguments(java.lang.String[] args)
public void genCode(java.lang.String destination)
destination
- the directory where to write classfilesprotected void initialize()
public boolean verboseMode()
Compiler
verboseMode
in class Compiler
public int optimizeCode()
public KjcPrettyPrinter getPrettyPrinter(java.lang.String fileName)
public static void main(java.lang.String[] args)
args
- the command line argumentspublic static boolean compile(java.lang.String[] args)
protected JCompilationUnit parseFile(java.io.File file)
file
- the name of the file. (assert exists)protected void checkTransformedInterfaces(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkInterface(JCompilationUnit cunit)
cunit
- the compilation unitprotected void transformTypes(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkInitializers(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkBody(JCompilationUnit cunit)
cunit
- the compilation unitprotected void checkTransformedTypesBody(JCompilationUnit cunit)
cunit
- the compilation unitprotected void generateJavaCode(JCompilationUnit cunit)
cunit
- the compilation unitprotected void parseMultiProc(JCompilationUnit[] tree)
protected void checkBodyMultiProc(JCompilationUnit[] tree)
protected void acceptMultiProc(JCompilationUnit[] tree)
protected void genCodeMultiProc(CSourceClass[] tree, java.lang.String destination)
public void reportTrouble(PositionedError trouble)
reportTrouble
in class Compiler
trouble
- a description of the trouble to report.protected boolean filterWarning(CWarning warning)
protected WarningFilter getFilter()
public boolean parseComments()
parseComments
in class Compiler
public CSourceClass[] getClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |