|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ksu.cis.projects.bogor.ast.ASTVisitor
edu.ksu.cis.projects.bogor.ast.transform.HighToLowNonAtomicExpCompiler
public class HighToLowNonAtomicExpCompiler
Compiler to produce low-level BIR control points for evaluating expressions. The generated code permits interleavings during evaluation of subexpressions.
Another IExpCompiler (an instance of
HighToLowAtomicExpCompiler) is used to generate more compact code
whenever a subexpression of some AtomicExpmust be compiled.
| Field Summary | |
|---|---|
protected ExpBindingResolver |
bindingsResolver
Installed only for duration of call to {@link #compileExp(HighToLowBIRCompiler, Exp). |
protected Wrapper<Boolean> |
expContainsAtomic
Node that tells whether the presently compiled expression or a subexpression is atomic. |
protected IExpCompiler |
htlaec
Persists for lifetime of object. |
protected HighToLowBIRCompiler |
htlbirc
Installed for duration of call to {@link #compileExp(HighToLowBIRCompiler, Exp). |
protected Exp |
intermediateResult
Node that holds result of a compiled expression. |
protected SymbolTable |
st
Persists for lifetime of object. |
| Constructor Summary | |
|---|---|
HighToLowNonAtomicExpCompiler(SymbolTable st,
IExpCompiler htlaec)
|
|
| Method Summary | |
|---|---|
protected Exp |
compileExp(Exp e,
ExpBindingResolver ebr,
Wrapper<Boolean> wentAtomic)
|
Exp |
compileExp(HighToLowBIRCompiler htlbirc,
Exp e,
ExpBindingResolver ebr,
Wrapper<Boolean> wentAtomic)
Do a pre-order traversal which yields an expression containing a low-level BIR expression containing the evaluation of e. |
protected void |
visitApplyExp(ApplyExp node)
|
protected void |
visitArrayAccessExp(ArrayAccessExp node)
|
protected void |
visitAtomicExp(AtomicExp node)
|
protected void |
visitBinaryExp(BinaryExp node)
|
protected void |
visitCastExp(CastExp node)
|
protected void |
visitConditionalExp(ConditionalExp node)
|
protected void |
visitExtExp(ExtExp node)
|
protected void |
visitFieldAccessExp(FieldAccessExp node)
|
protected void |
visitIdExp(IdExp node)
|
protected void |
visitInstanceofExp(InstanceofExp node)
|
protected void |
visitInvokeExp(InvokeExp node)
|
protected void |
visitKindofExp(KindofExp node)
|
protected void |
visitLetExp(LetExp node)
|
protected void |
visitLiteralExp(LiteralExp node)
|
protected void |
visitLockTestExp(LockTestExp node)
|
protected void |
visitNewArrayExp(NewArrayExp node)
|
protected void |
visitNewLockExp(NewLockExp node)
|
protected void |
visitNewRecordExp(NewRecordExp node)
|
protected void |
visitParenExp(ParenExp node)
|
protected void |
visitStartThreadExp(StartThreadExp node)
|
protected void |
visitThreadTestExp(ThreadTestExp node)
|
protected void |
visitUnaryExp(UnaryExp node)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SymbolTable st
protected IExpCompiler htlaec
protected HighToLowBIRCompiler htlbirc
protected Exp intermediateResult
protected ExpBindingResolver bindingsResolver
protected Wrapper<Boolean> expContainsAtomic
| Constructor Detail |
|---|
public HighToLowNonAtomicExpCompiler(SymbolTable st,
IExpCompiler htlaec)
| Method Detail |
|---|
public Exp compileExp(HighToLowBIRCompiler htlbirc,
Exp e,
ExpBindingResolver ebr,
Wrapper<Boolean> wentAtomic)
IExpCompilere.
compileExp in interface IExpCompilerhtlbirc - destination for new control pointse - high-level BIR expression to be translatedwentAtomic - container whose Wrapper.elementelement will be set to
Boolean.TRUEif the BIR command sequence
necessary to evaluate e enters an atomic block
protected Exp compileExp(Exp e,
ExpBindingResolver ebr,
Wrapper<Boolean> wentAtomic)
protected void visitApplyExp(ApplyExp node)
visitApplyExp in class ASTVisitorprotected void visitArrayAccessExp(ArrayAccessExp node)
visitArrayAccessExp in class ASTVisitorprotected void visitAtomicExp(AtomicExp node)
visitAtomicExp in class ASTVisitorprotected void visitBinaryExp(BinaryExp node)
visitBinaryExp in class ASTVisitorprotected void visitCastExp(CastExp node)
visitCastExp in class ASTVisitorprotected void visitConditionalExp(ConditionalExp node)
visitConditionalExp in class ASTVisitorprotected void visitExtExp(ExtExp node)
visitExtExp in class ASTVisitorprotected void visitFieldAccessExp(FieldAccessExp node)
visitFieldAccessExp in class ASTVisitorprotected void visitIdExp(IdExp node)
visitIdExp in class ASTVisitorprotected void visitInstanceofExp(InstanceofExp node)
visitInstanceofExp in class ASTVisitorprotected void visitInvokeExp(InvokeExp node)
visitInvokeExp in class ASTVisitorprotected void visitKindofExp(KindofExp node)
visitKindofExp in class ASTVisitorprotected void visitLetExp(LetExp node)
visitLetExp in class ASTVisitorprotected void visitLiteralExp(LiteralExp node)
visitLiteralExp in class ASTVisitorprotected void visitLockTestExp(LockTestExp node)
visitLockTestExp in class ASTVisitorprotected void visitNewArrayExp(NewArrayExp node)
visitNewArrayExp in class ASTVisitorprotected void visitNewLockExp(NewLockExp node)
visitNewLockExp in class ASTVisitorprotected void visitNewRecordExp(NewRecordExp node)
visitNewRecordExp in class ASTVisitorprotected void visitParenExp(ParenExp node)
visitParenExp in class ASTVisitorprotected void visitStartThreadExp(StartThreadExp node)
visitStartThreadExp in class ASTVisitorprotected void visitThreadTestExp(ThreadTestExp node)
visitThreadTestExp in class ASTVisitorprotected void visitUnaryExp(UnaryExp node)
visitUnaryExp in class ASTVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||