Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    rae265b55 r665f432  
    99// Author           : Thierry Delisle
    1010// Created On       : Thu May 09 15::37::05 2019
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Jun 17 16:44:00 2019
    13 // Update Count     : 12
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Thu Jul 25 22:21:46 2019
     13// Update Count     : 13
    1414//
    1515
     
    608608
    609609                tgt->result = get<Type>().accept1(src->result);
    610                 // Unconditionally use a clone of the result type.
    611                 // We know this will leak some objects: much of the immediate conversion result.
    612                 // In some cases, using the conversion result directly gives unintended object sharing.
    613                 // A parameter (ObjectDecl, a child of a FunctionType) is shared by the weak-ref cache.
    614                 // But tgt->result must be fully owned privately by tgt.
    615                 // Applying these conservative copies here means
    616                 // - weak references point at the declaration's copy, not these expr.result copies (good)
    617                 // - we copy more objects than really needed (bad, tolerated)
    618                 if (tgt->result) {
    619                         tgt->result = tgt->result->clone();
    620                 }
    621610                return visitBaseExpr_skipResultType(src, tgt);
    622611        }
     
    898887                auto expr = visitBaseExpr( node,
    899888                        new AsmExpr(
    900                                 get<Expression>().accept1(node->inout),
     889                                new std::string(node->inout),
    901890                                get<Expression>().accept1(node->constraint),
    902891                                get<Expression>().accept1(node->operand)
     
    21242113                                old->location,
    21252114                                GET_ACCEPT_1(member, DeclWithType),
    2126                                 GET_ACCEPT_1(aggregate, Expr),
    2127                                 ast::MemberExpr::NoOpConstructionChosen
     2115                                GET_ACCEPT_1(aggregate, Expr)
    21282116                        )
    21292117                );
     
    22702258                        new ast::AsmExpr(
    22712259                                old->location,
    2272                                 GET_ACCEPT_1(inout, Expr),
     2260                                old->inout,
    22732261                                GET_ACCEPT_1(constraint, Expr),
    22742262                                GET_ACCEPT_1(operand, Expr)
     
    26882676                );
    26892677        }
    2690 
    2691         virtual void visit( const AttrExpr * ) override final {
    2692                 assertf( false, "AttrExpr deprecated in new AST." );
    2693         }
    26942678};
    26952679
Note: See TracChangeset for help on using the changeset viewer.