|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.cfg.BlockStack<Node>
Node
- public class BlockStack<Node extends ICFGNode>
Protocol to using block Stack is: call push/pop labeled and push/pop breakable in pairs. Between the pair, you may make more push/pop calls. This is a valid set of calls: pushBreakable() pushLabeled() popLabeled() pushLabeled() pushBreakable() popBreakable() popLabeled() popBreakeable() The getContinue and getBreakPoint may be called at any time.
Nested Class Summary | |
---|---|
class |
BlockStack.Block
|
Constructor Summary | |
---|---|
BlockStack()
|
Method Summary | |
---|---|
BlockStack<Node> |
clone()
|
Node |
getBreakPoint(String label)
|
Node |
getContinuePoint(String label)
|
boolean |
overrideIfExists(ASTNode owner,
Node breakPoint,
Node continuePoint)
override the values only if this owner is already on the stack (that is, it got on the stack because it was labeled. |
void |
popLabeled()
Pop the top of the stack. |
void |
popUnlabeled()
Request a pop from a breakable node. |
void |
pushLabeled(String label,
ASTNode owner)
Push on a labeled statement. |
void |
pushUnlabeled(ASTNode owner,
Node breakPoint,
Node continuePoint)
Push on a statement. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockStack()
Method Detail |
---|
public void pushLabeled(String label, ASTNode owner)
label
- owner
- public void pushUnlabeled(ASTNode owner, Node breakPoint, Node continuePoint)
owner
- The owning statementbreakPoint
- The break point; may be nullcontinuePoint
- The continue point; may be nullpublic void popLabeled()
public void popUnlabeled()
public boolean overrideIfExists(ASTNode owner, Node breakPoint, Node continuePoint)
owner
- breakPoint
- continuePoint
-
public Node getBreakPoint(String label)
public Node getContinuePoint(String label)
public BlockStack<Node> clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |