Ignore:
Timestamp:
Jul 12, 2015, 12:10:59 AM (4 years ago)
Author:
nmedfort
Message:

Moved 'resolveProperties' into CC_NameMap as a single call for each unique Name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/utf8_encoder.cpp

    r4615 r4660  
    2323        if (const CC * cc = dyn_cast_or_null<CC>(name->getDefinition())) {
    2424            if (cc->size() == 1) {
    25                 name->setDefinition(rangeToUTF8(cc->front()));
     25                RE * def = rangeToUTF8(cc->front());
     26                name->setDefinition(def);
    2627            }
    2728            else if (cc->size() > 1) {
     
    3031                    alt.push_back(rangeToUTF8(i));
    3132                }
    32                 name->setDefinition(makeAlt(alt.begin(), alt.end()));
     33                RE * def = makeAlt(alt.begin(), alt.end());
     34                name->setDefinition(def);
    3335            }
    3436        }
    3537    }
    36     ast = nameMap.process(ast, ByteClass);
    37     return ast;
     38    nameMap.clear();
     39    return nameMap.process(ast, ByteClass);
    3840}
    3941
Note: See TracChangeset for help on using the changeset viewer.