Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r46da46b r251ce80  
    1313// Update Count     : 9
    1414//
     15
     16#include "CastCost.hpp"
    1517
    1618#include <cassert>                       // for assert
     
    2224#include "ConversionCost.h"              // for ConversionCost
    2325#include "Cost.h"                        // for Cost, Cost::infinity
     26#include "ResolvExpr/ConversionCost.h"   // for conversionCost
     27#include "ResolvExpr/PtrsCastable.hpp"   // for ptrsCastable
    2428#include "ResolvExpr/TypeEnvironment.h"  // for TypeEnvironment, EqvClass
     29#include "ResolvExpr/typeops.h"          // for ptrsCastable
     30#include "ResolvExpr/Unify.h"            // for typesCompatibleIgnoreQualifiers
    2531#include "SymTab/Indexer.h"              // for Indexer
    2632#include "SynTree/Declaration.h"         // for TypeDecl, NamedTypeDecl
    2733#include "SynTree/Type.h"                // for PointerType, Type, TypeInstType
    28 #include "typeops.h"                     // for typesCompatibleIgnoreQualifiers
    2934
    3035#if 0
     
    160165                                if (
    161166                                        pointerType->qualifiers <= ptr->qualifiers
    162                                         && typesCompatibleIgnoreQualifiers( pointerType->base, ptr->base, symtab, env )
     167                                        && typesCompatibleIgnoreQualifiers( pointerType->base, ptr->base, env )
    163168                                ) {
    164169                                        cost = Cost::safe;
     
    227232        )
    228233
    229         if ( typesCompatibleIgnoreQualifiers( src, dst, symtab, env ) ) {
     234        if ( typesCompatibleIgnoreQualifiers( src, dst, env ) ) {
    230235                PRINT( std::cerr << "compatible!" << std::endl; )
    231                 if (dynamic_cast<const ast::ZeroType *>(dst) || dynamic_cast<const ast::OneType *>(dst)) {
    232                         return Cost::spec;
    233                 }
    234236                return Cost::zero;
    235237        } else if ( dynamic_cast< const ast::VoidType * >( dst ) ) {
Note: See TracChangeset for help on using the changeset viewer.