Changeset 2de162da for src/ResolvExpr
- Timestamp:
- Jun 27, 2016, 4:15:28 PM (8 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:
- ebf5689
- Parents:
- c2ad3c9
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/RenameVars.cc
rc2ad3c9 r2de162da 45 45 void RenameVars::visit( PointerType *pointerType ) { 46 46 typeBefore( pointerType ); 47 /// std::cout << "do pointer" << std::endl;48 47 maybeAccept( pointerType->get_base(), *this ); 49 /// std::cout << "done pointer" << std::endl;50 48 typeAfter( pointerType ); 51 49 } … … 60 58 void RenameVars::visit( FunctionType *functionType ) { 61 59 typeBefore( functionType ); 62 /// std::cout << "return vals" << std::endl;63 60 acceptAll( functionType->get_returnVals(), *this ); 64 /// std::cout << functionType->get_parameters().size() << " parameters" << std::endl;65 61 acceptAll( functionType->get_parameters(), *this ); 66 /// std::cout << "done function" << std::endl;67 62 typeAfter( functionType ); 68 63 } … … 95 90 void RenameVars::visit( TypeInstType *instType ) { 96 91 typeBefore( instType ); 97 /// std::cout << "instance of type " << instType->get_name() << std::endl;98 92 std::map< std::string, std::string >::const_iterator i = mapStack.front().find( instType->get_name() ); 99 93 if ( i != mapStack.front().end() ) { 100 /// std::cout << "found name " << i->second << std::endl;101 94 instType->set_name( i->second ); 102 95 } else { 103 /// std::cout << "no name found" << std::endl;104 96 } // if 105 97 acceptAll( instType->get_parameters(), *this ); … … 120 112 void RenameVars::typeBefore( Type *type ) { 121 113 if ( ! type->get_forall().empty() ) { 122 /// std::cout << "type with forall: ";123 /// type->print( std::cout );124 /// std::cout << std::endl;125 114 // copies current name mapping into new mapping 126 115 mapStack.push_front( mapStack.front() ); -
src/ResolvExpr/typeops.h
rc2ad3c9 r2de162da 54 54 55 55 // in AdjustExprType.cc 56 /// Replaces array types with the equivalent pointer, and function types with a pointer-to-function 56 57 void adjustExprType( Type *&type, const TypeEnvironment &env, const SymTab::Indexer &indexer ); 57 58
Note: See TracChangeset
for help on using the changeset viewer.