Changeset bd06384 for src/ResolvExpr


Ignore:
Timestamp:
Mar 22, 2018, 4:49:53 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
dbc2c2c
Parents:
7e4b44db
Message:

Add static roots to GC; fix some static GC_Objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r7e4b44db rbd06384  
    219219                assertf( expr, "expected a non-null expression." );
    220220
    221                 static CastExpr untyped( nullptr ); // cast to void
     221                auto untyped = new CastExpr{ expr }; // cast to void
    222222
    223223                // set up and resolve expression cast to void
    224                 untyped.arg = expr;
    225224                Alternative choice;
    226                 findUnfinishedKindExpression( &untyped, choice, indexer, "", standardAlternativeFilter, true );
     225                findUnfinishedKindExpression( untyped, choice, indexer, "", standardAlternativeFilter, true );
    227226                CastExpr * castExpr = strict_dynamic_cast< CastExpr * >( choice.expr );
    228227                env = std::move( choice.env );
    229228
    230229                // clean up resolved expression
    231                 Expression * ret = castExpr->arg;
    232                 castExpr->arg = nullptr;
    233 
    234                 // unlink the arg so that it isn't deleted twice at the end of the program
    235                 untyped.arg = nullptr;
    236                 return ret;
     230                return castExpr->arg;
    237231        }
    238232
Note: See TracChangeset for help on using the changeset viewer.