Ignore:
Timestamp:
Jul 13, 2017, 2:27:58 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
65cec25
Parents:
0a81c3f
Message:

Add conversion & cast cost for reference conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r0a81c3f r2463d0e  
    5454                } else if ( dynamic_cast< VoidType* >( dest ) ) {
    5555                        return Cost( 0, 0, 1 );
     56                } else if ( ReferenceType * refType = dynamic_cast< ReferenceType * > ( dest ) ) {
     57                        return convertToReferenceCost( src, refType, indexer, env );
    5658                } else {
    5759                        CastCost converter( dest, indexer, env );
     
    7678                        cost = Cost( 1, 0, 0 );
    7779                } else {
    78                         ConversionCost::visit( basicType );
     80                        cost = conversionCost( basicType, dest, indexer, env );
    7981                } // if
    8082        }
Note: See TracChangeset for help on using the changeset viewer.