Ignore:
Timestamp:
Jul 6, 2015, 9:35:48 AM (4 years ago)
Author:
nmedfort
Message:

Next nodes for While statements must be declared similar to how Defined Vars are for Ifs. (Temporarily breaks multiplexing correctness.)

File:
1 edited

Legend:

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

    r4612 r4641  
    9494Next * PabloBlock::createNext(Assign * assign, PabloAST * expr) {
    9595    assert (assign && expr);
    96     return insertAtInsertionPoint(new Next(assign, expr, this));
     96    assert (assign->getName());
     97    std::string name = assign->getName()->to_string() + "'";
     98    return new Next(assign, createAssign(std::move(name), expr), this);
    9799}
    98100
     
    393395}
    394396
    395 While * PabloBlock::createWhile(PabloAST * condition, PabloBlock & body) {
    396     assert (condition);
    397     return insertAtInsertionPoint(new While(condition, body, this));
     397While * PabloBlock::createWhile(PabloAST * condition, const std::initializer_list<Next *> nextVars, PabloBlock & body) {
     398    assert (condition);
     399    return insertAtInsertionPoint(new While(condition, nextVars, body, this));
     400}
     401
     402While * PabloBlock::createWhile(PabloAST * condition, const std::vector<Next *> & nextVars, PabloBlock & body) {
     403    assert (condition);
     404    return insertAtInsertionPoint(new While(condition, nextVars, body, this));
     405}
     406
     407While * PabloBlock::createWhile(PabloAST * condition, std::vector<Next *> && nextVars, PabloBlock & body) {
     408    assert (condition);
     409    return insertAtInsertionPoint(new While(condition, nextVars, body, this));
    398410}
    399411
Note: See TracChangeset for help on using the changeset viewer.