coins.ffront
Class ComputedGoto
java.lang.Object
coins.ffront.FStmt
coins.ffront.ComputedGoto
- All Implemented Interfaces:
- Node
- public class ComputedGoto
- extends FStmt
Computed goto statement
| Fields inherited from class coins.ffront.FStmt |
defLabel, fDeclMgr, fESMgr, fHir, fHirUtil, fLine, fSymTable, fTypeUtil, generatedStmts, hir, stmt |
|
Method Summary |
Stmt |
makeSwitchStmt(Exp pExp,
FirList pLabels)
|
void |
print(int level,
java.lang.String spaces)
|
void |
process()
Translate
GO TO (10, 20, ...) i
to
switch (i) {
case 1: goto L_10;
case 2: goto L_20
... |
java.lang.String |
toString()
|
| Methods inherited from class coins.ffront.FStmt |
addGeneratedStmt, addGeneratedStmtFirst, addLabel, addResultTo, dp, getLabelString, getResult, hasNotLabel, makeArgAddr, makeExp, mergeSymTable, preprocess, setLineAndFileInfo, setSymTable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ComputedGoto
public ComputedGoto(FirList pLabels,
Node pExp,
int line,
FirToHir pfHir)
ComputedGoto
public ComputedGoto(int line,
FirToHir pfHir)
print
public void print(int level,
java.lang.String spaces)
- Specified by:
print in interface Node- Overrides:
print in class FStmt
toString
public java.lang.String toString()
- Specified by:
toString in interface Node- Overrides:
toString in class FStmt
process
public void process()
- Translate
GO TO (10, 20, ...) i
to
switch (i) {
case 1: goto L_10;
case 2: goto L_20
...
}
- Overrides:
process in class FStmt
makeSwitchStmt
public Stmt makeSwitchStmt(Exp pExp,
FirList pLabels)