Ignore:
Timestamp:
Sep 22, 2016, 8:14:56 AM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
ac9ca96
Parents:
1132b62
git-author:
Rob Schluntz <rschlunt@…> (09/21/16 23:43:37)
git-committer:
Rob Schluntz <rschlunt@…> (09/22/16 08:14:56)
Message:

replace multiple-returning functions with tuple-returning functions, implement tuple ctor/dtor, allow N-arg tuple assignment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/TupleExpr.cc

    r1132b62 r65660bd  
    8888
    8989TupleAssignExpr::TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname ) : Expression( _aname ), assigns( assigns ), tempDecls( tempDecls ) {
    90         TupleType * type = new TupleType( Type::Qualifiers() );
    91         for ( Expression * expr : assigns ) {
    92                 assert( expr->has_result() );
    93                 type->get_types().push_back( expr->get_result()->clone() );
    94         }
    95         set_result( type );
     90        set_result( Tuples::makeTupleType( assigns ) );
    9691}
    9792
Note: See TracChangeset for help on using the changeset viewer.