Changeset 76e8c55 for src/GenPoly


Ignore:
Timestamp:
Aug 4, 2016, 12:30:01 PM (8 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
064e3ff, cf37a8e
Parents:
8688ce1 (diff), bee4283 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r8688ce1 r76e8c55  
    619619                        return 0;
    620620                }
    621                
     621
    622622                /// Returns T if the given declaration is a function with parameters (T*, T) for some TypeInstType T, NULL otherwise
    623623                TypeInstType *isTypeInstPtrValFn( DeclarationWithType *decl ) {
     
    637637                        return 0;
    638638                }
    639                
     639
    640640                /// Returns T if the given declaration is (*?=?)(T *, T) for some TypeInstType T (return not checked, but maybe should be), NULL otherwise
    641641                TypeInstType *isTypeInstAssignment( DeclarationWithType *decl ) {
     
    677677                        return 0;
    678678                }
    679                
     679
    680680                /// Returns T if the given declaration is a function with parameters (T*, T) for some type T, where neither parameter is cv-qualified,
    681681                /// NULL otherwise
     
    772772                                copyOps.beginScope();
    773773                                dtorOps.beginScope();
    774                                
     774
    775775                                DeclarationWithType *oldRetval = retval;
    776776                                bool oldUseRetval = useRetval;
     
    14711471                VariableExpr *wrapFunctionDecl( DeclarationWithType *functionDecl ) {
    14721472                        // line below cloned from FixFunction.cc
     1473                        // xxx - functionObj is never added to a list of declarations...
    14731474                        ObjectDecl *functionObj = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClass(), functionDecl->get_linkage(), 0,
    14741475                                                                  new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0 );
    14751476                        functionObj->set_mangleName( functionDecl->get_mangleName() );
     1477                        functionObj->set_scopeLevel( functionDecl->get_scopeLevel() );
    14761478                        return new VariableExpr( functionObj );
    14771479                }
     
    14921494                                        = ParamEntry( assertOp->get_uniqueId(), assertOp->get_type()->clone(), actualDecl->get_type()->clone(), wrapFunctionDecl( assertOp ) );
    14931495                }
    1494                
     1496
    14951497                Statement * Pass1::mutate( ReturnStmt *returnStmt ) {
    14961498                        if ( retval && returnStmt->get_expr() ) {
     
    15541556                                                DeclarationWithType *assertDtor = findOpForType( formalType, dtorOps, scopedDtorOps );
    15551557                                                if ( ! assertDtor ) throw SemanticError( "No destructor found for ", formalType );
    1556                                                
     1558
    15571559                                                // add inferred parameters for otype operators to assignment expression
    15581560                                                // NOTE: Code here assumes that first four assertions are assign op, ctor, copy ctor, dtor, in that order
     
    15681570                                                ++actualIt;
    15691571                                                addAssertionFor( assignExpr, *actualIt, assertDtor );
    1570                                                
    1571                                                 //DeclarationWithType *actualDecl = asserts.front();
    1572                                                 //assignExpr->get_inferParams()[ actualDecl->get_uniqueId() ]
    1573                                                 //      = ParamEntry( assertAssign->get_uniqueId(), assertAssign->get_type()->clone(), actualDecl->get_type()->clone(), wrapFunctionDecl( assertAssign ) );
     1572
    15741573                                        }
    15751574                                }
     
    21812180                bool PolyGenericCalculator::findGeneric( Type *ty ) {
    21822181                        ty = replaceTypeInst( ty, env );
    2183                        
     2182
    21842183                        if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) {
    21852184                                if ( scopeTyVars.find( typeInst->get_name() ) != scopeTyVars.end() ) {
Note: See TracChangeset for help on using the changeset viewer.