Changeset 9dbf7c8


Ignore:
Timestamp:
Oct 19, 2017, 11:15:36 AM (7 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:
aabc60c
Parents:
582ee28
git-author:
Rob Schluntz <rschlunt@…> (10/17/17 12:55:58)
git-committer:
Rob Schluntz <rschlunt@…> (10/19/17 11:15:36)
Message:

Modify CopyParams? to use DWT pointers rather than unique ids

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/CopyParams.cc

    r582ee28 r9dbf7c8  
    4040
    4141          private:
    42                 std::set< UniqueId > modVars;
     42                std::set< DeclarationWithType * > modVars;
    4343                UniqueName namer;
    4444        };
     
    6868                                } // for
    6969                                for ( std::list< DeclarationWithType* >::iterator param = funcDecl->type->parameters.begin(); param != funcDecl->type->parameters.end(); ++param ) {
    70                                         std::set< UniqueId >::const_iterator var = modVars.find( (*param)->get_uniqueId() );
     70                                        std::set< DeclarationWithType * >::const_iterator var = modVars.find( *param );
    7171                                        if ( var != modVars.end() ) {
    7272                                                TypeInstType *typeInst = dynamic_cast< TypeInstType* >( (*param)->get_type() );
    73                                                 assertf( typeInst, "Found in modVars for function %s: unique id: %u, %s", funcDecl->name.c_str(), (*param)->get_uniqueId(), toString( *param ).c_str() );
    7473                                                std::map< std::string, DeclarationWithType* >::const_iterator assignOp = assignOps.find( typeInst->name );
    7574                                                if ( assignOp != assignOps.end() ) {
     
    9998                if ( VariableExpr *varExpr = dynamic_cast< VariableExpr* >( addrExpr->arg ) ) {
    10099                        if ( dynamic_cast< TypeInstType* >( varExpr->var->get_type() ) ) {
    101                                 assertf( varExpr->var->get_uniqueId(), "Address-taken variable does not have a unique ID: %s", toString( varExpr->var ).c_str() );
    102                                 modVars.insert( varExpr->var->get_uniqueId() );
    103                                 std::cerr << "added unique id: " << varExpr->var->get_uniqueId() << " var: " << varExpr->var << std::endl;
     100                                modVars.insert( varExpr->var );
    104101                        } // if
    105102                } // if
  • src/main.cc

    r582ee28 r9dbf7c8  
    321321                OPTPRINT("instantiateGenerics")
    322322                GenPoly::instantiateGeneric( translationUnit );
     323                OPTPRINT( "convertLvalue" )
     324                GenPoly::convertLvalue( translationUnit );
    323325                OPTPRINT( "copyParams" );
    324326                GenPoly::copyParams( translationUnit );
    325                 OPTPRINT( "convertLvalue" )
    326                 GenPoly::convertLvalue( translationUnit );
    327327
    328328                if ( bboxp ) {
Note: See TracChangeset for help on using the changeset viewer.