Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/Resolver.cc

    r3b9c674 r8fd52e90  
    8484                void previsit( ThrowStmt * throwStmt );
    8585                void previsit( CatchStmt * catchStmt );
    86                 void postvisit( CatchStmt * catchStmt );
    8786                void previsit( WaitForStmt * stmt );
    8887
     
    486485                visit_children = false;
    487486                findVoidExpression( asmExpr->operand, indexer );
     487                if ( asmExpr->get_inout() ) {
     488                        findVoidExpression( asmExpr->inout, indexer );
     489                } // if
    488490        }
    489491
     
    568570
    569571        void Resolver_old::previsit( CatchStmt * catchStmt ) {
    570                 // Until we are very sure this invarent (ifs that move between passes have thenPart)
    571                 // holds, check it. This allows a check for when to decode the mangling.
    572                 if ( IfStmt * ifStmt = dynamic_cast<IfStmt *>( catchStmt->body ) ) {
    573                         assert( ifStmt->thenPart );
    574                 }
    575                 // Encode the catchStmt so the condition can see the declaration.
    576572                if ( catchStmt->cond ) {
    577                         IfStmt * ifStmt = new IfStmt( catchStmt->cond, nullptr, catchStmt->body );
    578                         catchStmt->cond = nullptr;
    579                         catchStmt->body = ifStmt;
    580                 }
    581         }
    582 
    583         void Resolver_old::postvisit( CatchStmt * catchStmt ) {
    584                 // Decode the catchStmt so everything is stored properly.
    585                 IfStmt * ifStmt = dynamic_cast<IfStmt *>( catchStmt->body );
    586                 if ( nullptr != ifStmt && nullptr == ifStmt->thenPart ) {
    587                         assert( ifStmt->condition );
    588                         assert( ifStmt->elsePart );
    589                         catchStmt->cond = ifStmt->condition;
    590                         catchStmt->body = ifStmt->elsePart;
    591                         ifStmt->condition = nullptr;
    592                         ifStmt->elsePart = nullptr;
    593                         delete ifStmt;
     573                        findSingleExpression( catchStmt->cond, new BasicType( noQualifiers, BasicType::Bool ), indexer );
    594574                }
    595575        }
     
    13861366                        asmExpr, &ast::AsmExpr::operand, findVoidExpression( asmExpr->operand, symtab ) );
    13871367
     1368                if ( asmExpr->inout ) {
     1369                        asmExpr = ast::mutate_field(
     1370                                asmExpr, &ast::AsmExpr::inout, findVoidExpression( asmExpr->inout, symtab ) );
     1371                }
     1372
    13881373                return asmExpr;
    13891374        }
     
    14891474
    14901475        const ast::CatchStmt * Resolver_new::previsit( const ast::CatchStmt * catchStmt ) {
    1491                 // TODO: This will need a fix for the decl/cond scoping problem.
    14921476                if ( catchStmt->cond ) {
    14931477                        ast::ptr< ast::Type > boolType = new ast::BasicType{ ast::BasicType::Bool };
Note: See TracChangeset for help on using the changeset viewer.