Changeset 60089f4
- Timestamp:
- May 2, 2016, 3:12:59 PM (9 years ago)
- 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:
- 9243a501, d7903b1
- Parents:
- 89231bc
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/utility.h
r89231bc r60089f4 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // utility.h -- 7 // utility.h -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Jul 2 18:04:41 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Thu Apr 28 13:18:24 2016 13 13 // Update Count : 16 14 14 // … … 62 62 os << std::string( indent, ' ' ); 63 63 (*i)->print( os, indent + 2 ); 64 // need an endl after each element because it's not easy to know when each individual item should end 64 65 os << std::endl; 65 66 } // if … … 128 129 } 129 130 130 template < typename T > 131 template < typename T > 131 132 std::string toString ( T value ) { 132 133 std::ostringstream os; -
src/SynTree/CommaExpr.cc
r89231bc r60089f4 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // CommaExpr.cc -- 7 // CommaExpr.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Mon May 18 08:09:58 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon May 02 15:11:29 2016 13 13 // Update Count : 1 14 14 // … … 20 20 CommaExpr::CommaExpr( Expression *arg1, Expression *arg2, Expression *_aname ) 21 21 : Expression( _aname ), arg1( arg1 ), arg2( arg2 ) { 22 // xxx - result of a comma expression is never an lvalue, so should set lvalue 23 // to false on all result types. Actually doing this causes some strange things 24 // to happen in later passes (particularly, Specialize, Lvalue, and Box). This needs to be looked into. 22 25 cloneAll( arg2->get_results(), get_results() ); 26 // for ( Type *& type : get_results() ) { 27 // type->set_isLvalue( false ); 28 // } 23 29 } 24 30 … … 33 39 34 40 void CommaExpr::print( std::ostream &os, int indent ) const { 35 os << std::string( indent, ' ' ) << "Comma Expression:" << std::endl; 41 os << "Comma Expression:" << std::endl; 42 os << std::string( indent+2, ' ' ); 36 43 arg1->print( os, indent+2 ); 37 44 os << std::endl; 45 os << std::string( indent+2, ' ' ); 38 46 arg2->print( os, indent+2 ); 39 47 Expression::print( os, indent ); -
src/SynTree/CompoundStmt.cc
r89231bc r60089f4 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // XXX.cc -- 7 // XXX.cc -- 8 8 // 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Jun 23 11:37:49 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon May 02 15:10:47 2016 13 13 // Update Count : 3 14 14 // … … 34 34 35 35 void CompoundStmt::print( std::ostream &os, int indent ) const { 36 os << string( indent, ' ' ) <<"CompoundStmt" << endl ;36 os << "CompoundStmt" << endl ; 37 37 printAll( kids, os, indent + 2 ); 38 38 } -
src/SynTree/Expression.cc
r89231bc r60089f4 72 72 73 73 void ConstantExpr::print( std::ostream &os, int indent ) const { 74 os << std::string( indent, ' ' ) <<"constant expression " ;74 os << "constant expression " ; 75 75 constant.print( os ); 76 76 Expression::print( os, indent ); … … 381 381 void UntypedExpr::print( std::ostream &os, int indent ) const { 382 382 os << "Applying untyped: " << std::endl; 383 os << std::string( indent , ' ' );383 os << std::string( indent+4, ' ' ); 384 384 function->print(os, indent + 4); 385 385 os << std::string( indent, ' ' ) << "...to: " << std::endl; 386 os << std::string( indent, ' ' ); 387 printArgs(os, indent + 4); 386 printAll(args, os, indent + 4); 388 387 Expression::print( os, indent ); 389 388 } … … 391 390 void UntypedExpr::printArgs( std::ostream &os, int indent ) const { 392 391 std::list<Expression *>::const_iterator i; 393 for (i = args.begin(); i != args.end(); i++) 392 for (i = args.begin(); i != args.end(); i++) { 393 os << std::string(indent, ' ' ); 394 394 (*i)->print(os, indent); 395 } 395 396 } 396 397 -
src/SynTree/Initializer.cc
r89231bc r60089f4 44 44 void SingleInit::print( std::ostream &os, int indent ) { 45 45 os << std::endl << std::string(indent, ' ' ) << "Simple Initializer: " << std::endl; 46 os << std::string(indent+4, ' ' ); 46 47 value->print( os, indent+4 ); 47 48 -
src/SynTree/Statement.cc
r89231bc r60089f4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : T ue Apr 26 12:33:33201612 // Last Modified On : Thu Apr 28 13:34:32 2016 13 13 // Update Count : 54 14 14 // … … 128 128 void IfStmt::print( std::ostream &os, int indent ) const { 129 129 os << "If on condition: " << endl ; 130 os << string( indent+4, ' ' ); 130 131 condition->print( os, indent + 4 ); 131 132 132 os << string( indent, ' ' ) << ".... and branches: " << endl; 133 133 os << string( indent+2, ' ' ) << "... then: " << endl; 134 135 os << string( indent+4, ' ' ); 134 136 thenPart->print( os, indent + 4 ); 135 137 136 138 if ( elsePart != 0 ) { 139 os << string( indent+2, ' ' ) << "... else: " << endl; 140 os << string( indent+4, ' ' ); 137 141 elsePart->print( os, indent + 4 ); 138 142 } // if
Note: See TracChangeset
for help on using the changeset viewer.