Changeset 3d5701e for src/AST/Convert.cpp
- Timestamp:
- Feb 25, 2020, 1:17:33 PM (6 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:
- 7dc2e015
- Parents:
- 9fb8f01 (diff), dd9e1ca (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
-
src/AST/Convert.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Convert.cpp
r9fb8f01 r3d5701e 10 10 // Created On : Thu May 09 15::37::05 2019 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 25 22:21:46201913 // Update Count : 1312 // Last Modified On : Wed Dec 11 21:39:32 2019 13 // Update Count : 33 14 14 // 15 15 … … 245 245 auto decl = new StructDecl( 246 246 node->name, 247 node->kind,247 (AggregateDecl::Aggregate)node->kind, 248 248 get<Attribute>().acceptL( node->attributes ), 249 249 LinkageSpec::Spec( node->linkage.val ) … … 675 675 676 676 const ast::Expr * visit( const ast::KeywordCastExpr * node ) override final { 677 KeywordCastExpr::Target castTarget = KeywordCastExpr::NUMBER_OF_TARGETS; 678 switch (node->target) { 679 case ast::KeywordCastExpr::Coroutine: 680 castTarget = KeywordCastExpr::Coroutine; 681 break; 682 case ast::KeywordCastExpr::Thread: 683 castTarget = KeywordCastExpr::Thread; 684 break; 685 case ast::KeywordCastExpr::Monitor: 686 castTarget = KeywordCastExpr::Monitor; 687 break; 688 default: 689 break; 690 } 691 assert ( castTarget < KeywordCastExpr::NUMBER_OF_TARGETS ); 677 AggregateDecl::Aggregate castTarget = (AggregateDecl::Aggregate)node->target; 678 assert( AggregateDecl::Generator <= castTarget && castTarget <= AggregateDecl::Thread ); 692 679 auto expr = visitBaseExpr( node, 693 680 new KeywordCastExpr( … … 887 874 auto expr = visitBaseExpr( node, 888 875 new AsmExpr( 889 get<Expression>().accept1(node->inout),876 new std::string(node->inout), 890 877 get<Expression>().accept1(node->constraint), 891 878 get<Expression>().accept1(node->operand) … … 1236 1223 cv( node ), 1237 1224 node->name, 1238 node->kind == ast::Type Var::Ftype,1225 node->kind == ast::TypeDecl::Ftype, 1239 1226 get<Attribute>().acceptL( node->attributes ) 1240 1227 }; … … 1504 1491 old->location, 1505 1492 old->name, 1506 old->kind,1493 (ast::AggregateDecl::Aggregate)old->kind, 1507 1494 GET_ACCEPT_V(attributes, Attribute), 1508 1495 { old->linkage.val } … … 1591 1578 { old->storageClasses.val }, 1592 1579 GET_ACCEPT_1(base, Type), 1593 (ast::Type Var::Kind)(unsigned)old->kind,1580 (ast::TypeDecl::Kind)(unsigned)old->kind, 1594 1581 old->sized, 1595 1582 GET_ACCEPT_1(init, Type) … … 2045 2032 } 2046 2033 2047 virtual void visit( const KeywordCastExpr * old) override final { 2048 ast::KeywordCastExpr::Target castTarget = ast::KeywordCastExpr::NUMBER_OF_TARGETS; 2049 switch (old->target) { 2050 case KeywordCastExpr::Coroutine: 2051 castTarget = ast::KeywordCastExpr::Coroutine; 2052 break; 2053 case KeywordCastExpr::Thread: 2054 castTarget = ast::KeywordCastExpr::Thread; 2055 break; 2056 case KeywordCastExpr::Monitor: 2057 castTarget = ast::KeywordCastExpr::Monitor; 2058 break; 2059 default: 2060 break; 2061 } 2062 assert ( castTarget < ast::KeywordCastExpr::NUMBER_OF_TARGETS ); 2034 virtual void visit( const KeywordCastExpr * old ) override final { 2035 ast::AggregateDecl::Aggregate castTarget = (ast::AggregateDecl::Aggregate)old->target; 2036 assert( ast::AggregateDecl::Generator <= castTarget && castTarget <= ast::AggregateDecl::Thread ); 2063 2037 this->node = visitBaseExpr( old, 2064 2038 new ast::KeywordCastExpr( … … 2258 2232 new ast::AsmExpr( 2259 2233 old->location, 2260 GET_ACCEPT_1(inout, Expr),2234 old->inout, 2261 2235 GET_ACCEPT_1(constraint, Expr), 2262 2236 GET_ACCEPT_1(operand, Expr) … … 2587 2561 ty = new ast::TypeInstType{ 2588 2562 old->name, 2589 old->isFtype ? ast::Type Var::Ftype : ast::TypeVar::Dtype,2563 old->isFtype ? ast::TypeDecl::Ftype : ast::TypeDecl::Dtype, 2590 2564 cv( old ), 2591 2565 GET_ACCEPT_V( attributes, Attribute )
Note:
See TracChangeset
for help on using the changeset viewer.