Example #1
0
bool FunctionMergePass::visitProg2(BinaryExpr * from, BinaryExpr * to) {
  in->setFirst(visitExpr(in->first()));
  in->setSecond(visitExpr(in->second()));
  return in;
}
Example #2
0
bool FunctionMergePass::visitLocalProcedure(LocalProcedureExpr * from, LocalProcedureExpr * to) {
  return visitExpr(from->arg(), to->arg());
}
Example #3
0
bool FunctionMergePass::visitLocalReturn(ReturnExpr * from, ReturnExpr * to) {
  return visitExpr(from->arg(), to->arg());
}
Example #4
0
bool FunctionMergePass::visitFor(ForExpr * from, ForExpr * to) {
  return visitExpr(from->init(), to->init()) &&
      visitExpr(from->test(), to->test()) &&
      visitExpr(from->incr(), to->incr()) &&
      visitExpr(from->body(), to->body());
}
Example #5
0
bool FunctionMergePass::visitThrow(ThrowExpr * from, ThrowExpr * to) {
  return visitExpr(from->arg(), to->arg());
}
Example #6
0
bool FunctionMergePass::visitBoundMethod(BoundMethodExpr * from, BoundMethodExpr * to) {
  in->setSelfArg(visitExpr(in->selfArg()));
  return in;
}
Example #7
0
bool FunctionMergePass::visitIf(IfExpr * from, IfExpr * to) {
  return visitExpr(from->test(), to->test()) &&
      visitExpr(from->thenVal(), to->thenVal()) &&
      visitExpr(from->elseVal(), to->elseVal());
}
Example #8
0
bool FunctionMergePass::visitPtrDeref(UnaryExpr * from, UnaryExpr * to) {
  in->setArg(visitExpr(in->arg()));
  return in;
}
Example #9
0
bool FunctionMergePass::visitComplement(UnaryExpr * from, UnaryExpr * to) {
  return visitExpr(from->arg(), to->arg());
}
Example #10
0
bool FunctionMergePass::visitCompare(CompareExpr * from, CompareExpr * to) {
  return visitExpr(from->first(), to->first()) && visitExpr(from->second(), to->second());
}
Example #11
0
bool FunctionMergePass::visitInstanceOf(InstanceOfExpr * from, InstanceOfExpr * to) {
  in->setValue(visitExpr(in->value()));
  return in;
}
Example #12
0
bool FunctionMergePass::visitIndirectCall(CallExpr * from, CallExpr * to) {
  visitExpr(in->function());
  //in->setSelfArg(visitExpr(in->selfArg()));
  visitExprArgs(in);
  return in;
}
Example #13
0
bool FunctionMergePass::visitAssign(AssignmentExpr * from, AssignmentExpr * to) {
  return visitExpr(from->fromExpr(), to->fromExpr()) && visitExpr(from->toExpr(), to->toExpr());
}
Example #14
0
bool FunctionMergePass::visitElementRef(BinaryExpr * from, BinaryExpr * to) {
  return visitExpr(to->first(), from->first()) && visitExpr(to->second(), from->second());
}
Example #15
0
bool FunctionMergePass::visitSharedValue(SharedValueExpr * from, SharedValueExpr * to) {
  in->setArg(visitExpr(in->arg()));
  return in;
}
Example #16
0
bool FunctionMergePass::visitProg2(BinaryExpr * from, BinaryExpr * to) {
  return visitExpr(from->first(), to->first()) &&
         visitExpr(from->second(), to->second());
}
Example #17
0
 void visitBinaryOp(BinaryOp *Op) {
   visitExpr(Op->getLHS());
   visitExpr(Op->getRHS());
 }
Example #18
0
void CompilerPass::expr(AST *&ast_)
{
    fodder(ast_->openFodder);
    visitExpr(ast_);
}