Ignore:
Timestamp:
Apr 3, 2017, 2:29:11 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
bbc9b64
Parents:
8396044 (diff), 7444113 (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' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/PtrsCastable.cc

    r8396044 r6f71276  
    6868                return 1;
    6969        }
     70        int functionCast( Type *src, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
     71                return -1 * objectCast( src, env, indexer );  // reverse the sense of objectCast
     72        }
    7073
    7174        int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
     
    106109
    107110        void PtrsCastable::visit(FunctionType *functionType) {
    108                 result = -1;
     111                // result = -1;
     112                result = functionCast( dest, env, indexer );
    109113        }
    110114
     
    136140
    137141        void PtrsCastable::visit(TypeInstType *inst) {
    138                 result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1;
     142                //result = objectCast( inst, env, indexer ) > 0 && objectCast( dest, env, indexer ) > 0 ? 1 : -1;
     143                result = objectCast( inst, env, indexer ) == objectCast( dest, env, indexer ) ? 1 : -1;
    139144        }
    140145
Note: See TracChangeset for help on using the changeset viewer.