Beispiel #1
0
 /** {@inheritDoc} */
 @Override
 public KillGenAE visitAssignStatement(
     IStatement statement, String variable, IStatement value, Context context) {
   // Kill.
   for (IStatement a : context.aexp) {
     if (a.fv().contains(variable)) {
       context.result.kill(statement.getLabel(), a);
     }
   }
   // Gen.
   for (IStatement a : value.aexp()) {
     if (!a.fv().contains(variable)) {
       context.result.gen(statement.getLabel(), a);
     }
   }
   return value.visit(this, context);
 }
Beispiel #2
0
 /** {@inheritDoc} */
 @Override
 public KillGenAE visitUnaryStatement(
     IStatement statement, UnaryOperator operator, IStatement value, Context context) {
   // Gen.
   for (IStatement a : statement.aexp()) {
     context.result.gen(statement.getLabel(), a);
   }
   return context.result;
 }
Beispiel #3
0
 /** {@inheritDoc} */
 @Override
 public KillGenAE visitBinaryStatement(
     IStatement statement,
     IStatement left,
     BinaryOperator operator,
     IStatement right,
     Context context) {
   // Gen.
   if (operator.isRelational()) {
     for (IStatement a : statement.aexp()) {
       context.result.gen(statement.getLabel(), a);
     }
   }
   return context.result;
 }