Ignore:
Timestamp:
May 17, 2018, 4:22:05 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, with_gc
Children:
d20a343
Parents:
d01811a
Message:

Minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleExpansion.cc

    rd01811a r4f68f6d  
    227227
    228228        Expression * TupleIndexExpander::postmutate( TupleIndexExpr * tupleExpr ) {
    229                 Expression * tuple = tupleExpr->get_tuple();
     229                Expression * tuple = tupleExpr->tuple;
    230230                assert( tuple );
    231                 tupleExpr->set_tuple( nullptr );
    232                 unsigned int idx = tupleExpr->get_index();
    233                 TypeSubstitution * env = tupleExpr->get_env();
    234                 tupleExpr->set_env( nullptr );
     231                tupleExpr->tuple = nullptr;
     232                unsigned int idx = tupleExpr->index;
     233                TypeSubstitution * env = tupleExpr->env;
     234                tupleExpr->env = nullptr;
    235235                delete tupleExpr;
    236236
    237                 StructInstType * type = strict_dynamic_cast< StructInstType * >( tuple->get_result() );
    238                 StructDecl * structDecl = type->get_baseStruct();
    239                 assert( structDecl->get_members().size() > idx );
    240                 Declaration * member = *std::next(structDecl->get_members().begin(), idx);
     237                StructInstType * type = strict_dynamic_cast< StructInstType * >( tuple->result );
     238                StructDecl * structDecl = type->baseStruct;
     239                assert( structDecl->members.size() > idx );
     240                Declaration * member = *std::next(structDecl->members.begin(), idx);
    241241                MemberExpr * memExpr = new MemberExpr( strict_dynamic_cast< DeclarationWithType * >( member ), tuple );
    242                 memExpr->set_env( env );
     242                memExpr->env = env;
    243243                return memExpr;
    244244        }
Note: See TracChangeset for help on using the changeset viewer.