Changeset 60aaa51d for src/AST/Convert.cpp
- Timestamp:
- Jun 7, 2019, 4:14:48 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 05d55ff
- Parents:
- 5684736
- git-author:
- Aaron Moss <a3moss@…> (06/07/19 16:14:40)
- git-committer:
- Aaron Moss <a3moss@…> (06/07/19 16:14:48)
- File:
-
- 1 edited
-
src/AST/Convert.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r5684736 r60aaa51d 16 16 #include "Convert.hpp" 17 17 18 #include <deque> 18 19 #include <unordered_map> 19 20 … … 575 576 576 577 if ( srcInferred.mode == ast::Expr::InferUnion::Params ) { 577 const ast::InferredParams &srcParams = srcInferred.inferParams Const();578 const ast::InferredParams &srcParams = srcInferred.inferParams(); 578 579 for (auto srcParam : srcParams) { 579 580 tgtInferParams[srcParam.first] = ParamEntry( … … 585 586 } 586 587 } else if ( srcInferred.mode == ast::Expr::InferUnion::Slots ) { 587 const ast::ResnSlots &srcSlots = srcInferred.resnSlots Const();588 const ast::ResnSlots &srcSlots = srcInferred.resnSlots(); 588 589 for (auto srcSlot : srcSlots) { 589 590 tgtResnSlots.push_back(srcSlot); … … 1413 1414 # define GET_ACCEPT_V(child, type) \ 1414 1415 getAcceptV< ast::type, decltype( old->child ) >( old->child ) 1416 1417 template<typename NewT, typename OldC> 1418 std::deque< ast::ptr<NewT> > getAcceptD( OldC& old ) { 1419 std::deque< ast::ptr<NewT> > ret; 1420 for ( auto a : old ) { 1421 a->accept( *this ); 1422 ret.emplace_back( strict_dynamic_cast< NewT * >(node) ); 1423 node = nullptr; 1424 } 1425 return ret; 1426 } 1427 1428 # define GET_ACCEPT_D(child, type) \ 1429 getAcceptD< ast::type, decltype( old->child ) >( old->child ) 1415 1430 1416 1431 ast::Label make_label(Label* old) { … … 2449 2464 2450 2465 virtual void visit( UntypedInitExpr * old ) override final { 2451 std:: vector<ast::InitAlternative> initAlts;2466 std::deque<ast::InitAlternative> initAlts; 2452 2467 for (auto ia : old->initAlts) { 2453 2468 initAlts.push_back(ast::InitAlternative( … … 2714 2729 this->node = new ast::Designation( 2715 2730 old->location, 2716 GET_ACCEPT_ V(designators, Expr)2731 GET_ACCEPT_D(designators, Expr) 2717 2732 ); 2718 2733 }
Note:
See TracChangeset
for help on using the changeset viewer.