|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ksu.cis.projects.bogor.ast.ASTVisitor edu.ksu.cis.projects.bogor.ast.transform.HighToLowAtomicExpCompiler
public class HighToLowAtomicExpCompiler
Compiler to produce code more efficient than
HighToLowNonAtomicExpCompiler
. The generated code is assumed to run
inside the protection of an Atomic.beginAtomic()
...
Atomic.endAtomic()
block.
Nested Class Summary | |
---|---|
protected class |
HighToLowAtomicExpCompiler.InvocationDetector
|
Field Summary | |
---|---|
protected ExpBindingResolver |
bindingsResolver
Installed only for duration of call to {@link #compileExp(HighToLowBIRCompiler, Exp). |
protected HighToLowBIRCompiler |
htlbirc
Installed only for duration of call to {@link #compileExp(HighToLowBIRCompiler, Exp). |
protected Exp |
intermediateResult
Installed only for duration of call to {@link #compileExp(HighToLowBIRCompiler, Exp). |
protected HighToLowAtomicExpCompiler.InvocationDetector |
invocationDetector
Persists for lifetime of object. |
protected SymbolTable |
st
Persists for lifetime of object. |
Constructor Summary | |
---|---|
HighToLowAtomicExpCompiler(SymbolTable st)
|
Method Summary | |
---|---|
protected Exp |
compileExp(Exp e,
ExpBindingResolver ebr)
|
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 HighToLowAtomicExpCompiler.InvocationDetector invocationDetector
protected HighToLowBIRCompiler htlbirc
protected Exp intermediateResult
protected ExpBindingResolver bindingsResolver
Constructor Detail |
---|
public HighToLowAtomicExpCompiler(SymbolTable st)
Method Detail |
---|
public Exp compileExp(HighToLowBIRCompiler htlbirc, Exp e, ExpBindingResolver ebr, Wrapper<Boolean> wentAtomic)
IExpCompiler
e
.
compileExp
in interface IExpCompiler
htlbirc
- destination for new control pointse
- high-level BIR expression to be translatedwentAtomic
- container whose Wrapper.element
element will be set to
Boolean.TRUE
if the BIR command sequence
necessary to evaluate e
enters an atomic blockprotected Exp compileExp(Exp e, ExpBindingResolver ebr)
protected void visitApplyExp(ApplyExp node)
visitApplyExp
in class ASTVisitor
protected void visitArrayAccessExp(ArrayAccessExp node)
visitArrayAccessExp
in class ASTVisitor
protected void visitAtomicExp(AtomicExp node)
visitAtomicExp
in class ASTVisitor
protected void visitBinaryExp(BinaryExp node)
visitBinaryExp
in class ASTVisitor
protected void visitCastExp(CastExp node)
visitCastExp
in class ASTVisitor
protected void visitConditionalExp(ConditionalExp node)
visitConditionalExp
in class ASTVisitor
protected void visitExtExp(ExtExp node)
visitExtExp
in class ASTVisitor
protected void visitFieldAccessExp(FieldAccessExp node)
visitFieldAccessExp
in class ASTVisitor
protected void visitIdExp(IdExp node)
visitIdExp
in class ASTVisitor
protected void visitInstanceofExp(InstanceofExp node)
visitInstanceofExp
in class ASTVisitor
protected void visitInvokeExp(InvokeExp node)
visitInvokeExp
in class ASTVisitor
protected void visitKindofExp(KindofExp node)
visitKindofExp
in class ASTVisitor
protected void visitLetExp(LetExp node)
visitLetExp
in class ASTVisitor
protected void visitLiteralExp(LiteralExp node)
visitLiteralExp
in class ASTVisitor
protected void visitLockTestExp(LockTestExp node)
visitLockTestExp
in class ASTVisitor
protected void visitNewArrayExp(NewArrayExp node)
visitNewArrayExp
in class ASTVisitor
protected void visitNewLockExp(NewLockExp node)
visitNewLockExp
in class ASTVisitor
protected void visitNewRecordExp(NewRecordExp node)
visitNewRecordExp
in class ASTVisitor
protected void visitParenExp(ParenExp node)
visitParenExp
in class ASTVisitor
protected void visitStartThreadExp(StartThreadExp node)
visitStartThreadExp
in class ASTVisitor
protected void visitThreadTestExp(ThreadTestExp node)
visitThreadTestExp
in class ASTVisitor
protected void visitUnaryExp(UnaryExp node)
visitUnaryExp
in class ASTVisitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |