|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jltools.frontend.Compiler
This is the main entry point for the compiler. It contains a work list that contains entries for all classes that must be compiled (or otherwise worked on).
Field Summary | |
protected NodeFactory |
node_factory
The node factory creates AST node objects. |
protected SourceLoader |
source_loader
The source loader is responsible for loading source files from the source path. |
protected TargetFactory |
target_factory
The target factory is responsible for naming and opening output files given a package name and a class or source file name. |
protected TypeSystem |
type_system
The type system. |
Constructor Summary | |
Compiler(Options options_)
Initialize the compiler. |
Method Summary | |
void |
addPass(Pass pass)
Add a pass to the worklist. |
boolean |
compile(java.util.Collection sources)
Compile all the files listed in the set of strings source . |
ErrorQueue |
errorQueue()
Get the compiler's error queue. |
ExtensionInfo |
extensionInfo()
Get information about the language extension being compiled. |
protected boolean |
finish()
Run all jobs in the worklist to completion. |
Job |
jobForSource(Source source)
Get a job for the source. |
java.util.Collection |
jobs()
Return a collection of all jobs in the compilation. |
LoadedClassResolver |
loadedResolver()
Get the compiler's parsed-file resolver |
NodeFactory |
nodeFactory()
Get the compiler's node extension factory |
java.util.Collection |
outputFiles()
Return a set of output filenames resulting from a compilation. |
int |
outputWidth()
Maximum number of characters on each line of output |
TableResolver |
parsedResolver()
Get the compiler's parsed-file resolver |
boolean |
readClass(java.lang.String className)
Compile the source file for a given class to completion. |
boolean |
readSource(Source source)
Compile a source file until the types in the source file are constructed. |
static void |
report(int level,
java.lang.String msg)
Debug reporting for the frontend. |
static void |
reportTime(int level,
java.lang.String msg)
Reports the time taken by every pass. |
boolean |
runToPass(Pass goal)
Run all passes in the worklist until the goal pass completes. |
boolean |
serializeClassInfo()
Should class info be serialized into the output? |
SourceLoader |
sourceLoader()
Get the compiler's source loader |
Resolver |
systemResolver()
Get the compiler's system resolver |
TargetFactory |
targetFactory()
Get the compiler's target factory |
TypeSystem |
typeSystem()
Get the compiler's type system |
boolean |
useFullyQualifiedNames()
Should fully qualified class names be used in the output? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TypeSystem type_system
protected NodeFactory node_factory
protected SourceLoader source_loader
protected TargetFactory target_factory
Constructor Detail |
public Compiler(Options options_)
options
- Contains jltools optionsMethod Detail |
public java.util.Collection outputFiles()
public boolean readSource(Source source) throws java.io.IOException
public boolean readClass(java.lang.String className) throws java.io.IOException
public Job jobForSource(Source source)
public java.util.Collection jobs()
public boolean compile(java.util.Collection sources)
source
.
Return true on success. The method outputFiles
can be
used to obtain the output of the compilation. This is the main entry
point for the compiler, called from main().public void addPass(Pass pass)
public boolean runToPass(Pass goal)
goal
pass completes.protected boolean finish()
public boolean useFullyQualifiedNames()
public SourceLoader sourceLoader()
public TargetFactory targetFactory()
public NodeFactory nodeFactory()
public TypeSystem typeSystem()
public ExtensionInfo extensionInfo()
public Resolver systemResolver()
public LoadedClassResolver loadedResolver()
public TableResolver parsedResolver()
public int outputWidth()
public boolean serializeClassInfo()
public ErrorQueue errorQueue()
public static void report(int level, java.lang.String msg)
public static void reportTime(int level, java.lang.String msg)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |