Ignore:
Timestamp:
Jun 29, 2016, 12:41:56 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
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, with_gc
Children:
85f0713
Parents:
982d63f
Message:

clean up comments, remove dead code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r982d63f r4b2589a  
    496496
    497497                void ObjDeclCollector::visit( DeclStmt *stmt ) {
     498                        // keep track of all variables currently in scope
    498499                        if ( ObjectDecl * objDecl = dynamic_cast< ObjectDecl * > ( stmt->get_decl() ) ) {
    499500                                curVars.insert( objDecl );
     
    503504
    504505                void LabelFinder::handleStmt( Statement * stmt ) {
     506                        // for each label, remember the variables in scope at that label.
    505507                        for ( Label l : stmt->get_labels() ) {
    506508                                vars[l] = curVars;
     
    549551                        Parent::visit( compoundStmt );
    550552
     553                        // add destructors for the current scope that we're exiting
    551554                        std::list< Statement * > & statements = compoundStmt->get_kids();
    552555                        insertDtors( reverseDeclOrder.front().begin(), reverseDeclOrder.front().end(), back_inserter( statements ) );
    553 
    554                         // xxx - ??
    555                         // deleteAll( dtorStmts.back() );
    556556                        reverseDeclOrder.pop_front();
    557557                }
    558558
    559559                void InsertDtors::visit( ReturnStmt * returnStmt ) {
     560                        // return exits all scopes, so dump destructors for all scopes
    560561                        for ( OrderedDecls & od : reverseDeclOrder ) {
    561562                                insertDtors( od.begin(), od.end(), back_inserter( stmtsToAdd ) );
Note: See TracChangeset for help on using the changeset viewer.