Changeset d939274 for src


Ignore:
Timestamp:
Jun 2, 2015, 1:59:11 PM (9 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, string, with_gc
Children:
4eb1db6
Parents:
b2152e7a
Message:

documentation, reformatting, operator+ for iterators

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rb2152e7a rd939274  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jun 02 13:25:22 2015
    13 // Update Count     : 118
     12// Last Modified On : Tue Jun 02 13:45:20 2015
     13// Update Count     : 119
    1414//
    1515
  • src/CodeGen/CodeGenerator.h

    rb2152e7a rd939274  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jun 02 13:25:09 2015
    13 // Update Count     : 12
     12// Last Modified On : Tue Jun 02 13:43:29 2015
     13// Update Count     : 14
    1414//
    1515
  • src/Common/utility.h

    rb2152e7a rd939274  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 15:34:57 2015
    13 // Update Count     : 3
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 29 16:17:02 2015
     13// Update Count     : 7
    1414//
    1515
     
    198198}
    199199
     200// it's nice to actually be able to increment iterators by an arbitrary amount
     201template< typename Iterator >
     202Iterator operator+(Iterator i, int inc) {
     203        while ( inc > 0 ) {
     204                ++i;
     205                --inc;
     206        }
     207        return i;
     208}
     209
    200210#endif // _UTILITY_H
    201211
  • src/ControlStruct/MLEMutator.cc

    rb2152e7a rd939274  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Jun 02 13:35:49 2015
    13 // Update Count     : 91
     12// Last Modified On : Tue Jun 02 13:43:01 2015
     13// Update Count     : 92
    1414//
    1515
     
    3333                } // if
    3434
     35                // a child statement may set the break label
     36                // - if they do, attach it to the next statement
    3537                std::list< Statement * > &kids = cmpndStmt->get_kids();
    3638                for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) {
     
    3840
    3941                        if ( ! get_breakLabel().empty() ) {
    40                                 std::list< Statement * >::iterator next = k; next++;
     42                                std::list< Statement * >::iterator next = k+1;
    4143                                if ( next == kids.end() ) {
    4244                                        std::list<Label> ls; ls.push_back( get_breakLabel() );
     
    5860                } // if
    5961
    60                 //mutateAll( cmpndStmt->get_kids(), *this );
    6162                return cmpndStmt;
    6263        }
     
    7677        Statement *MLEMutator::mutate( ForStmt *forStmt ) {
    7778                enclosingLoops.push_back( Entry( forStmt ) );
    78                 maybeMutate( forStmt->get_body(), *this );
     79                forStmt->set_body( maybeMutate( forStmt->get_body(), *this ) );
    7980
    8081                Entry &e = enclosingLoops.back();
     
    185186
    186187        Statement *MLEMutator::mutateLoop( Statement *bodyLoop, Entry &e ) {
     188                // ensure loop body is a block
    187189                CompoundStmt *newBody;
    188190                if ( ! (newBody = dynamic_cast<CompoundStmt *>( bodyLoop )) ) {
     
    216218        }
    217219
    218         //*** Entry's methods
     220        //*** Entry's methods - ensure these labels can be set at most once
    219221        void MLEMutator::Entry::set_contExit( Label l ) {
    220222                assert ( contExit == "" || contExit == l );
  • src/SynTree/Mutator.h

    rb2152e7a rd939274  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:12:28 2015
    13 // Update Count     : 3
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Fri May 29 16:34:08 2015
     13// Update Count     : 4
    1414//
    1515#include <cassert>
     
    104104                assert( newnode );
    105105                return newnode;
    106 ///         return tree->acceptMutator( mutator );
    107106        } else {
    108107                return 0;
  • src/SynTree/ObjectDecl.cc

    rb2152e7a rd939274  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 10:14:18 2015
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Thu May 28 14:10:02 2015
     13// Update Count     : 8
    1414//
    1515
     
    6565
    6666void ObjectDecl::printShort( std::ostream &os, int indent ) const {
     67#if 0
     68        if ( get_mangleName() != "") {
     69                os << get_mangleName() << ": a ";
     70        } else
     71#endif
    6772        if ( get_name() != "" ) {
    6873                os << get_name() << ": a ";
Note: See TracChangeset for help on using the changeset viewer.