Changeset 74b007ba for src/ResolvExpr
- Timestamp:
- Aug 14, 2017, 2:05:42 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 36a5a77
- Parents:
- 9236060
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r9236060 r74b007ba 633 633 AssertionSet newNeed; 634 634 //AssertionParentSet needParents; 635 PRINT( 636 std::cerr << "env is: " << std::endl; 637 newAlt.env.print( std::cerr, 0 ); 638 std::cerr << std::endl; 639 ) 640 635 641 inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, /*needParents,*/ 0, indexer, out ); 636 642 // PRINT( -
src/ResolvExpr/ConversionCost.cc
r9236060 r74b007ba 77 77 78 78 Cost convertToReferenceCost( Type * src, Type * dest, int diff, const SymTab::Indexer & indexer, const TypeEnvironment & env ) { 79 std::cerr << "convert to reference cost..." << std::endl;79 // std::cerr << "convert to reference cost..." << std::endl; 80 80 if ( diff > 0 ) { 81 81 // TODO: document this … … 92 92 ReferenceType * destAsRef = dynamic_cast< ReferenceType * >( dest ); 93 93 if ( srcAsRef && destAsRef ) { // pointer-like conversions between references 94 std::cerr << "converting between references" << std::endl;94 // std::cerr << "converting between references" << std::endl; 95 95 if ( srcAsRef->get_base()->get_qualifiers() <= destAsRef->get_base()->get_qualifiers() && typesCompatibleIgnoreQualifiers( srcAsRef->get_base(), destAsRef->get_base(), indexer, env ) ) { 96 96 return Cost::safe; … … 104 104 } // if 105 105 } else { 106 std::cerr << "reference to rvalue conversion" << std::endl;106 // std::cerr << "reference to rvalue conversion" << std::endl; 107 107 ConversionCost converter( dest, indexer, env ); 108 108 src->accept( converter ); … … 113 113 assert( diff == -1 && destAsRef ); 114 114 if ( typesCompatibleIgnoreQualifiers( src, destAsRef->get_base(), indexer, env ) ) { 115 std::cerr << "converting compatible base type" << std::endl;115 // std::cerr << "converting compatible base type" << std::endl; 116 116 if ( src->get_lvalue() ) { 117 std::cerr << "lvalue to reference conversion" << std::endl;117 // std::cerr << "lvalue to reference conversion" << std::endl; 118 118 // lvalue-to-reference conversion: cv lvalue T => cv T & 119 119 if ( src->get_qualifiers() == destAsRef->get_base()->get_qualifiers() ) { … … 125 125 } // if 126 126 } else if ( destAsRef->get_base()->get_const() ) { 127 std::cerr << "rvalue to const ref conversion" << std::endl;127 // std::cerr << "rvalue to const ref conversion" << std::endl; 128 128 // rvalue-to-const-reference conversion: T => const T & 129 129 return Cost::safe; … … 134 134 } // if 135 135 } // if 136 std::cerr << "attempting to convert from incompatible base type -- fail" << std::endl;136 // std::cerr << "attempting to convert from incompatible base type -- fail" << std::endl; 137 137 } 138 138 return Cost::infinity;
Note: See TracChangeset
for help on using the changeset viewer.