| java.lang.Object jode.expr.Expression
All known Subclasses: jode.expr.NopOperator, jode.expr.Operator,
Expression | abstract public class Expression (Code) | | |
canCombine | public int canCombine(CombineableOperator combOp)(Code) | | Checks if the given Expression (which should be a CombineableOperator)
can be combined into this expression.
Parameters: e - The store expression, must be of type void. 1, if it can, 0, if no match was found and -1, if aconflict was found. You may wish to check for >0. |
combine | public Expression combine(CombineableOperator comb)(Code) | | Combines the given Expression (which should be a StoreInstruction)
into this expression. You must only call this if
canCombine returns the value 1.
Parameters: e - The store expression, the operator must be a CombineableOperator. The combined expression. exception: ClassCastException - , if e.getOperator is not a CombineableOperator. |
containsConflictingLoad | public boolean containsConflictingLoad(MatchableOperator op)(Code) | | Checks if this expression contains a conflicting load, that
matches the given CombineableOperator. The sub expressions are
not checked.
Parameters: op - The combineable operator. if this expression contains a matching load. |
containsMatchingLoad | public boolean containsMatchingLoad(CombineableOperator e)(Code) | | Checks if this expression contains a load, that matches the
given CombineableOperator (which must be an Operator)
Parameters: e - The store expression. if this expression contains a matching load. exception: ClassCastException - , if e.getOperator is not a CombineableOperator. |
getBreakPenalty | public int getBreakPenalty()(Code) | | Get the penalty for splitting up this operator.
|
getFreeOperandCount | abstract public int getFreeOperandCount()(Code) | | Get the number of operands.
The number of stack entries this expression needs. |
getPriority | abstract public int getPriority()(Code) | | Get priority of the operator.
Currently this priorities are known:
- 1000 constant
- 950 new, .(field access), []
- 900 new[]
- 800 ++,-- (post)
- 700 ++,--(pre), +,-(unary), ~, !, cast
- 650 *,/, %
- 610 +,-
- 600 <<, >>, >>>
- 550 >, <, >=, <=, instanceof
- 500 ==, !=
- 450 &
- 420 ^
- 410 |
- 350 &&
- 310 ||
- 200 ?:
- 100 =, +=, -=, etc.
|
hasSideEffects | public boolean hasSideEffects(Expression expr)(Code) | | Checks if the value of the given expression can change, due to
side effects in this expression. If this returns false, the
expression can safely be moved behind the current expresion.
Parameters: expr - the expression that should not change. |
isConstant | public boolean isConstant()(Code) | | |
isVoid | public boolean isVoid()(Code) | | |
makeDeclaration | public void makeDeclaration(Set done)(Code) | | |
makeInitializer | public void makeInitializer(Type type)(Code) | | |
removeOnetimeLocals | public Expression removeOnetimeLocals()(Code) | | This method should remove local variables that are only written
and read one time directly after another.
In this case this is a non void LocalStoreOperator, whose local
isn't used in other places.
an expression where the locals are removed. |
updateParentType | public void updateParentType(Type otherType)(Code) | | |
updateSubTypes | abstract public void updateSubTypes()(Code) | | Tells an expression that an outer expression has changed our type
and that the inner types should be recalculated.
|
updateType | abstract public void updateType()(Code) | | Tells an expression that an inner expression may have changed and
that the type should be recalculated.
This may call setType of the caller again.
|
|
|