Ignore:
Timestamp:
Sep 23, 2016, 4:12:41 PM (3 years ago)
Author:
nmedfort
Message:

Initial work for incorporating Types into Pablo AST.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.cpp

    r5156 r5160  
    88
    99If::If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock * body)
    10 : Statement(ClassTypeId::If, {expr}, nullptr)
     10: Statement(ClassTypeId::If, nullptr, {expr}, nullptr)
    1111, mBody(body)
    1212, mDefined(definedVars.begin(), definedVars.end(), mDefinedAllocator) {
     
    2222    // of it.
    2323    mBody->setBranch(this);
    24     mBody->setParent(getParent());
     24    mBody->setPredecessor (getParent());
    2525    for (Assign * def : mDefined) {
    2626        def->addUser(this);
     
    3030
    3131If::If(PabloAST * expr, const std::vector<Assign *> & definedVars, PabloBlock * body)
    32 : Statement(ClassTypeId::If, {expr}, nullptr)
     32: Statement(ClassTypeId::If, nullptr, {expr}, nullptr)
    3333, mBody(body)
    3434, mDefined(definedVars.begin(), definedVars.end(), mDefinedAllocator) {
    3535    mBody->setBranch(this);
    36     mBody->setParent(getParent());
     36    mBody->setPredecessor (getParent());
    3737    for (Assign * def : mDefined) {
    3838        def->addUser(this);
     
    6161PabloBlock * If::setBody(PabloBlock * body) {
    6262    body->setBranch(this);
    63     body->setParent(mBody->getParent());
     63    body->setPredecessor (mBody->getPredecessor ());
    6464    std::swap(mBody, body);
    65     body->setParent(nullptr);
     65    body->setPredecessor (nullptr);
    6666    return body;
    6767}
Note: See TracChangeset for help on using the changeset viewer.