|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpolyglot.frontend.Job
public class Job
A Job
encapsulates work done by the compiler for a single
compilation unit. A Job
contains all information for a
particular compilation unit carried between phases of the compiler.
Only one pass should be run over a job at a time.
TODO: The class should probably be renamed to, say, CompilationUnit.
Field Summary | |
---|---|
protected Node |
ast
The AST constructed from the source file. |
protected JobExt |
ext
Field used for storing extension-specific information. |
protected int |
initialErrorCount
Initial count of errors before running the current pass over the job. |
protected ExtensionInfo |
lang
The language extension used for this job. |
protected boolean |
reportedErrors
True if the the job has reported an error. |
protected Pass |
runningPass
The pass currently running over the job, or null. |
protected Source |
source
The Source that this Job represents. |
protected boolean |
status
True if all passes run so far have been successful. |
Constructor Summary | |
---|---|
Job(ExtensionInfo lang,
JobExt ext,
Source source,
Node ast)
|
Method Summary | |
---|---|
Node |
ast()
Get the state's AST. |
void |
ast(Node ast)
Set the state's AST. |
Compiler |
compiler()
|
void |
dump(CodeWriter cw)
|
boolean |
equals(java.lang.Object o)
|
JobExt |
ext()
|
ExtensionInfo |
extensionInfo()
|
int |
hashCode()
|
boolean |
isRunning()
|
boolean |
reportedErrors()
True if some pass reported an error. |
Pass |
runningPass()
|
void |
setRunningPass(Pass pass)
|
Source |
source()
Return the Source associated with the
SourceJob returned by sourceJob . |
boolean |
status()
|
java.lang.String |
toString()
|
void |
updateStatus(boolean status)
|
boolean |
userSpecified()
Returns whether the source for this job was explicitly specified by the user, or if it was drawn into the compilation process due to some dependency. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JobExt ext
protected ExtensionInfo lang
protected Node ast
protected Pass runningPass
protected boolean status
protected int initialErrorCount
protected boolean reportedErrors
protected Source source
Source
that this Job
represents.
Constructor Detail |
---|
public Job(ExtensionInfo lang, JobExt ext, Source source, Node ast)
Method Detail |
---|
public JobExt ext()
public void setRunningPass(Pass pass)
public boolean isRunning()
public Pass runningPass()
public Node ast()
public void ast(Node ast)
public boolean reportedErrors()
public void dump(CodeWriter cw)
public Source source()
Source
associated with the
SourceJob
returned by sourceJob
.
public boolean userSpecified()
public void updateStatus(boolean status)
public boolean status()
public ExtensionInfo extensionInfo()
public Compiler compiler()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |