Ignore:
Timestamp:
Jun 12, 2015, 2:16:59 PM (4 years ago)
Author:
nmedfort
Message:

Fixed PabloBuilder? and intergrated it into CC Compiler.

File:
1 edited

Legend:

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

    r4585 r4602  
    3333namespace pablo {
    3434
    35 class Assign;
    36 class Advance;
    37 class And;
    38 class Call;
    39 class MatchStar;
    40 class Next;
    41 class Not;
    42 class Or;
    43 class Ones;
    44 class ScanThru;
    45 class Sel;
    46 class String;
    47 class Integer;
    48 class Var;
    49 class Xor;
    50 class Zeroes;
    51 class If;
    52 class While;
    53 
    54 
    5535class PabloBlock : public PabloAST, public StatementList {
    56     friend class pablo::PabloAST;
    57     friend class Builder;   
     36    friend class PabloAST;
     37    friend class PabloBuilder;
    5838public:
    5939
     
    9979    }
    10080
    101     Call * createCall(String * name);
     81    inline Call * createCall(String * name) {
     82        return createCall(cast<PabloAST>(name));
     83    }
    10284
    10385    Assign * createAssign(const std::string prefix, PabloAST * expr, const int outputIndex = -1);
     
    10789    }
    10890
    109     Var * createVar(String * name);
    110 
    111     PabloAST * createVar(const PabloAST * const) {
    112         throw std::runtime_error("Var objects should only refer to external Vars (i.e., input basis bit streams). Use Assign objects directly.");
     91    inline Var * createVar(String * name) {
     92        return createVar(cast<PabloAST>(name));
    11393    }
    11494
     
    194174        return expr;
    195175    }
     176private:
     177
     178    Call * createCall(PabloAST * name);
     179
     180    Var * createVar(PabloAST * name);
    196181
    197182private:       
Note: See TracChangeset for help on using the changeset viewer.