Ignore:
Timestamp:
Jul 6, 2015, 11:30:14 AM (4 years ago)
Author:
nmedfort
Message:

Minor changes to the while loop compilation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r4641 r4642  
    513513        mLoopVariants.push_back(nextPending);
    514514        mLoopVariants.push_back(nextStarAccum);
    515         mWhileTest = pb.createOr(mWhileTest, nextPending);
     515        mWhileTest = pb.createOr(mWhileTest, nextPending->getExpr());
    516516        mStarDepth--;
    517517       
    518         return makeMarker(InitialPostPositionByte, pb.createAssign("unbounded", pb.createOr(base, nextStarAccum)));
     518        return makeMarker(InitialPostPositionByte, pb.createAssign("unbounded", pb.createOr(base, nextStarAccum->getExpr())));
    519519    }   
    520520    else {
     
    530530        Next * nextWhilePending = wb.createNext(whilePending, wb.createAnd(loopComputation, wb.createNot(whileAccum)));
    531531        Next * nextWhileAccum = wb.createNext(whileAccum, wb.createOr(loopComputation, whileAccum));
    532         Next * nextWhileTest = wb.createNext(whileTest, wb.createOr(mWhileTest, nextWhilePending));
     532        Next * nextWhileTest = wb.createNext(whileTest, wb.createOr(mWhileTest, nextWhilePending->getExpr()));
    533533        mLoopVariants.push_back(nextWhilePending);
    534534        mLoopVariants.push_back(nextWhileAccum);
    535535        mLoopVariants.push_back(nextWhileTest);
    536         pb.createWhile(nextWhileTest, mLoopVariants, wb);
     536        pb.createWhile(whileTest, mLoopVariants, wb);
    537537        mStarDepth--;
    538538        mLoopVariants.clear();
    539         return makeMarker(InitialPostPositionByte, pb.createAssign("unbounded", nextWhileAccum));
     539        return makeMarker(InitialPostPositionByte, pb.createAssign("unbounded", nextWhileAccum->getExpr()));
    540540    }   
    541541} // end of namespace re
Note: See TracChangeset for help on using the changeset viewer.