AST
node type IfStmt

General Info

Production
IfStmt : Stmt ::= Condition:Expr Then:Stmt [Else:Stmt];
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Stmt
              extended by AST.IfStmt
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Source
Declared in Java1.4Frontend/java.ast at line 207

Member Filters

API level:

Aspect:

Constructors

public IfStmt(Expr cond,
              Stmt thenBranch)
 
Source
Declared in Java1.4Frontend/NodeConstructors.jrag at line 66
Aspect
NodeConstructors
public IfStmt(Expr cond,
              Stmt thenBranch,
              Stmt elseBranch)
 
Source
Declared in Java1.4Frontend/NodeConstructors.jrag at line 70
Aspect
NodeConstructors
public IfStmt()
 
public IfStmt(Expr p0,
              Stmt p1,
              Opt<Stmt> p2)
 

Attributes

syn boolean isDAafter(Variable v)
Overrides:isDAafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 525
Aspect
DA
syn boolean isDUafter(Variable v)
Overrides:isDUafter in class Stmt
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 994
Aspect
DU
syn boolean canCompleteNormally()
Overrides:canCompleteNormally in class Stmt
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 141
Aspect
UnreachableStatements
syn boolean definesLabel()
Overrides:definesLabel in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 946
Aspect
CreateBCode
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1322
Aspect
CreateBCode
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1323
Aspect
CreateBCode
syn boolean modifiedInScope(Variable var)
Specified by:modifiedInScope in class Stmt
Source
Declared in Java7Frontend/PreciseRethrow.jrag at line 55
Aspect
PreciseRethrow

Methods

public void flushCache()
Overrides:flushCache in class Stmt
public void flushCollectionCache()
Overrides:flushCollectionCache in class Stmt
public IfStmt clone()
             throws java.lang.CloneNotSupportedException
Overrides:clone in class Stmt
Throws:
java.lang.CloneNotSupportedException
public IfStmt copy()
Overrides:copy in class ASTNode<ASTNode>
public IfStmt fullCopy()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class ASTNode<ASTNode>
Returns:
dangling copy of the subtree at this node
public void toString(java.lang.StringBuffer s)
Overrides:toString in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/PrettyPrint.jadd at line 574
Aspect
PrettyPrint
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeCheck.jrag at line 316
Aspect
TypeCheck
public void createBCode(CodeGeneration gen)
Overrides:createBCode in class Stmt
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 1324
Aspect
CreateBCode
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class Stmt
protected int numChildren()
Overrides:numChildren in class Stmt
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class Stmt
public void setCondition(Expr node)
Replaces the Condition child.
Parameters:
node - The new node to replace the Condition child.
Retrieves the Condition child.
Returns:
The current node used as the Condition child.
Retrieves the Condition child.

This method does not invoke AST transformations.

Returns:
The current node used as the Condition child.
public void setThen(Stmt node)
Replaces the Then child.
Parameters:
node - The new node to replace the Then child.
public Stmt getThen()
Retrieves the Then child.
Returns:
The current node used as the Then child.
Retrieves the Then child.

This method does not invoke AST transformations.

Returns:
The current node used as the Then child.
public void setElseOpt(Opt<Stmt> opt)
Replaces the optional node for the Else child. This is the Opt node containing the child Else, not the actual child!
Parameters:
opt - The new node to be used as the optional node for the Else child.
public boolean hasElse()
Check whether the optional Else child exists.
Returns:
true if the optional Else child exists, false if it does not.
public Stmt getElse()
Retrieves the (optional) Else child.
Returns:
The Else child, if it exists. Returns null otherwise.
public void setElse(Stmt node)
Replaces the (optional) Else child.
Parameters:
node - The new node to be used as the Else child.
public Opt<Stmt> getElseOpt()
Retrieves the optional node for child Else. This is the Opt node containing the child Else, not the actual child!

This method does not invoke AST transformations.

Returns:
The optional node for child Else.
public boolean Define_boolean_isDAbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDAbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 528
public boolean Define_boolean_isDUbefore(ASTNode caller,
                                         ASTNode child,
                                         Variable v)
Overrides:Define_boolean_isDUbefore in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/DefiniteAssignment.jrag at line 997
public boolean Define_boolean_reachable(ASTNode caller,
                                        ASTNode child)
Overrides:Define_boolean_reachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 144
public boolean Define_boolean_reportUnreachable(ASTNode caller,
                                                ASTNode child)
Overrides:Define_boolean_reportUnreachable in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/UnreachableStatements.jrag at line 150
Overrides:Define_int_condition_false_label in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 963
public int Define_int_condition_true_label(ASTNode caller,
                                           ASTNode child)
Overrides:Define_int_condition_true_label in class ASTNode<ASTNode>
Source
Declared in Java1.4Backend/CreateBCode.jrag at line 964
Overrides:rewriteTo in class Stmt

Fields

protected java.util.Map isDAafter_Variable_values
protected java.util.Map isDUafter_Variable_values
protected boolean canCompleteNormally_value
protected boolean else_branch_label_computed
protected boolean then_branch_label_computed

Inherited Members

Attributes inherited from AST.Stmt

Attributes inherited from AST.ASTNode

Methods inherited from class AST.Stmt

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from AST.Stmt

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value