Ignore:
Timestamp:
Jul 13, 2015, 3:55:59 PM (4 years ago)
Author:
nmedfort
Message:

Made pablo compiler reenterant through alternate compile method that takes a Module parameter.

Location:
icGREP/icgrep-devel/icgrep/cc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_namemap.cpp

    r4660 r4665  
    1515
    1616RE * CC_NameMap::process(RE * re, const CC_type type) {
    17 
    1817    if (Alt * alt = dyn_cast<Alt>(re)) {
    1918        for (auto i = alt->begin(); i != alt->end(); ++i) {
     
    4140    }
    4241    else if (Name * name = dyn_cast<Name>(re)) {
     42        RE * def = name->getDefinition();
     43        if (def && !isa<CC>(def)) {
     44            name->setDefinition(process(def, type));
     45        }
    4346        std::string classname = name->getName();
    4447        auto f = mNameMap.find(classname);
     
    4649            if (name->getType() == Name::Type::UnicodeProperty) {
    4750                resolveProperty(name);
    48             }
    49             RE * def = name->getDefinition();
    50             if (def) {
    51                 name->setDefinition(process(def, type));
     51                RE * def = name->getDefinition();
     52                if (def) {
     53                    name->setDefinition(process(def, type));
     54                }
    5255            }
    5356            return insert(std::move(classname), name);
  • icGREP/icgrep-devel/icgrep/cc/cc_namemap.hpp

    r4660 r4665  
    2121
    2222    re::RE * process(re::RE * re, const re::CC_type t);
    23 
    24     inline void clear() {
    25         mNameMap.clear();
    26         mNameVector.clear();
    27     }
    2823
    2924    inline iterator begin() const {
Note: See TracChangeset for help on using the changeset viewer.