|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ocl.examples.codegen.cse.AbstractPlace
org.eclipse.ocl.examples.codegen.cse.GlobalPlace
public class GlobalPlace
The GlobalPlace describes a forest of CG trees that can be resolved as global constants.
Field Summary | |
---|---|
protected CodeGenAnalyzer |
analyzer
|
protected HashedAnalyses |
globalAnalyses
|
protected ReferencesVisitor |
referencesVisitor
|
Constructor Summary | |
---|---|
GlobalPlace(CodeGenAnalyzer analyzer)
|
Method Summary | |
---|---|
void |
addSimpleAnalysis(SimpleAnalysis simpleAnalysis)
|
protected SimpleAnalysis |
buildSimpleAnalysisTree(CGElement cgElement,
int depth)
Populate the map from structural hash code to same-hashed analysis in the analysis tree rooted at thisAnalysis. |
static AbstractPlace |
createGlobalPlace(java.util.Map<CGElement,AbstractPlace> element2place,
CGElement cgElement)
|
CodeGenAnalyzer |
getAnalyzer()
|
ControlPlace |
getControlPlace(CGValuedElement cgElement)
|
GlobalPlace |
getGlobalPlace()
Return the GlobalPlace. |
GlobalPlace |
getParentPlace()
Return the parent of this place, which is self for the GlobalPlace. |
AbstractPlace |
getPlace(CGElement cgElement)
|
ReferencesVisitor |
getReferencesVisitor()
|
SimpleAnalysis |
getSimpleAnalysis(java.lang.Object anObject)
|
java.util.List<CGValuedElement> |
getSortedGlobals(DependencyVisitor dependencyVisitor)
|
StackPlace |
getStackPlace()
Return the stack place hosting this place. |
protected int |
getStructuralHashCode(CGElement cgElement,
java.lang.String prefix)
|
void |
optimize(CGElement cgRoot)
Optimize the cgRoot tree by eliminating common subexpressions. |
void |
optimizeGlobals(CGElement cgRoot)
|
void |
printHierarchy(java.lang.Appendable appendable,
java.lang.String indentation)
|
java.lang.String |
toString()
|
Methods inherited from class org.eclipse.ocl.examples.codegen.cse.AbstractPlace |
---|
getControlPlace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
@NonNull protected final CodeGenAnalyzer analyzer
@NonNull protected final ReferencesVisitor referencesVisitor
@NonNull protected final HashedAnalyses globalAnalyses
Constructor Detail |
---|
public GlobalPlace(@NonNull CodeGenAnalyzer analyzer)
Method Detail |
---|
@NonNull public static AbstractPlace createGlobalPlace(@NonNull java.util.Map<CGElement,AbstractPlace> element2place, @NonNull CGElement cgElement)
public void addSimpleAnalysis(@NonNull SimpleAnalysis simpleAnalysis)
@Nullable protected SimpleAnalysis buildSimpleAnalysisTree(@NonNull CGElement cgElement, int depth)
Returns the SimpleAnalysis of cgElement.
@NonNull public CodeGenAnalyzer getAnalyzer()
@NonNull public ControlPlace getControlPlace(@NonNull CGValuedElement cgElement)
@NonNull public GlobalPlace getGlobalPlace()
AbstractPlace
getGlobalPlace
in class AbstractPlace
@NonNull public GlobalPlace getParentPlace()
AbstractPlace
getParentPlace
in class AbstractPlace
@Nullable public AbstractPlace getPlace(@NonNull CGElement cgElement)
@NonNull public ReferencesVisitor getReferencesVisitor()
@Nullable public SimpleAnalysis getSimpleAnalysis(@NonNull java.lang.Object anObject)
@Nullable public java.util.List<CGValuedElement> getSortedGlobals(@NonNull DependencyVisitor dependencyVisitor)
@Nullable public StackPlace getStackPlace()
AbstractPlace
getStackPlace
in class AbstractPlace
protected int getStructuralHashCode(@NonNull CGElement cgElement, @NonNull java.lang.String prefix)
public void optimize(@NonNull CGElement cgRoot)
globals
- public void optimizeGlobals(@NonNull CGElement cgRoot)
public void printHierarchy(@NonNull java.lang.Appendable appendable, @NonNull java.lang.String indentation)
printHierarchy
in class AbstractPlace
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |