Changeset eba615c
- Timestamp:
- May 28, 2019, 4:26:07 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 157a816, c786e1d, d76c588, ebc0a85
- Parents:
- c519942 (diff), 0d70e0d (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. - Location:
- src/AST
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
rc519942 reba615c 10 10 // Created On : Thu May 09 15::37::05 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T hu May 23 16:59:00 201913 // Update Count : 612 // Last Modified On : Tue May 28 12:00:00 2019 13 // Update Count : 7 14 14 // 15 15 … … 1341 1341 if ( ! old ) return nullptr; 1342 1342 old->accept(*this); 1343 return strict_dynamic_cast< NewT * >( node ); 1343 ast::Node * ret = node; 1344 node = nullptr; 1345 return strict_dynamic_cast< NewT * >( ret ); 1344 1346 } 1345 1347 … … 1354 1356 a->accept( *this ); 1355 1357 ret.emplace_back( strict_dynamic_cast< NewT * >(node) ); 1358 node = nullptr; 1356 1359 } 1357 1360 return ret; … … 1877 1880 GET_LABELS_V(old->labels) 1878 1881 ); 1882 cache.emplace( old, stmt ); 1883 stmt->callStmt = GET_ACCEPT_1(callStmt, Stmt); 1879 1884 this->node = stmt; 1880 cache.emplace( old, this->node );1881 stmt->callStmt = GET_ACCEPT_1(callStmt, Stmt);1882 1885 } 1883 1886 -
src/AST/Print.cpp
rc519942 reba615c 132 132 case ast::Expr::InferUnion::Empty: return; 133 133 case ast::Expr::InferUnion::Slots: { 134 os << indent << "with " << inferred.data.resnSlots.size() 134 os << indent << "with " << inferred.data.resnSlots.size() 135 135 << " pending inference slots" << endl; 136 136 return; … … 152 152 153 153 void print( const ast::ParameterizedType::ForallList & forall ) { 154 if ( forall.empty() ) return; 154 if ( forall.empty() ) return; 155 155 os << "forall" << endl; 156 156 ++indent; … … 178 178 void print( const ast::AggregateDecl * node ) { 179 179 os << node->typeString() << " " << node->name; 180 180 181 181 if ( ! short_mode && node->linkage != Linkage::Cforall ) { 182 182 os << " " << Linkage::name( node->linkage ); 183 183 } 184 184 185 185 os << " " << (node->body ? "with" : "without") << " body"; 186 186 … … 218 218 print( node->storage ); 219 219 os << node->typeString(); 220 220 221 221 if ( node->base ) { 222 222 os << " for "; … … 623 623 virtual const ast::Stmt * visit( const ast::TryStmt * node ) { 624 624 ++indent; 625 os << "Try Statement" << endl << indent-1 625 os << "Try Statement" << endl << indent-1 626 626 << "... with block:" << endl << indent; 627 627 safe_print( node->body ); … … 663 663 safe_print( node->body ); 664 664 --indent; 665 665 666 666 return node; 667 667 } … … 684 684 os << indent-1 << "target function: "; 685 685 safe_print( clause.target.func ); 686 686 687 687 if ( ! clause.target.args.empty() ) { 688 688 os << endl << indent-1 << "... with arguments:" << endl; … … 800 800 os << "Name: " << node->name; 801 801 postprint( node ); 802 802 803 803 return node; 804 804 } … … 931 931 --indent; 932 932 postprint( node ); 933 933 934 934 return node; 935 935 } … … 1015 1015 if ( node->operand ) node->operand->accept( *this ); 1016 1016 --indent; 1017 1017 1018 1018 return node; 1019 1019 } … … 1093 1093 --indent; 1094 1094 postprint( node ); 1095 1095 1096 1096 return node; 1097 1097 } … … 1292 1292 virtual const ast::Type * visit( const ast::FunctionType * node ) { 1293 1293 preprint( node ); 1294 1294 1295 1295 os << "function" << endl; 1296 1296 if ( ! node->params.empty() ) { … … 1362 1362 virtual const ast::Type * visit( const ast::TypeInstType * node ) { 1363 1363 preprint( node ); 1364 os << "instance of type " << node->name 1364 os << "instance of type " << node->name 1365 1365 << " (" << (node->kind == ast::TypeVar::Ftype ? "" : "not ") << "function type)"; 1366 1366 print( node->params ); -
src/AST/Stmt.hpp
rc519942 reba615c 278 278 ExceptionKind kind; 279 279 280 ThrowStmt( 280 ThrowStmt( 281 281 const CodeLocation & loc, ExceptionKind kind, const Expr * expr, const Expr * target, 282 282 std::vector<Label> && labels = {} ) … … 296 296 ptr<FinallyStmt> finally; 297 297 298 TryStmt( 298 TryStmt( 299 299 const CodeLocation & loc, const CompoundStmt * body, 300 300 std::vector<ptr<CatchStmt>> && handlers, const FinallyStmt * finally, … … 316 316 ExceptionKind kind; 317 317 318 CatchStmt( 318 CatchStmt( 319 319 const CodeLocation & loc, ExceptionKind kind, const Decl * decl, const Expr * cond, 320 320 const Stmt * body, std::vector<Label> && labels = {} )
Note: See TracChangeset
for help on using the changeset viewer.