Ignore:
Timestamp:
Oct 7, 2015, 12:42:10 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, string, with_gc
Children:
0800284, 50eac1b
Parents:
59cde21 (diff), 1521de2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into override-autogen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r59cde21 rf28a53a  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 06:57:43 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun May 17 06:59:10 2015
    13 // Update Count     : 2
     11// Last Modified By : Rob Schluntz
     12// Last Modified On : Mon Oct 05 14:48:45 2015
     13// Update Count     : 5
    1414//
    1515
     
    5656                                return Cost::infinity;
    5757                        } else {
     58                                // xxx - why are we adding cost 0 here?
    5859                                return converter.get_cost() + Cost( 0, 0, 0 );
    5960                        } // if
     
    8283                                newEnv.add( pointerType->get_forall() );
    8384                                newEnv.add( pointerType->get_base()->get_forall() );
    84                                 int assignResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
    85                                 if ( assignResult > 0 ) {
     85                                int castResult = ptrsCastable( pointerType->get_base(), destAsPtr->get_base(), newEnv, indexer );
     86                                if ( castResult > 0 ) {
    8687                                        cost = Cost( 0, 0, 1 );
    87                                 } else if ( assignResult < 0 ) {
     88                                } else if ( castResult < 0 ) {
    8889                                        cost = Cost( 1, 0, 0 );
    8990                                } // if
Note: See TracChangeset for help on using the changeset viewer.