Ignore:
Timestamp:
Feb 9, 2018, 11:41:02 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1dcd52a3
Parents:
b8a52f5
Message:

Minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Unify.cc

    rb8a52f5 r538334a  
    580580
    581581                        // sizes don't have to match if ttypes are involved; need to be more precise wrt where the ttype is to prevent errors
    582                         if ( (flatFunc->get_parameters().size() == flatOther->get_parameters().size() && flatFunc->get_returnVals().size() == flatOther->get_returnVals().size()) || flatFunc->isTtype() || flatOther->isTtype() ) {
    583                                 if ( unifyDeclList( flatFunc->get_parameters().begin(), flatFunc->get_parameters().end(), flatOther->get_parameters().begin(), flatOther->get_parameters().end(), env, needAssertions, haveAssertions, openVars, indexer ) ) {
    584                                         if ( unifyDeclList( flatFunc->get_returnVals().begin(), flatFunc->get_returnVals().end(), flatOther->get_returnVals().begin(), flatOther->get_returnVals().end(), env, needAssertions, haveAssertions, openVars, indexer ) ) {
     582                        if ( (flatFunc->parameters.size() == flatOther->parameters.size() && flatFunc->returnVals.size() == flatOther->returnVals.size()) || flatFunc->isTtype() || flatOther->isTtype() ) {
     583                                if ( unifyDeclList( flatFunc->parameters.begin(), flatFunc->parameters.end(), flatOther->parameters.begin(), flatOther->parameters.end(), env, needAssertions, haveAssertions, openVars, indexer ) ) {
     584                                        if ( unifyDeclList( flatFunc->returnVals.begin(), flatFunc->returnVals.end(), flatOther->returnVals.begin(), flatOther->returnVals.end(), env, needAssertions, haveAssertions, openVars, indexer ) ) {
    585585
    586586                                                // the original types must be used in mark assertions, since pointer comparisons are used
     
    599599                // check that other type is compatible and named the same
    600600                RefType *otherStruct = dynamic_cast< RefType* >( other );
    601                 result = otherStruct && inst->get_name() == otherStruct->get_name();
     601                result = otherStruct && inst->name == otherStruct->name;
    602602        }
    603603
     
    608608                if ( ! result ) return;
    609609                // Check that parameters of types unify, if any
    610                 std::list< Expression* > params = inst->get_parameters();
    611                 std::list< Expression* > otherParams = ((RefType*)other)->get_parameters();
     610                std::list< Expression* > params = inst->parameters;
     611                std::list< Expression* > otherParams = ((RefType*)other)->parameters;
    612612
    613613                std::list< Expression* >::const_iterator it = params.begin(), jt = otherParams.begin();
Note: See TracChangeset for help on using the changeset viewer.