Ignore:
Timestamp:
Nov 13, 2023, 1:40:12 PM (11 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
6ea85b22
Parents:
25f2798
Message:

Removed forward declarations missed in the BaseSyntaxNode? removal. Removed code and modified names to support two versions of the ast.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CastCost.cc

    r25f2798 r0bd3faf  
    2626#include "ResolvExpr/ConversionCost.h"   // for conversionCost
    2727#include "ResolvExpr/PtrsCastable.hpp"   // for ptrsCastable
    28 #include "ResolvExpr/typeops.h"          // for ptrsCastable
    2928#include "ResolvExpr/Unify.h"            // for typesCompatibleIgnoreQualifiers
    3029
     
    3837
    3938namespace {
    40         struct CastCost_new : public ConversionCost_new {
    41                 using ConversionCost_new::previsit;
    42                 using ConversionCost_new::postvisit;
     39        struct CastCost : public ConversionCost {
     40                using ConversionCost::previsit;
     41                using ConversionCost::postvisit;
    4342
    44                 CastCost_new(
     43                CastCost(
    4544                        const ast::Type * dst, bool srcIsLvalue, const ast::SymbolTable & symtab,
    4645                        const ast::TypeEnvironment & env, CostCalculation costFunc )
    47                 : ConversionCost_new( dst, srcIsLvalue, symtab, env, costFunc ) {}
     46                : ConversionCost( dst, srcIsLvalue, symtab, env, costFunc ) {}
    4847
    4948                void postvisit( const ast::BasicType * basicType ) {
     
    8584        };
    8685
    87         #warning For overload resolution between the two versions.
    88         int localPtrsCastable(const ast::Type * t1, const ast::Type * t2,
    89                         const ast::SymbolTable & symtab, const ast::TypeEnvironment & env ) {
    90                 return ptrsCastable( t1, t2, symtab, env );
    91         }
    92         Cost localCastCost(
    93                 const ast::Type * src, const ast::Type * dst, bool srcIsLvalue,
    94                 const ast::SymbolTable & symtab, const ast::TypeEnvironment & env
    95         ) { return castCost( src, dst, srcIsLvalue, symtab, env ); }
    9686} // anonymous namespace
    9787
     
    136126        } else if ( auto refType = dynamic_cast< const ast::ReferenceType * >( dst ) ) {
    137127                PRINT( std::cerr << "conversionCost: dest is reference" << std::endl; )
    138                 #warning cast on ptrsCastable artifact of having two functions, remove when port done
    139128                return convertToReferenceCost(
    140                         src, refType, srcIsLvalue, symtab, env, localPtrsCastable );
     129                        src, refType, srcIsLvalue, symtab, env, ptrsCastable );
    141130        } else {
    142                 #warning cast on castCost artifact of having two functions, remove when port done
    143                 ast::Pass< CastCost_new > converter(
    144                         dst, srcIsLvalue, symtab, env, localCastCost );
     131                ast::Pass< CastCost > converter(
     132                        dst, srcIsLvalue, symtab, env, castCost );
    145133                src->accept( converter );
    146134                return converter.core.cost;
Note: See TracChangeset for help on using the changeset viewer.