Changes in / [8e9d567:133a161]


Ignore:
Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r8e9d567 r133a161  
    167167                        LinkageSpec::Spec( node->linkage.val ),
    168168                        bfwd,
    169                         type->clone(),
     169                        type,
    170170                        init,
    171171                        attr,
  • src/AST/Print.cpp

    r8e9d567 r133a161  
    237237        void postprint( const ast::Expr * node ) {
    238238                print( node->inferred );
    239 
    240                 if ( node->result ) {
    241                         os << endl << indent << "... with resolved type:" << endl;
    242                         ++indent;
    243                         os << indent;
    244                         node->result->accept( *this );
    245                         --indent;
    246                 }
    247239
    248240                if ( node->env ) {
  • src/AST/TypeSubstitution.hpp

    r8e9d567 r133a161  
    195195        assert( input );
    196196        Pass<Substituter> sub( *this, true );
    197         input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     197        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    198198        return { input, sub.core.subCount };
    199199}
  • src/ResolvExpr/CandidateFinder.cpp

    r8e9d567 r133a161  
    14731473                                        // unification run for side-effects
    14741474                                        unify( toType, cand->expr->result, env, need, have, open, symtab );
    1475                                         Cost thisCost = computeConversionCost( cand->expr->result, toType, cand->expr->get_lvalue(),
     1475                                        Cost thisCost = castCost( cand->expr->result, toType, cand->expr->get_lvalue(),
    14761476                                                        symtab, env );
    14771477
     
    14831483                                                                initExpr->location, restructureCast( cand->expr, toType ),
    14841484                                                                initAlt.designation },
    1485                                                         move(env), move( open ), move( need ), cand->cost, thisCost );
     1485                                                        copy( cand->env ), move( open ), move( need ), cand->cost, thisCost );
    14861486                                                inferParameters( newCand, matches );
    14871487                                        }
  • src/ResolvExpr/Unify.cc

    r8e9d567 r133a161  
    791791                        for ( const ast::DeclWithType * d : src ) {
    792792                                ast::Pass<TtypeExpander_new> expander{ env };
    793                                 // TtypeExpander pass is impure (may mutate nodes in place)
    794                                 // need to make nodes shared to prevent accidental mutation
    795                                 ast::ptr<ast::DeclWithType> dc = d;
    796                                 dc = dc->accept( expander );
    797                                 auto types = flatten( dc->get_type() );
     793                                d = d->accept( expander );
     794                                auto types = flatten( d->get_type() );
    798795                                for ( ast::ptr< ast::Type > & t : types ) {
    799796                                        // outermost const, volatile, _Atomic qualifiers in parameters should not play
     
    804801                                        // requirements than a non-mutex function
    805802                                        remove_qualifiers( t, ast::CV::Const | ast::CV::Volatile | ast::CV::Atomic );
    806                                         dst.emplace_back( new ast::ObjectDecl{ dc->location, "", t } );
     803                                        dst.emplace_back( new ast::ObjectDecl{ d->location, "", t } );
    807804                                }
    808805                        }
     
    11131110
    11141111                        ast::Pass<TtypeExpander_new> expander{ tenv };
    1115 
    1116                         ast::ptr<ast::TupleType> tuplec = tuple;
    1117                         ast::ptr<ast::TupleType> tuple2c = tuple2;
    1118                         const ast::Type * flat = tuplec->accept( expander );
    1119                         const ast::Type * flat2 = tuple2c->accept( expander );
     1112                        const ast::Type * flat = tuple->accept( expander );
     1113                        const ast::Type * flat2 = tuple2->accept( expander );
    11201114
    11211115                        auto types = flatten( flat );
  • src/SynTree/Expression.cc

    r8e9d567 r133a161  
    6969void Expression::print( std::ostream & os, Indenter indent ) const {
    7070        printInferParams( inferParams, os, indent+1, 0 );
    71 
    72         if ( result ) {
    73                 os << std::endl << indent << "with resolved type:" << std::endl;
    74                 os << (indent+1);
    75                 result->print( os, indent+1 );
    76         }
    7771
    7872        if ( env ) {
  • src/Tuples/Explode.cc

    r8e9d567 r133a161  
    161161                        castAdded = false;
    162162                        const ast::Type * newType = getReferenceBase( newNode->result );
    163                         return new ast::CastExpr{ newNode->location, newNode, newType };
     163                        return new ast::CastExpr{ newNode->location, node, newType };
    164164                }
    165165                return newNode;
Note: See TracChangeset for help on using the changeset viewer.