Changeset 5e92fee


Ignore:
Timestamp:
Dec 14, 2015, 5:17:49 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
78dd0da
Parents:
db0b3ce
Message:

Fixed Box pass to use new _sizeof_T variable throughout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rdb0b3ce r5e92fee  
    653653                                addAssign->get_args().push_back( appExpr->get_args().front() );
    654654                        } // if
    655                         addAssign->get_args().push_back( new NameExpr( polyName ) );
     655                        addAssign->get_args().push_back( new NameExpr( std::string("_sizeof_") + polyName ) );
    656656                        addAssign->get_results().front() = appExpr->get_results().front()->clone();
    657657                        if ( appExpr->get_env() ) {
     
    680680                                                        UntypedExpr *multiply = new UntypedExpr( new NameExpr( "?*?" ) );
    681681                                                        multiply->get_args().push_back( appExpr->get_args().back() );
    682                                                         multiply->get_args().push_back( new NameExpr( typeInst1->get_name() ) );
     682                                                        multiply->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst1->get_name() ) );
    683683                                                        ret->get_args().push_back( appExpr->get_args().front() );
    684684                                                        ret->get_args().push_back( multiply );
     
    686686                                                        UntypedExpr *multiply = new UntypedExpr( new NameExpr( "?*?" ) );
    687687                                                        multiply->get_args().push_back( appExpr->get_args().front() );
    688                                                         multiply->get_args().push_back( new NameExpr( typeInst2->get_name() ) );
     688                                                        multiply->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst2->get_name() ) );
    689689                                                        ret->get_args().push_back( multiply );
    690690                                                        ret->get_args().push_back( appExpr->get_args().back() );
     
    749749                                                        UntypedExpr *divide = new UntypedExpr( new NameExpr( "?/?" ) );
    750750                                                        divide->get_args().push_back( appExpr );
    751                                                         divide->get_args().push_back( new NameExpr( typeInst1->get_name() ) );
     751                                                        divide->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst1->get_name() ) );
    752752                                                        divide->get_results().push_front( appExpr->get_results().front()->clone() );
    753753                                                        if ( appExpr->get_env() ) {
     
    759759                                                        UntypedExpr *multiply = new UntypedExpr( new NameExpr( "?*?" ) );
    760760                                                        multiply->get_args().push_back( appExpr->get_args().back() );
    761                                                         multiply->get_args().push_back( new NameExpr( typeInst1->get_name() ) );
     761                                                        multiply->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst1->get_name() ) );
    762762                                                        appExpr->get_args().back() = multiply;
    763763                                                } else if ( typeInst2 ) {
    764764                                                        UntypedExpr *multiply = new UntypedExpr( new NameExpr( "?*?" ) );
    765765                                                        multiply->get_args().push_back( appExpr->get_args().front() );
    766                                                         multiply->get_args().push_back( new NameExpr( typeInst2->get_name() ) );
     766                                                        multiply->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst2->get_name() ) );
    767767                                                        appExpr->get_args().front() = multiply;
    768768                                                } // if
     
    774774                                                        UntypedExpr *multiply = new UntypedExpr( new NameExpr( "?*?" ) );
    775775                                                        multiply->get_args().push_back( appExpr->get_args().back() );
    776                                                         multiply->get_args().push_back( new NameExpr( typeInst->get_name() ) );
     776                                                        multiply->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst->get_name() ) );
    777777                                                        appExpr->get_args().back() = multiply;
    778778                                                } // if
     
    11081108                                        assert( typeInst );
    11091109                                        UntypedExpr *alloc = new UntypedExpr( new NameExpr( "__builtin_alloca" ) );
    1110                                         alloc->get_args().push_back( new NameExpr( typeInst->get_name() ) );
     1110                                        alloc->get_args().push_back( new NameExpr( std::string("_sizeof_") + typeInst->get_name() ) );
    11111111
    11121112                                        delete objectDecl->get_init();
Note: See TracChangeset for help on using the changeset viewer.