|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.Compiler.Statement
SFE.Compiler.AssignmentStatement
public class AssignmentStatement
A class for representing assignment statements that can be defined in the program.
Field Summary | |
---|---|
static java.util.Vector |
inputFormat
|
Constructor Summary | |
---|---|
AssignmentStatement(LvalExpression lhs,
OperationExpression rhs)
Constructs a new AssignmentStatement from a given lhs and rhs. |
Method Summary | |
---|---|
void |
buildUsedStatementsHash()
Adds this AssignmentStatement to the list of statements that are needed to compute the output pins of the output circuit, if this AssigmentStatement IS indeed needed. |
Statement |
duplicate()
Returns a replica this statement. |
LvalExpression |
getLHS()
Returns this AssignmentStatement's lhs. |
int |
getOutputLine()
Returns an int that represents the line number of this assignmnet statement in the output circuit. |
OperationExpression |
getRHS()
Returns this AssignmentStatement's rhs. |
boolean |
hasUnaryOperator()
Returns true iff rhs if an UnaryOpExpression. |
BlockStatement |
multi2SingleBit(java.lang.Object obj)
Transforms this multibit AssignmentStatement into singlebit Statements and returns a BlockStatement containing the result. |
void |
optimizePhaseI()
Optimizes this AssignmentStatement (Phase I): Peephole optimization: local simplifications of code, e.g. |
void |
optimizePhaseII(java.util.Vector newBody)
Second phase of the optimization: Dead code elimination. |
void |
setOutputLine(int line)
Sets the output line of this assignment statement. |
void |
toCircuit(java.io.PrintWriter circuit)
Prints this AssignmentStatement into the circuit. |
java.lang.String |
toString()
Returns a string representation of this AssignmentStatement. |
Statement |
uniqueVars()
Unique vars transformations. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Vector inputFormat
Constructor Detail |
---|
public AssignmentStatement(LvalExpression lhs, OperationExpression rhs)
lhs
- An LvalExpression which is the LHS of the assignment.rhs
- An OperationExpression which is the RHS of the assignment
expression.Method Detail |
---|
public BlockStatement multi2SingleBit(java.lang.Object obj)
multi2SingleBit
in interface Multi2SingleBit
obj
- not used (null).
public java.lang.String toString()
toString
in class java.lang.Object
public OperationExpression getRHS()
public LvalExpression getLHS()
public void toCircuit(java.io.PrintWriter circuit)
circuit
- the circuit output file.public int getOutputLine()
public void setOutputLine(int line)
line
- the line number in the output.public void optimizePhaseI()
public void optimizePhaseII(java.util.Vector newBody)
newBody
- the new function-body.public void buildUsedStatementsHash()
public Statement uniqueVars()
uniqueVars
in class Statement
public boolean hasUnaryOperator()
hasUnaryOperator
in class Statement
public Statement duplicate()
duplicate
in class Statement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |