Ignore:
Timestamp:
Jun 15, 2018, 5:09:29 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env
Children:
97397a26
Parents:
1d7b0a8
Message:

Start of new environment implementation; terribly broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/PtrsCastable.cc

    r1d7b0a8 r982f95d  
    1515
    1616#include "Common/PassVisitor.h"
    17 #include "ResolvExpr/TypeEnvironment.h"  // for EqvClass, TypeEnvironment
     17#include "ResolvExpr/TypeEnvironment.h"  // for ClassRef, TypeEnvironment
    1818#include "SymTab/Indexer.h"              // for Indexer
    1919#include "SynTree/Declaration.h"         // for TypeDecl, TypeDecl::Kind::Ftype
     
    6363                                                } // if
    6464                                        } //if
    65                                 } else if ( const EqvClass *eqvClass = env.lookup( typeInst->get_name() ) ) {
    66                                         if ( eqvClass->data.kind == TypeDecl::Ftype ) {
     65                                } else if ( ClassRef eqvClass = env.lookup( typeInst->get_name() ) ) {
     66                                        if ( eqvClass.get_bound().data.kind == TypeDecl::Ftype ) {
    6767                                                return -1;
    6868                                        } // if
     
    7878        int ptrsCastable( Type *src, Type *dest, const TypeEnvironment &env, const SymTab::Indexer &indexer ) {
    7979                if ( TypeInstType *destAsTypeInst = dynamic_cast< TypeInstType* >( dest ) ) {
    80                         if ( const EqvClass *eqvClass = env.lookup( destAsTypeInst->get_name() ) ) {
     80                        if ( ClassRef eqvClass = env.lookup( destAsTypeInst->get_name() ) ) {
    8181                                // xxx - should this be ptrsCastable?
    82                                 return ptrsAssignable( src, eqvClass->type, env );
     82                                return ptrsAssignable( src, eqvClass.get_bound().type, env );
    8383                        } // if
    8484                } // if
Note: See TracChangeset for help on using the changeset viewer.