Ignore:
Timestamp:
Jul 6, 2015, 5:56:51 PM (4 years ago)
Author:
nmedfort
Message:

Simplified While structure. Next nodes are in the AST again but are treated like independent variable assignments; they're only associated with their original Assign by including them in the While instruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pe_next.h

    r4641 r4643  
    88
    99namespace pablo {
    10 
    11 class Assign;
    1210
    1311class Next : public Statement {
     
    2119    }
    2220    inline const Assign * getInitial() const {
    23         return cast<const Assign>(getOperand(0));
     21        return cast<const Assign>(getOperand(1));
    2422    }
    2523    inline PabloAST * getExpr() const {
    26         return getOperand(1);
     24        return getOperand(0);
    2725    }
    2826    virtual ~Next() {}
    2927protected:
    30     Next(PabloAST * initial, PabloAST * expr, PabloBlock * parent)
    31     : Statement(ClassTypeId::Next, {cast<Assign>(initial), cast<Assign>(expr)}, cast<Assign>(initial)->getName(), parent) {
     28    explicit Next(PabloAST * initial, PabloAST * expr, PabloBlock * parent)
     29    : Statement(ClassTypeId::Next, {expr, cast<Assign>(initial)}, cast<Assign>(initial)->getName(), parent) {
    3230        this->addUser(initial);
    3331    }
Note: See TracChangeset for help on using the changeset viewer.