Changeset c935c3a for src/InitTweak/FixInit.cc
- Timestamp:
- Sep 13, 2017, 3:03:32 PM (7 years ago)
- 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:
- ed235b6
- Parents:
- b2e2e34 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
rb2e2e34 rc935c3a 17 17 #include <stddef.h> // for NULL 18 18 #include <algorithm> // for set_difference, copy_if 19 #include <cassert> // for assert, s afe_dynamic_cast19 #include <cassert> // for assert, strict_dynamic_cast 20 20 #include <iostream> // for operator<<, ostream, basic_ost... 21 21 #include <iterator> // for insert_iterator, back_inserter … … 424 424 // arrays are not copy constructed, so this should always be an ExprStmt 425 425 ImplicitCtorDtorStmt * stmt = genCtorDtor( fname, var, cpArg ); 426 ExprStmt * exprStmt = s afe_dynamic_cast< ExprStmt * >( stmt->get_callStmt() );426 ExprStmt * exprStmt = strict_dynamic_cast< ExprStmt * >( stmt->get_callStmt() ); 427 427 Expression * untyped = exprStmt->get_expr(); 428 428 … … 532 532 assert( ! body->get_kids().empty() ); 533 533 // must be an ExprStmt, otherwise it wouldn't have a result 534 ExprStmt * last = s afe_dynamic_cast< ExprStmt * >( body->get_kids().back() );534 ExprStmt * last = strict_dynamic_cast< ExprStmt * >( body->get_kids().back() ); 535 535 last->set_expr( makeCtorDtor( "?{}", ret, last->get_expr() ) ); 536 536 … … 566 566 CP_CTOR_PRINT( std::cerr << "FixCopyCtors: " << impCpCtorExpr << std::endl; ) 567 567 568 impCpCtorExpr = s afe_dynamic_cast< ImplicitCopyCtorExpr * >( Parent::mutate( impCpCtorExpr ) );568 impCpCtorExpr = strict_dynamic_cast< ImplicitCopyCtorExpr * >( Parent::mutate( impCpCtorExpr ) ); 569 569 std::list< ObjectDecl * > & tempDecls = impCpCtorExpr->get_tempDecls(); 570 570 std::list< ObjectDecl * > & returnDecls = impCpCtorExpr->get_returnDecls(); … … 627 627 stmt = stmt->acceptMutator( *this ); 628 628 } // for 629 // stmtExpr = s afe_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) );629 // stmtExpr = strict_dynamic_cast< StmtExpr * >( Parent::mutate( stmtExpr ) ); 630 630 assert( stmtExpr->get_result() ); 631 631 Type * result = stmtExpr->get_result(); … … 791 791 } 792 792 } else { 793 ImplicitCtorDtorStmt * implicit = s afe_dynamic_cast< ImplicitCtorDtorStmt * > ( ctor );793 ImplicitCtorDtorStmt * implicit = strict_dynamic_cast< ImplicitCtorDtorStmt * > ( ctor ); 794 794 ExprStmt * ctorStmt = dynamic_cast< ExprStmt * >( implicit->get_callStmt() ); 795 795 ApplicationExpr * ctorCall = nullptr; … … 996 996 FunctionType * type = function->get_functionType(); 997 997 assert( ! type->get_parameters().empty() ); 998 thisParam = s afe_dynamic_cast< ObjectDecl * >( type->get_parameters().front() );998 thisParam = strict_dynamic_cast< ObjectDecl * >( type->get_parameters().front() ); 999 999 Type * thisType = getPointerBase( thisParam->get_type() ); 1000 1000 StructInstType * structType = dynamic_cast< StructInstType * >( thisType ); … … 1166 1166 1167 1167 Expression* MutatingResolver::mutate( UntypedExpr *untypedExpr ) { 1168 return s afe_dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untypedExpr, indexer ) );1168 return strict_dynamic_cast< ApplicationExpr * >( ResolvExpr::findVoidExpression( untypedExpr, indexer ) ); 1169 1169 } 1170 1170 … … 1179 1179 1180 1180 // xxx - this can be TupleAssignExpr now. Need to properly handle this case. 1181 ApplicationExpr * callExpr = s afe_dynamic_cast< ApplicationExpr * > ( ctorExpr->get_callExpr() );1181 ApplicationExpr * callExpr = strict_dynamic_cast< ApplicationExpr * > ( ctorExpr->get_callExpr() ); 1182 1182 TypeSubstitution * env = ctorExpr->get_env(); 1183 1183 ctorExpr->set_callExpr( nullptr );
Note: See TracChangeset
for help on using the changeset viewer.