Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r9799ec8 rca35c51  
    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...
    14741473                        ObjectDecl *functionObj = new ObjectDecl( functionDecl->get_name(), functionDecl->get_storageClass(), functionDecl->get_linkage(), 0,
    14751474                                                                  new PointerType( Type::Qualifiers(), functionDecl->get_type()->clone() ), 0 );
    14761475                        functionObj->set_mangleName( functionDecl->get_mangleName() );
    1477                         functionObj->set_scopeLevel( functionDecl->get_scopeLevel() );
    14781476                        return new VariableExpr( functionObj );
    14791477                }
     
    14941492                                        = ParamEntry( assertOp->get_uniqueId(), assertOp->get_type()->clone(), actualDecl->get_type()->clone(), wrapFunctionDecl( assertOp ) );
    14951493                }
    1496 
     1494               
    14971495                Statement * Pass1::mutate( ReturnStmt *returnStmt ) {
    14981496                        if ( retval && returnStmt->get_expr() ) {
     
    15561554                                                DeclarationWithType *assertDtor = findOpForType( formalType, dtorOps, scopedDtorOps );
    15571555                                                if ( ! assertDtor ) throw SemanticError( "No destructor found for ", formalType );
    1558 
     1556                                               
    15591557                                                // add inferred parameters for otype operators to assignment expression
    15601558                                                // NOTE: Code here assumes that first four assertions are assign op, ctor, copy ctor, dtor, in that order
     
    15701568                                                ++actualIt;
    15711569                                                addAssertionFor( assignExpr, *actualIt, assertDtor );
    1572 
     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 ) );
    15731574                                        }
    15741575                                }
     
    21802181                bool PolyGenericCalculator::findGeneric( Type *ty ) {
    21812182                        ty = replaceTypeInst( ty, env );
    2182 
     2183                       
    21832184                        if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) {
    21842185                                if ( scopeTyVars.find( typeInst->get_name() ) != scopeTyVars.end() ) {
Note: See TracChangeset for help on using the changeset viewer.