Package EDU.purdue.cs.bloat.tree
Class RetStmt
- java.lang.Object
-
- EDU.purdue.cs.bloat.tree.Node
-
- EDU.purdue.cs.bloat.tree.Stmt
-
- EDU.purdue.cs.bloat.tree.JumpStmt
-
- EDU.purdue.cs.bloat.tree.RetStmt
-
public class RetStmt extends JumpStmt
RetStmt represents the ret opcode which returns from a subroutine. Recall that when a subroutine returns, the ret opcode's argument specifies a local variable that stores the return address of
-
-
Constructor Summary
Constructors Constructor Description RetStmt(Subroutine sub)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Subroutinesub()voidvisit(TreeVisitor visitor)voidvisitForceChildren(TreeVisitor visitor)Visit the children of this node.-
Methods inherited from class EDU.purdue.cs.bloat.tree.JumpStmt
catchTargets, copyInto
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Stmt
cleanupOnly
-
Methods inherited from class EDU.purdue.cs.bloat.tree.Node
block, cleanup, hasParent, key, parent, replaceWith, replaceWith, setKey, setParent, setValueNumber, toString, valueNumber, visitChildren, visitOnly
-
-
-
-
Constructor Detail
-
RetStmt
public RetStmt(Subroutine sub)
Constructor.- Parameters:
sub- The subroutine in which the return statement resides. That is, from where the program control is returning.- See Also:
Tree.addInstruction(Instruction, Subroutine)
-
-
Method Detail
-
visitForceChildren
public void visitForceChildren(TreeVisitor visitor)
Description copied from class:NodeVisit the children of this node. Not all Nodes will have children to visit.- Specified by:
visitForceChildrenin classNode
-
visit
public void visit(TreeVisitor visitor)
-
sub
public Subroutine sub()
-
-