Changeset 2f42718 for src/Tuples


Ignore:
Timestamp:
Feb 22, 2019, 10:43:29 AM (7 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
no_list
Parents:
43e0949
Message:

Parameters and return value of functions are now vectors (and some related clean-up)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    r43e0949 r2f42718  
    217217                StructDecl * decl = typeMap[tupleSize];
    218218                StructInstType * newType = new StructInstType( qualifiers, decl );
    219                 for ( auto p : group_iterate( tupleType->get_types(), decl->get_parameters() ) ) {
     219                for ( auto p : group_iterate( tupleType->types, decl->get_parameters() ) ) {
    220220                        Type * t = std::get<0>(p);
    221221                        newType->get_parameters().push_back( new TypeExpr( t->clone() ) );
     
    298298        Type * makeTupleType( const std::list< Expression * > & exprs ) {
    299299                // produce the TupleType which aggregates the types of the exprs
    300                 std::list< Type * > types;
     300                std::vector< Type * > types;
     301                types.reserve(exprs.size());
    301302                Type::Qualifiers qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Lvalue | Type::Atomic | Type::Mutex );
    302303                for ( Expression * expr : exprs ) {
Note: See TracChangeset for help on using the changeset viewer.