Ignore:
Timestamp:
Dec 16, 2016, 4:16:28 PM (3 years ago)
Author:
nmedfort
Message:

Rewrite of the CarryManager? to support non-carry-collapsing loops.

File:
1 edited

Legend:

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

    r5217 r5227  
    1616class Assign;
    1717
    18 // A Var is unique in that it is not a statement but a "lives" within a
    19 // scope and cannot be accessed outside of it. A Var is mutable (via an
    20 // Assign instruction.
    21 
    2218class Var : public PabloAST {
    2319    friend class PabloBlock;
     
    3228        return false;
    3329    }
     30    bool isReadOnly() const {
     31        return mReadOnly;
     32    }
     33    void setReadOnly(const bool value = true) {
     34        mReadOnly = value;
     35    }
    3436protected:
    35     Var(const PabloAST * name, Type * const type)
    36     : PabloAST(ClassTypeId::Var, type, cast<String>(name)) {
     37    Var(const PabloAST * name, Type * const type, const bool readOnly = false)
     38    : PabloAST(ClassTypeId::Var, type, cast<String>(name))
     39    , mReadOnly(readOnly) {
    3740
    3841    }
     42private:
     43    bool mReadOnly;
    3944};
    4045
Note: See TracChangeset for help on using the changeset viewer.