Ignore:
Timestamp:
Sep 13, 2017, 3:11:24 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, 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, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
c57ded70, db70fe4
Parents:
d130fe8 (diff), 982832e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    rd130fe8 rba54f7d  
    1717#include <stddef.h>                    // for NULL
    1818#include <algorithm>                   // for set_difference, copy_if
    19 #include <cassert>                     // for assert, safe_dynamic_cast
     19#include <cassert>                     // for assert, strict_dynamic_cast
    2020#include <iostream>                    // for operator<<, ostream, basic_ost...
    2121#include <iterator>                    // for insert_iterator, back_inserter
     
    424424                        // arrays are not copy constructed, so this should always be an ExprStmt
    425425                        ImplicitCtorDtorStmt * stmt = genCtorDtor( fname, var, cpArg );
    426                         ExprStmt * exprStmt = safe_dynamic_cast< ExprStmt * >( stmt->get_callStmt() );
     426                        ExprStmt * exprStmt = strict_dynamic_cast< ExprStmt * >( stmt->get_callStmt() );
    427427                        Expression * untyped = exprStmt->get_expr();
    428428
     
    532532                                assert( ! body->get_kids().empty() );
    533533                                // must be an ExprStmt, otherwise it wouldn't have a result
    534                                 ExprStmt * last = safe_dynamic_cast< ExprStmt * >( body->get_kids().back() );
     534                                ExprStmt * last = strict_dynamic_cast< ExprStmt * >( body->get_kids().back() );
    535535                                last->set_expr( makeCtorDtor( "?{}", ret, last->get_expr() ) );
    536536
     
    566566                        CP_CTOR_PRINT( std::cerr << "FixCopyCtors: " << impCpCtorExpr << std::endl; )
    567567
    568                         impCpCtorExpr = safe_dynamic_cast< ImplicitCopyCtorExpr * >( Parent::mutate( impCpCtorExpr ) );
     568                        impCpCtorExpr = strict_dynamic_cast< ImplicitCopyCtorExpr * >( Parent::mutate( impCpCtorExpr ) );
    569569                        std::list< ObjectDecl * > & tempDecls = impCpCtorExpr->get_tempDecls();
    570570                        std::list< ObjectDecl * > & returnDecls = impCpCtorExpr->get_returnDecls();
     
    627627                                stmt = stmt->acceptMutator( *this );
    628628                        } // for
    629                         // stmtExpr = safe_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) );
     629                        // stmtExpr = strict_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) );
    630630                        assert( stmtExpr->get_result() );
    631631                        Type * result = stmtExpr->get_result();
     
    791791                                                }
    792792                                        } else {
    793                                                 ImplicitCtorDtorStmt * implicit = safe_dynamic_cast< ImplicitCtorDtorStmt * > ( ctor );
     793                                                ImplicitCtorDtorStmt * implicit = strict_dynamic_cast< ImplicitCtorDtorStmt * > ( ctor );
    794794                                                ExprStmt * ctorStmt = dynamic_cast< ExprStmt * >( implicit->get_callStmt() );
    795795                                                ApplicationExpr * ctorCall = nullptr;
     
    996996                                FunctionType * type = function->get_functionType();
    997997                                assert( ! type->get_parameters().empty() );
    998                                 thisParam = safe_dynamic_cast< ObjectDecl * >( type->get_parameters().front() );
     998                                thisParam = strict_dynamic_cast< ObjectDecl * >( type->get_parameters().front() );
    999999                                Type * thisType = getPointerBase( thisParam->get_type() );
    10001000                                StructInstType * structType = dynamic_cast< StructInstType * >( thisType );
     
    11661166
    11671167                Expression* MutatingResolver::mutate( UntypedExpr *untypedExpr ) {
    1168                         return safe_dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untypedExpr, indexer ) );
     1168                        return strict_dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untypedExpr, indexer ) );
    11691169                }
    11701170
     
    11791179
    11801180                        // xxx - this can be TupleAssignExpr now. Need to properly handle this case.
    1181                         ApplicationExpr * callExpr = safe_dynamic_cast< ApplicationExpr * > ( ctorExpr->get_callExpr() );
     1181                        ApplicationExpr * callExpr = strict_dynamic_cast< ApplicationExpr * > ( ctorExpr->get_callExpr() );
    11821182                        TypeSubstitution * env = ctorExpr->get_env();
    11831183                        ctorExpr->set_callExpr( nullptr );
Note: See TracChangeset for help on using the changeset viewer.