Changeset e3e16bc for src/SymTab/Autogen.cc
- Timestamp:
- Sep 13, 2017, 2:34:55 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:
- 982832e
- Parents:
- 9f5ecf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Autogen.cc
r9f5ecf5 re3e16bc 18 18 #include <cstddef> // for NULL 19 19 #include <algorithm> // for count_if 20 #include <cassert> // for s afe_dynamic_cast, assert, assertf20 #include <cassert> // for strict_dynamic_cast, assert, assertf 21 21 #include <iterator> // for back_insert_iterator, back_inserter 22 22 #include <list> // for list, _List_iterator, list<>::iter... … … 250 250 // parameters) are using in the variable exprs 251 251 assert( ftype->get_parameters().size() == 2 ); 252 ObjectDecl * dstParam = s afe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().front() );253 ObjectDecl * srcParam = s afe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().back() );252 ObjectDecl * dstParam = strict_dynamic_cast< ObjectDecl * >( ftype->get_parameters().front() ); 253 ObjectDecl * srcParam = strict_dynamic_cast< ObjectDecl * >( ftype->get_parameters().back() ); 254 254 255 255 VariableExpr * assignVarExpr = new VariableExpr( assignDecl ); … … 307 307 308 308 // assign to destination 309 Expression *dstselect = new MemberExpr( field, new CastExpr( new VariableExpr( dstParam ), s afe_dynamic_cast< ReferenceType* >( dstParam->get_type() )->get_base()->clone() ) );309 Expression *dstselect = new MemberExpr( field, new CastExpr( new VariableExpr( dstParam ), strict_dynamic_cast< ReferenceType* >( dstParam->get_type() )->get_base()->clone() ) ); 310 310 genImplicitCall( srcParam, dstselect, func->get_name(), back_inserter( func->get_statements()->get_kids() ), field, forward ); 311 311 } … … 436 436 FunctionType * assignType = dcl->get_functionType(); 437 437 assert( assignType->get_parameters().size() == 2 ); 438 ObjectDecl * srcParam = s afe_dynamic_cast< ObjectDecl * >( assignType->get_parameters().back() );438 ObjectDecl * srcParam = strict_dynamic_cast< ObjectDecl * >( assignType->get_parameters().back() ); 439 439 dcl->get_statements()->get_kids().push_back( new ReturnStmt( noLabels, new VariableExpr( srcParam ) ) ); 440 440 } … … 487 487 FunctionType * ftype = funcDecl->get_functionType(); 488 488 assert( ftype->get_parameters().size() == 2 ); 489 ObjectDecl * dstParam = s afe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().front() );490 ObjectDecl * srcParam = s afe_dynamic_cast< ObjectDecl * >( ftype->get_parameters().back() );489 ObjectDecl * dstParam = strict_dynamic_cast< ObjectDecl * >( ftype->get_parameters().front() ); 490 ObjectDecl * srcParam = strict_dynamic_cast< ObjectDecl * >( ftype->get_parameters().back() ); 491 491 492 492 makeUnionFieldsAssignment( srcParam, dstParam, back_inserter( funcDecl->get_statements()->get_kids() ) ); … … 700 700 701 701 Type * AutogenTupleRoutines::mutate( TupleType * tupleType ) { 702 tupleType = s afe_dynamic_cast< TupleType * >( Parent::mutate( tupleType ) );702 tupleType = strict_dynamic_cast< TupleType * >( Parent::mutate( tupleType ) ); 703 703 std::string mangleName = SymTab::Mangler::mangleType( tupleType ); 704 704 if ( seenTuples.find( mangleName ) != seenTuples.end() ) return tupleType; … … 768 768 CompoundStmt * AutogenTupleRoutines::mutate( CompoundStmt *compoundStmt ) { 769 769 seenTuples.beginScope(); 770 compoundStmt = s afe_dynamic_cast< CompoundStmt * >( Parent::mutate( compoundStmt ) );770 compoundStmt = strict_dynamic_cast< CompoundStmt * >( Parent::mutate( compoundStmt ) ); 771 771 seenTuples.endScope(); 772 772 return compoundStmt;
Note: See TracChangeset
for help on using the changeset viewer.