Changes in / [6e3e0717:a62749f]


Ignore:
Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r6e3e0717 ra62749f  
    159159                auto&& attr = get<Attribute>().acceptL( node->attributes );
    160160                if ( inCache( node ) ) {
     161                        if(node->name == "tmp") {
     162                                std::cerr << (void*)node << "(new) in cache " << (void*)this->node << "(old)" << std::endl;
     163                        }
    161164                        return nullptr;
    162165                }
     
    171174                        Type::FuncSpecifiers( node->funcSpec.val )
    172175                );
     176                if(node->name == "tmp") {
     177                        std::cerr << (void*)node << "(new) created " << (void*)decl << "(old)" << std::endl;
     178                }
    173179                return declWithTypePostamble( decl, node );
    174180        }
     
    14651471
    14661472        virtual void visit( ObjectDecl * old ) override final {
     1473                if( old->name == "tmp" ) {
     1474                        std::cerr << "building parameters for" << (void*)old << std::endl;
     1475                }
    14671476                auto&& type = GET_ACCEPT_1(type, Type);
    14681477                auto&& init = GET_ACCEPT_1(init, Init);
    14691478                auto&& bfwd = GET_ACCEPT_1(bitfieldWidth, Expr);
    14701479                auto&& attr = GET_ACCEPT_V(attributes, Attribute);
     1480                if( old->name == "tmp" ) {
     1481                        std::cerr << "checking cache for " << (void*)old << std::endl;
     1482                }
    14711483                if ( inCache( old ) ) {
     1484                        if( old->name == "tmp" ) {
     1485                                std::cerr << (void*)old << "(old) in cache " << (void*)this->node << "(new)" << std::endl;
     1486                        }
    14721487                        return;
    14731488                }
     
    14841499                );
    14851500                cache.emplace(old, decl);
     1501                if( old->name == "tmp" ) {
     1502                        std::cerr << (void*)old << "(old) added to cache with " << (void*)decl << "(new)" << std::endl;
     1503                }
    14861504                assert(cache.find( old ) != cache.end());
    14871505                decl->scopeLevel = old->scopeLevel;
     
    14921510
    14931511                this->node = decl;
     1512
     1513                if( old->name == "tmp" ) {
     1514                        std::cerr << (void*)old << "(old) created " << (void*)this->node << "(new)" << std::endl;
     1515                }
    14941516        }
    14951517
  • src/AST/Pass.hpp

    r6e3e0717 ra62749f  
    262262/// Used to restore values/functions/etc. when the Pass finishes visiting this node
    263263class WithGuards {
    264         __pass::at_cleanup_t at_cleanup = [](__pass::cleanup_func_t, void*) {
    265                 std::cerr << "No cleanup function was set" << std::endl;
    266                 abort();
    267         };
    268 
    269         template< typename pass_t>
    270         friend auto __pass::at_cleanup( pass_t & pass, int ) -> decltype( &pass.at_cleanup );
     264        __pass::at_cleanup_t at_cleanup;
     265
    271266public:
    272 
    273267        /// When this node is finished being visited, restore the value of a variable
    274268        template< typename T >
Note: See TracChangeset for help on using the changeset viewer.