Changeset 543159b for src/ResolvExpr
- Timestamp:
- Aug 13, 2015, 2:16:15 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, string, with_gc
- Children:
- 43ee2a8, adcdd2f
- Parents:
- a3a17ba
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CastCost.cc
ra3a17ba r543159b 66 66 67 67 void CastCost::visit( BasicType *basicType ) { 68 if ( dynamic_cast< PointerType* >( dest ) ) { 68 PointerType *destAsPointer = dynamic_cast< PointerType* >( dest ); 69 if ( destAsPointer && basicType->isInteger() ) { 69 70 cost = Cost( 1, 0, 0 ); 70 71 } else { … … 77 78 if ( pointerType->get_qualifiers() <= destAsPtr->get_qualifiers() && typesCompatibleIgnoreQualifiers( pointerType->get_base(), destAsPtr->get_base(), indexer, env ) ) { 78 79 cost = Cost( 0, 0, 1 ); 79 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {80 if ( destAsBasic->isInteger() ) {81 cost = Cost( 1, 0, 0 );82 } // if83 80 } else { 84 81 TypeEnvironment newEnv( env ); … … 92 89 } // if 93 90 } // if 94 } // if 91 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) { 92 if ( destAsBasic->isInteger() ) { 93 cost = Cost( 1, 0, 0 ); 94 } // if 95 } 95 96 } 96 97 } // namespace ResolvExpr
Note: See TracChangeset
for help on using the changeset viewer.