Changes in / [a6c5d7c:6e49f18]
- Location:
- src
- Files:
-
- 5 added
- 3 deleted
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
ra6c5d7c r6e49f18 540 540 extension( nameExpr ); 541 541 OperatorInfo opInfo; 542 if ( operatorLookup( nameExpr->get_name(), opInfo ) ) { 543 assert( opInfo.type == OT_CONSTANT ); 544 output << opInfo.symbol; 542 if ( operatorLookup( nameExpr->name, opInfo ) ) { 543 if ( opInfo.type == OT_CONSTANT ) { 544 output << opInfo.symbol; 545 } else { 546 output << opInfo.outputName; 547 } 545 548 } else { 546 549 output << nameExpr->get_name(); … … 943 946 output << ";"; 944 947 } 948 void CodeGenerator::postvisit( CatchStmt * stmt ) { 949 assertf( ! genC, "Catch statements should not reach code generation." ); 950 951 output << ((stmt->get_kind() == CatchStmt::Terminate) ? 952 "catch" : "catchResume"); 953 output << "( "; 954 stmt->decl->accept( *visitor ); 955 output << " ) "; 956 957 if( stmt->cond ) { 958 output << "if/when(?) ("; 959 stmt->cond->accept( *visitor ); 960 output << ") "; 961 } 962 stmt->body->accept( *visitor ); 963 } 964 965 void CodeGenerator::postvisit( WaitForStmt * stmt ) { 966 assertf( ! genC, "Waitfor statements should not reach code generation." ); 967 968 bool first = true; 969 for( auto & clause : stmt->clauses ) { 970 if(first) { output << "or "; first = false; } 971 if( clause.condition ) { 972 output << "when("; 973 stmt->timeout.condition->accept( *visitor ); 974 output << ") "; 975 } 976 output << "waitfor("; 977 clause.target.function->accept( *visitor ); 978 for( Expression * expr : clause.target.arguments ) { 979 output << ","; 980 expr->accept( *visitor ); 981 } 982 output << ") "; 983 clause.statement->accept( *visitor ); 984 } 985 986 if( stmt->timeout.statement ) { 987 output << "or "; 988 if( stmt->timeout.condition ) { 989 output << "when("; 990 stmt->timeout.condition->accept( *visitor ); 991 output << ") "; 992 } 993 output << "timeout("; 994 stmt->timeout.time->accept( *visitor ); 995 output << ") "; 996 stmt->timeout.statement->accept( *visitor ); 997 } 998 999 if( stmt->orelse.statement ) { 1000 output << "or "; 1001 if( stmt->orelse.condition ) { 1002 output << "when("; 1003 stmt->orelse.condition->accept( *visitor ); 1004 output << ")"; 1005 } 1006 output << "else "; 1007 stmt->orelse.statement->accept( *visitor ); 1008 } 1009 } 1010 945 1011 946 1012 void CodeGenerator::postvisit( WhileStmt * whileStmt ) { -
src/CodeGen/CodeGenerator.h
ra6c5d7c r6e49f18 100 100 void postvisit( ReturnStmt * ); 101 101 void postvisit( ThrowStmt * ); 102 void postvisit( CatchStmt * ); 103 void postvisit( WaitForStmt * ); 102 104 void postvisit( WhileStmt * ); 103 105 void postvisit( ForStmt * ); -
src/Common/PassVisitor.h
ra6c5d7c r6e49f18 10 10 #include "SymTab/Indexer.h" 11 11 12 #include "SynTree/Attribute.h" 12 13 #include "SynTree/Initializer.h" 13 14 #include "SynTree/Statement.h" … … 53 54 pass_type pass; 54 55 55 virtual void visit( ObjectDecl *objectDecl ) override final; 56 virtual void visit( FunctionDecl *functionDecl ) override final; 57 virtual void visit( StructDecl *aggregateDecl ) override final; 58 virtual void visit( UnionDecl *aggregateDecl ) override final; 59 virtual void visit( EnumDecl *aggregateDecl ) override final; 60 virtual void visit( TraitDecl *aggregateDecl ) override final; 61 virtual void visit( TypeDecl *typeDecl ) override final; 62 virtual void visit( TypedefDecl *typeDecl ) override final; 63 virtual void visit( AsmDecl *asmDecl ) override final; 64 65 virtual void visit( CompoundStmt *compoundStmt ) override final; 66 virtual void visit( ExprStmt *exprStmt ) override final; 67 virtual void visit( AsmStmt *asmStmt ) override final; 68 virtual void visit( IfStmt *ifStmt ) override final; 69 virtual void visit( WhileStmt *whileStmt ) override final; 70 virtual void visit( ForStmt *forStmt ) override final; 71 virtual void visit( SwitchStmt *switchStmt ) override final; 72 virtual void visit( CaseStmt *caseStmt ) override final; 73 virtual void visit( BranchStmt *branchStmt ) override final; 74 virtual void visit( ReturnStmt *returnStmt ) override final; 75 virtual void visit( ThrowStmt *throwStmt ) override final; 76 virtual void visit( TryStmt *tryStmt ) override final; 77 virtual void visit( CatchStmt *catchStmt ) override final; 78 virtual void visit( FinallyStmt *finallyStmt ) override final; 79 virtual void visit( WaitForStmt *waitforStmt ) override final; 80 virtual void visit( NullStmt *nullStmt ) override final; 81 virtual void visit( DeclStmt *declStmt ) override final; 82 virtual void visit( ImplicitCtorDtorStmt *impCtorDtorStmt ) override final; 83 84 virtual void visit( ApplicationExpr *applicationExpr ) override final; 85 virtual void visit( UntypedExpr *untypedExpr ) override final; 86 virtual void visit( NameExpr *nameExpr ) override final; 87 virtual void visit( CastExpr *castExpr ) override final; 88 virtual void visit( VirtualCastExpr *castExpr ) override final; 89 virtual void visit( AddressExpr *addressExpr ) override final; 90 virtual void visit( LabelAddressExpr *labAddressExpr ) override final; 91 virtual void visit( UntypedMemberExpr *memberExpr ) override final; 92 virtual void visit( MemberExpr *memberExpr ) override final; 93 virtual void visit( VariableExpr *variableExpr ) override final; 94 virtual void visit( ConstantExpr *constantExpr ) override final; 95 virtual void visit( SizeofExpr *sizeofExpr ) override final; 96 virtual void visit( AlignofExpr *alignofExpr ) override final; 97 virtual void visit( UntypedOffsetofExpr *offsetofExpr ) override final; 98 virtual void visit( OffsetofExpr *offsetofExpr ) override final; 99 virtual void visit( OffsetPackExpr *offsetPackExpr ) override final; 100 virtual void visit( AttrExpr *attrExpr ) override final; 101 virtual void visit( LogicalExpr *logicalExpr ) override final; 102 virtual void visit( ConditionalExpr *conditionalExpr ) override final; 103 virtual void visit( CommaExpr *commaExpr ) override final; 104 virtual void visit( TypeExpr *typeExpr ) override final; 105 virtual void visit( AsmExpr *asmExpr ) override final; 106 virtual void visit( ImplicitCopyCtorExpr *impCpCtorExpr ) override final; 107 virtual void visit( ConstructorExpr * ctorExpr ) override final; 108 virtual void visit( CompoundLiteralExpr *compLitExpr ) override final; 109 virtual void visit( RangeExpr *rangeExpr ) override final; 110 virtual void visit( UntypedTupleExpr *tupleExpr ) override final; 111 virtual void visit( TupleExpr *tupleExpr ) override final; 112 virtual void visit( TupleIndexExpr *tupleExpr ) override final; 113 virtual void visit( TupleAssignExpr *assignExpr ) override final; 114 virtual void visit( StmtExpr * stmtExpr ) override final; 115 virtual void visit( UniqueExpr * uniqueExpr ) override final; 116 117 virtual void visit( VoidType *basicType ) override final; 118 virtual void visit( BasicType *basicType ) override final; 119 virtual void visit( PointerType *pointerType ) override final; 120 virtual void visit( ArrayType *arrayType ) override final; 121 virtual void visit( ReferenceType *referenceType ) override final; 122 virtual void visit( FunctionType *functionType ) override final; 123 virtual void visit( StructInstType *aggregateUseType ) override final; 124 virtual void visit( UnionInstType *aggregateUseType ) override final; 125 virtual void visit( EnumInstType *aggregateUseType ) override final; 126 virtual void visit( TraitInstType *aggregateUseType ) override final; 127 virtual void visit( TypeInstType *aggregateUseType ) override final; 128 virtual void visit( TupleType *tupleType ) override final; 129 virtual void visit( TypeofType *typeofType ) override final; 130 virtual void visit( AttrType *attrType ) override final; 131 virtual void visit( VarArgsType *varArgsType ) override final; 132 virtual void visit( ZeroType *zeroType ) override final; 133 virtual void visit( OneType *oneType ) override final; 134 135 virtual void visit( Designation *designation ) override final; 136 virtual void visit( SingleInit *singleInit ) override final; 137 virtual void visit( ListInit *listInit ) override final; 138 virtual void visit( ConstructorInit *ctorInit ) override final; 139 140 virtual void visit( Subrange *subrange ) override final; 141 142 virtual void visit( Constant *constant ) override final; 143 144 virtual DeclarationWithType* mutate( ObjectDecl *objectDecl ) override final; 145 virtual DeclarationWithType* mutate( FunctionDecl *functionDecl ) override final; 146 virtual Declaration* mutate( StructDecl *aggregateDecl ) override final; 147 virtual Declaration* mutate( UnionDecl *aggregateDecl ) override final; 148 virtual Declaration* mutate( EnumDecl *aggregateDecl ) override final; 149 virtual Declaration* mutate( TraitDecl *aggregateDecl ) override final; 150 virtual Declaration* mutate( TypeDecl *typeDecl ) override final; 151 virtual Declaration* mutate( TypedefDecl *typeDecl ) override final; 152 virtual AsmDecl* mutate( AsmDecl *asmDecl ) override final; 153 154 virtual CompoundStmt* mutate( CompoundStmt *compoundStmt ) override final; 155 virtual Statement* mutate( ExprStmt *exprStmt ) override final; 156 virtual Statement* mutate( AsmStmt *asmStmt ) override final; 157 virtual Statement* mutate( IfStmt *ifStmt ) override final; 158 virtual Statement* mutate( WhileStmt *whileStmt ) override final; 159 virtual Statement* mutate( ForStmt *forStmt ) override final; 160 virtual Statement* mutate( SwitchStmt *switchStmt ) override final; 161 virtual Statement* mutate( CaseStmt *caseStmt ) override final; 162 virtual Statement* mutate( BranchStmt *branchStmt ) override final; 163 virtual Statement* mutate( ReturnStmt *returnStmt ) override final; 164 virtual Statement* mutate( ThrowStmt *throwStmt ) override final; 165 virtual Statement* mutate( TryStmt *tryStmt ) override final; 166 virtual Statement* mutate( CatchStmt *catchStmt ) override final; 167 virtual Statement* mutate( FinallyStmt *finallyStmt ) override final; 168 virtual Statement* mutate( WaitForStmt *waitforStmt ) override final; 169 virtual NullStmt* mutate( NullStmt *nullStmt ) override final; 170 virtual Statement* mutate( DeclStmt *declStmt ) override final; 171 virtual Statement* mutate( ImplicitCtorDtorStmt *impCtorDtorStmt ) override final; 172 173 virtual Expression* mutate( ApplicationExpr *applicationExpr ) override final; 174 virtual Expression* mutate( UntypedExpr *untypedExpr ) override final; 175 virtual Expression* mutate( NameExpr *nameExpr ) override final; 176 virtual Expression* mutate( AddressExpr *castExpr ) override final; 177 virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final; 178 virtual Expression* mutate( CastExpr *castExpr ) override final; 179 virtual Expression* mutate( VirtualCastExpr *castExpr ) override final; 180 virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final; 181 virtual Expression* mutate( MemberExpr *memberExpr ) override final; 182 virtual Expression* mutate( VariableExpr *variableExpr ) override final; 183 virtual Expression* mutate( ConstantExpr *constantExpr ) override final; 184 virtual Expression* mutate( SizeofExpr *sizeofExpr ) override final; 185 virtual Expression* mutate( AlignofExpr *alignofExpr ) override final; 186 virtual Expression* mutate( UntypedOffsetofExpr *offsetofExpr ) override final; 187 virtual Expression* mutate( OffsetofExpr *offsetofExpr ) override final; 188 virtual Expression* mutate( OffsetPackExpr *offsetPackExpr ) override final; 189 virtual Expression* mutate( AttrExpr *attrExpr ) override final; 190 virtual Expression* mutate( LogicalExpr *logicalExpr ) override final; 191 virtual Expression* mutate( ConditionalExpr *conditionalExpr ) override final; 192 virtual Expression* mutate( CommaExpr *commaExpr ) override final; 193 virtual Expression* mutate( TypeExpr *typeExpr ) override final; 194 virtual Expression* mutate( AsmExpr *asmExpr ) override final; 195 virtual Expression* mutate( ImplicitCopyCtorExpr *impCpCtorExpr ) override final; 196 virtual Expression* mutate( ConstructorExpr *ctorExpr ) override final; 197 virtual Expression* mutate( CompoundLiteralExpr *compLitExpr ) override final; 198 virtual Expression* mutate( RangeExpr *rangeExpr ) override final; 199 virtual Expression* mutate( UntypedTupleExpr *tupleExpr ) override final; 200 virtual Expression* mutate( TupleExpr *tupleExpr ) override final; 201 virtual Expression* mutate( TupleIndexExpr *tupleExpr ) override final; 202 virtual Expression* mutate( TupleAssignExpr *assignExpr ) override final; 203 virtual Expression* mutate( StmtExpr * stmtExpr ) override final; 204 virtual Expression* mutate( UniqueExpr * uniqueExpr ) override final; 205 206 virtual Type* mutate( VoidType *basicType ) override final; 207 virtual Type* mutate( BasicType *basicType ) override final; 208 virtual Type* mutate( PointerType *pointerType ) override final; 209 virtual Type* mutate( ArrayType *arrayType ) override final; 210 virtual Type* mutate( ReferenceType *referenceType ) override final; 211 virtual Type* mutate( FunctionType *functionType ) override final; 212 virtual Type* mutate( StructInstType *aggregateUseType ) override final; 213 virtual Type* mutate( UnionInstType *aggregateUseType ) override final; 214 virtual Type* mutate( EnumInstType *aggregateUseType ) override final; 215 virtual Type* mutate( TraitInstType *aggregateUseType ) override final; 216 virtual Type* mutate( TypeInstType *aggregateUseType ) override final; 217 virtual Type* mutate( TupleType *tupleType ) override final; 218 virtual Type* mutate( TypeofType *typeofType ) override final; 219 virtual Type* mutate( AttrType *attrType ) override final; 220 virtual Type* mutate( VarArgsType *varArgsType ) override final; 221 virtual Type* mutate( ZeroType *zeroType ) override final; 222 virtual Type* mutate( OneType *oneType ) override final; 223 224 virtual Designation* mutate( Designation *designation ) override final; 225 virtual Initializer* mutate( SingleInit *singleInit ) override final; 226 virtual Initializer* mutate( ListInit *listInit ) override final; 227 virtual Initializer* mutate( ConstructorInit *ctorInit ) override final; 228 229 virtual Subrange *mutate( Subrange *subrange ) override final; 230 231 virtual Constant *mutate( Constant *constant ) override final; 56 virtual void visit( ObjectDecl * objectDecl ) override final; 57 virtual void visit( FunctionDecl * functionDecl ) override final; 58 virtual void visit( StructDecl * aggregateDecl ) override final; 59 virtual void visit( UnionDecl * aggregateDecl ) override final; 60 virtual void visit( EnumDecl * aggregateDecl ) override final; 61 virtual void visit( TraitDecl * aggregateDecl ) override final; 62 virtual void visit( TypeDecl * typeDecl ) override final; 63 virtual void visit( TypedefDecl * typeDecl ) override final; 64 virtual void visit( AsmDecl * asmDecl ) override final; 65 66 virtual void visit( CompoundStmt * compoundStmt ) override final; 67 virtual void visit( ExprStmt * exprStmt ) override final; 68 virtual void visit( AsmStmt * asmStmt ) override final; 69 virtual void visit( IfStmt * ifStmt ) override final; 70 virtual void visit( WhileStmt * whileStmt ) override final; 71 virtual void visit( ForStmt * forStmt ) override final; 72 virtual void visit( SwitchStmt * switchStmt ) override final; 73 virtual void visit( CaseStmt * caseStmt ) override final; 74 virtual void visit( BranchStmt * branchStmt ) override final; 75 virtual void visit( ReturnStmt * returnStmt ) override final; 76 virtual void visit( ThrowStmt * throwStmt ) override final; 77 virtual void visit( TryStmt * tryStmt ) override final; 78 virtual void visit( CatchStmt * catchStmt ) override final; 79 virtual void visit( FinallyStmt * finallyStmt ) override final; 80 virtual void visit( WaitForStmt * waitforStmt ) override final; 81 virtual void visit( NullStmt * nullStmt ) override final; 82 virtual void visit( DeclStmt * declStmt ) override final; 83 virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt ) override final; 84 85 virtual void visit( ApplicationExpr * applicationExpr ) override final; 86 virtual void visit( UntypedExpr * untypedExpr ) override final; 87 virtual void visit( NameExpr * nameExpr ) override final; 88 virtual void visit( CastExpr * castExpr ) override final; 89 virtual void visit( VirtualCastExpr * castExpr ) override final; 90 virtual void visit( AddressExpr * addressExpr ) override final; 91 virtual void visit( LabelAddressExpr * labAddressExpr ) override final; 92 virtual void visit( UntypedMemberExpr * memberExpr ) override final; 93 virtual void visit( MemberExpr * memberExpr ) override final; 94 virtual void visit( VariableExpr * variableExpr ) override final; 95 virtual void visit( ConstantExpr * constantExpr ) override final; 96 virtual void visit( SizeofExpr * sizeofExpr ) override final; 97 virtual void visit( AlignofExpr * alignofExpr ) override final; 98 virtual void visit( UntypedOffsetofExpr * offsetofExpr ) override final; 99 virtual void visit( OffsetofExpr * offsetofExpr ) override final; 100 virtual void visit( OffsetPackExpr * offsetPackExpr ) override final; 101 virtual void visit( AttrExpr * attrExpr ) override final; 102 virtual void visit( LogicalExpr * logicalExpr ) override final; 103 virtual void visit( ConditionalExpr * conditionalExpr ) override final; 104 virtual void visit( CommaExpr * commaExpr ) override final; 105 virtual void visit( TypeExpr * typeExpr ) override final; 106 virtual void visit( AsmExpr * asmExpr ) override final; 107 virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ) override final; 108 virtual void visit( ConstructorExpr * ctorExpr ) override final; 109 virtual void visit( CompoundLiteralExpr * compLitExpr ) override final; 110 virtual void visit( RangeExpr * rangeExpr ) override final; 111 virtual void visit( UntypedTupleExpr * tupleExpr ) override final; 112 virtual void visit( TupleExpr * tupleExpr ) override final; 113 virtual void visit( TupleIndexExpr * tupleExpr ) override final; 114 virtual void visit( TupleAssignExpr * assignExpr ) override final; 115 virtual void visit( StmtExpr * stmtExpr ) override final; 116 virtual void visit( UniqueExpr * uniqueExpr ) override final; 117 118 virtual void visit( VoidType * basicType ) override final; 119 virtual void visit( BasicType * basicType ) override final; 120 virtual void visit( PointerType * pointerType ) override final; 121 virtual void visit( ArrayType * arrayType ) override final; 122 virtual void visit( ReferenceType * referenceType ) override final; 123 virtual void visit( FunctionType * functionType ) override final; 124 virtual void visit( StructInstType * aggregateUseType ) override final; 125 virtual void visit( UnionInstType * aggregateUseType ) override final; 126 virtual void visit( EnumInstType * aggregateUseType ) override final; 127 virtual void visit( TraitInstType * aggregateUseType ) override final; 128 virtual void visit( TypeInstType * aggregateUseType ) override final; 129 virtual void visit( TupleType * tupleType ) override final; 130 virtual void visit( TypeofType * typeofType ) override final; 131 virtual void visit( AttrType * attrType ) override final; 132 virtual void visit( VarArgsType * varArgsType ) override final; 133 virtual void visit( ZeroType * zeroType ) override final; 134 virtual void visit( OneType * oneType ) override final; 135 136 virtual void visit( Designation * designation ) override final; 137 virtual void visit( SingleInit * singleInit ) override final; 138 virtual void visit( ListInit * listInit ) override final; 139 virtual void visit( ConstructorInit * ctorInit ) override final; 140 141 virtual void visit( Subrange * subrange ) override final; 142 143 virtual void visit( Constant * constant ) override final; 144 145 virtual void visit( Attribute * attribute ) override final; 146 147 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override final; 148 virtual DeclarationWithType * mutate( FunctionDecl * functionDecl ) override final; 149 virtual Declaration * mutate( StructDecl * aggregateDecl ) override final; 150 virtual Declaration * mutate( UnionDecl * aggregateDecl ) override final; 151 virtual Declaration * mutate( EnumDecl * aggregateDecl ) override final; 152 virtual Declaration * mutate( TraitDecl * aggregateDecl ) override final; 153 virtual Declaration * mutate( TypeDecl * typeDecl ) override final; 154 virtual Declaration * mutate( TypedefDecl * typeDecl ) override final; 155 virtual AsmDecl * mutate( AsmDecl * asmDecl ) override final; 156 157 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) override final; 158 virtual Statement * mutate( ExprStmt * exprStmt ) override final; 159 virtual Statement * mutate( AsmStmt * asmStmt ) override final; 160 virtual Statement * mutate( IfStmt * ifStmt ) override final; 161 virtual Statement * mutate( WhileStmt * whileStmt ) override final; 162 virtual Statement * mutate( ForStmt * forStmt ) override final; 163 virtual Statement * mutate( SwitchStmt * switchStmt ) override final; 164 virtual Statement * mutate( CaseStmt * caseStmt ) override final; 165 virtual Statement * mutate( BranchStmt * branchStmt ) override final; 166 virtual Statement * mutate( ReturnStmt * returnStmt ) override final; 167 virtual Statement * mutate( ThrowStmt * throwStmt ) override final; 168 virtual Statement * mutate( TryStmt * tryStmt ) override final; 169 virtual Statement * mutate( CatchStmt * catchStmt ) override final; 170 virtual Statement * mutate( FinallyStmt * finallyStmt ) override final; 171 virtual Statement * mutate( WaitForStmt * waitforStmt ) override final; 172 virtual NullStmt * mutate( NullStmt * nullStmt ) override final; 173 virtual Statement * mutate( DeclStmt * declStmt ) override final; 174 virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt ) override final; 175 176 virtual Expression * mutate( ApplicationExpr * applicationExpr ) override final; 177 virtual Expression * mutate( UntypedExpr * untypedExpr ) override final; 178 virtual Expression * mutate( NameExpr * nameExpr ) override final; 179 virtual Expression * mutate( AddressExpr * castExpr ) override final; 180 virtual Expression * mutate( LabelAddressExpr * labAddressExpr ) override final; 181 virtual Expression * mutate( CastExpr * castExpr ) override final; 182 virtual Expression * mutate( VirtualCastExpr * castExpr ) override final; 183 virtual Expression * mutate( UntypedMemberExpr * memberExpr ) override final; 184 virtual Expression * mutate( MemberExpr * memberExpr ) override final; 185 virtual Expression * mutate( VariableExpr * variableExpr ) override final; 186 virtual Expression * mutate( ConstantExpr * constantExpr ) override final; 187 virtual Expression * mutate( SizeofExpr * sizeofExpr ) override final; 188 virtual Expression * mutate( AlignofExpr * alignofExpr ) override final; 189 virtual Expression * mutate( UntypedOffsetofExpr * offsetofExpr ) override final; 190 virtual Expression * mutate( OffsetofExpr * offsetofExpr ) override final; 191 virtual Expression * mutate( OffsetPackExpr * offsetPackExpr ) override final; 192 virtual Expression * mutate( AttrExpr * attrExpr ) override final; 193 virtual Expression * mutate( LogicalExpr * logicalExpr ) override final; 194 virtual Expression * mutate( ConditionalExpr * conditionalExpr ) override final; 195 virtual Expression * mutate( CommaExpr * commaExpr ) override final; 196 virtual Expression * mutate( TypeExpr * typeExpr ) override final; 197 virtual Expression * mutate( AsmExpr * asmExpr ) override final; 198 virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) override final; 199 virtual Expression * mutate( ConstructorExpr * ctorExpr ) override final; 200 virtual Expression * mutate( CompoundLiteralExpr * compLitExpr ) override final; 201 virtual Expression * mutate( RangeExpr * rangeExpr ) override final; 202 virtual Expression * mutate( UntypedTupleExpr * tupleExpr ) override final; 203 virtual Expression * mutate( TupleExpr * tupleExpr ) override final; 204 virtual Expression * mutate( TupleIndexExpr * tupleExpr ) override final; 205 virtual Expression * mutate( TupleAssignExpr * assignExpr ) override final; 206 virtual Expression * mutate( StmtExpr * stmtExpr ) override final; 207 virtual Expression * mutate( UniqueExpr * uniqueExpr ) override final; 208 209 virtual Type * mutate( VoidType * basicType ) override final; 210 virtual Type * mutate( BasicType * basicType ) override final; 211 virtual Type * mutate( PointerType * pointerType ) override final; 212 virtual Type * mutate( ArrayType * arrayType ) override final; 213 virtual Type * mutate( ReferenceType * referenceType ) override final; 214 virtual Type * mutate( FunctionType * functionType ) override final; 215 virtual Type * mutate( StructInstType * aggregateUseType ) override final; 216 virtual Type * mutate( UnionInstType * aggregateUseType ) override final; 217 virtual Type * mutate( EnumInstType * aggregateUseType ) override final; 218 virtual Type * mutate( TraitInstType * aggregateUseType ) override final; 219 virtual Type * mutate( TypeInstType * aggregateUseType ) override final; 220 virtual Type * mutate( TupleType * tupleType ) override final; 221 virtual Type * mutate( TypeofType * typeofType ) override final; 222 virtual Type * mutate( AttrType * attrType ) override final; 223 virtual Type * mutate( VarArgsType * varArgsType ) override final; 224 virtual Type * mutate( ZeroType * zeroType ) override final; 225 virtual Type * mutate( OneType * oneType ) override final; 226 227 virtual Designation * mutate( Designation * designation ) override final; 228 virtual Initializer * mutate( SingleInit * singleInit ) override final; 229 virtual Initializer * mutate( ListInit * listInit ) override final; 230 virtual Initializer * mutate( ConstructorInit * ctorInit ) override final; 231 232 virtual Subrange * mutate( Subrange * subrange ) override final; 233 234 virtual Constant * mutate( Constant * constant ) override final; 235 236 virtual Attribute * mutate( Attribute * attribute ) override final; 232 237 233 238 private: -
src/Common/PassVisitor.impl.h
ra6c5d7c r6e49f18 321 321 maybeAccept ( node->init , *this ); 322 322 maybeAccept ( node->bitfieldWidth, *this ); 323 maybeAccept ( node->attributes , *this ); 323 324 324 325 if ( node->name != "" ) { … … 336 337 maybeMutateRef ( node->init , *this ); 337 338 maybeMutateRef ( node->bitfieldWidth, *this ); 339 maybeMutateRef ( node->attributes , *this ); 338 340 339 341 if ( node->name != "" ) { … … 358 360 maybeAccept( node->type, *this ); 359 361 maybeAccept( node->statements, *this ); 362 maybeAccept( node->attributes, *this ); 360 363 } 361 364 … … 375 378 maybeMutateRef( node->type, *this ); 376 379 maybeMutateRef( node->statements, *this ); 380 maybeMutateRef( node->attributes, *this ); 377 381 } 378 382 … … 1984 1988 } 1985 1989 1990 template< typename pass_type > 1991 void PassVisitor< pass_type >::visit( Attribute * node ) { 1992 VISIT_BODY( node ); 1993 } 1994 1986 1995 //--------------------------------------------------------------------------------------------------------------- 1987 1996 template< typename pass_type > … … 2069 2078 MUTATE_BODY( Constant, node ); 2070 2079 } 2080 2081 template< typename pass_type > 2082 Attribute * PassVisitor< pass_type >::mutate( Attribute * node ) { 2083 MUTATE_BODY( Attribute, node ); 2084 } -
src/InitTweak/FixInit.cc
ra6c5d7c r6e49f18 214 214 void emit( CodeLocation, const Params &... params ); 215 215 216 FunctionDecl * function = 0;216 FunctionDecl * function = nullptr; 217 217 std::set< DeclarationWithType * > unhandled; 218 218 std::map< DeclarationWithType *, CodeLocation > usedUninit; 219 ObjectDecl * thisParam = 0;219 ObjectDecl * thisParam = nullptr; 220 220 bool isCtor = false; // true if current function is a constructor 221 StructDecl * structDecl = 0;221 StructDecl * structDecl = nullptr; 222 222 }; 223 223 … … 624 624 } 625 625 626 DeclarationWithType * FixInit::postmutate( ObjectDecl *objDecl ) {626 DeclarationWithType * FixInit::postmutate( ObjectDecl *objDecl ) { 627 627 // since this removes the init field from objDecl, it must occur after children are mutated (i.e. postmutate) 628 628 if ( ConstructorInit * ctorInit = dynamic_cast< ConstructorInit * >( objDecl->get_init() ) ) { … … 722 722 } else { 723 723 ImplicitCtorDtorStmt * implicit = strict_dynamic_cast< ImplicitCtorDtorStmt * > ( ctor ); 724 ExprStmt * ctorStmt = dynamic_cast< ExprStmt * >( implicit-> get_callStmt());724 ExprStmt * ctorStmt = dynamic_cast< ExprStmt * >( implicit->callStmt ); 725 725 ApplicationExpr * ctorCall = nullptr; 726 if ( ctorStmt && (ctorCall = isIntrinsicCallExpr( ctorStmt-> get_expr())) && ctorCall->get_args().size() == 2 ) {726 if ( ctorStmt && (ctorCall = isIntrinsicCallExpr( ctorStmt->expr )) && ctorCall->get_args().size() == 2 ) { 727 727 // clean up intrinsic copy constructor calls by making them into SingleInits 728 objDecl-> set_init( new SingleInit( ctorCall->get_args().back()) );729 ctorCall-> get_args().pop_back();728 objDecl->init = new SingleInit( ctorCall->args.back() ); 729 ctorCall->args.pop_back(); 730 730 } else { 731 731 stmtsToAddAfter.push_back( ctor ); 732 objDecl-> set_init( nullptr );733 ctorInit-> set_ctor( nullptr );732 objDecl->init = nullptr; 733 ctorInit->ctor = nullptr; 734 734 } 735 735 } // if 736 } else if ( Initializer * init = ctorInit-> get_init()) {737 objDecl-> set_init( init );738 ctorInit-> set_init( nullptr );736 } else if ( Initializer * init = ctorInit->init ) { 737 objDecl->init = init; 738 ctorInit->init = nullptr; 739 739 } else { 740 740 // no constructor and no initializer, which is okay 741 objDecl-> set_init( nullptr );741 objDecl->init = nullptr; 742 742 } // if 743 743 delete ctorInit; … … 912 912 } 913 913 914 void addIds( SymTab::Indexer & indexer, const std::list< DeclarationWithType * > & decls ) { 915 for ( auto d : decls ) { 916 indexer.addId( d ); 917 } 918 } 919 920 void addTypes( SymTab::Indexer & indexer, const std::list< TypeDecl * > & tds ) { 921 for ( auto td : tds ) { 922 indexer.addType( td ); 923 addIds( indexer, td->assertions ); 924 } 925 } 926 914 927 void GenStructMemberCalls::previsit( FunctionDecl * funcDecl ) { 915 GuardValue( func Decl);928 GuardValue( function ); 916 929 GuardValue( unhandled ); 917 930 GuardValue( usedUninit ); … … 946 959 } 947 960 948 void addIds( SymTab::Indexer & indexer, const std::list< DeclarationWithType * > & decls ) {949 for ( auto d : decls ) {950 indexer.addId( d );951 }952 }953 954 void addTypes( SymTab::Indexer & indexer, const std::list< TypeDecl * > & tds ) {955 for ( auto td : tds ) {956 indexer.addType( td );957 addIds( indexer, td->assertions );958 }959 }960 961 961 void GenStructMemberCalls::postvisit( FunctionDecl * funcDecl ) { 962 962 // remove the unhandled objects from usedUninit, because a call is inserted -
src/InitTweak/InitTweak.cc
ra6c5d7c r6e49f18 270 270 } 271 271 272 Type * getThisType( FunctionType * ftype ) { 273 assertf( ftype, "getThisType: nullptr ftype" ); 274 ObjectDecl * thisParam = getThisParam( ftype ); 275 ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( thisParam->type ); 276 return refType->base; 277 } 278 279 ObjectDecl * getThisParam( FunctionType * ftype ) { 280 assertf( ftype, "getThisParam: nullptr ftype" ); 281 auto & params = ftype->parameters; 282 assertf( ! params.empty(), "getThisParam: ftype with 0 parameters: %s", toString( ftype ).c_str() ); 283 return strict_dynamic_cast< ObjectDecl * >( params.front() ); 284 } 285 272 286 bool tryConstruct( DeclarationWithType * dwt ) { 273 287 ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt ); -
src/InitTweak/InitTweak.h
ra6c5d7c r6e49f18 29 29 FunctionDecl * isCopyConstructor( Declaration * decl ); 30 30 FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname ); 31 32 /// returns the base type of the first parameter to a constructor/destructor/assignment function 33 Type * getThisType( FunctionType * ftype ); 34 35 /// returns the first parameter of a constructor/destructor/assignment function 36 ObjectDecl * getThisParam( FunctionType * ftype ); 31 37 32 38 /// transform Initializer into an argument list that can be passed to a call expression -
src/ResolvExpr/AlternativeFinder.cc
ra6c5d7c r6e49f18 174 174 } 175 175 176 void AlternativeFinder::find( Expression *expr, bool adjust, bool prune ) {176 void AlternativeFinder::find( Expression *expr, bool adjust, bool prune, bool failFast ) { 177 177 expr->accept( *this ); 178 if ( alternatives.empty() ) {178 if ( failFast && alternatives.empty() ) { 179 179 throw SemanticError( "No reasonable alternatives for expression ", expr ); 180 180 } … … 191 191 AltList::iterator oldBegin = alternatives.begin(); 192 192 pruneAlternatives( alternatives.begin(), alternatives.end(), front_inserter( alternatives ) ); 193 if ( alternatives.begin() == oldBegin ) {193 if ( failFast && alternatives.begin() == oldBegin ) { 194 194 std::ostringstream stream; 195 195 AltList winners; … … 214 214 } 215 215 216 void AlternativeFinder::findWithAdjustment( Expression *expr, bool prune ) { 217 find( expr, true, prune ); 216 void AlternativeFinder::findWithAdjustment( Expression *expr ) { 217 find( expr, true ); 218 } 219 220 void AlternativeFinder::findWithoutPrune( Expression * expr ) { 221 find( expr, true, false ); 222 } 223 224 void AlternativeFinder::maybeFind( Expression * expr ) { 225 find( expr, true, true, false ); 218 226 } 219 227 … … 714 722 715 723 // find function operators 724 static NameExpr *opExpr = new NameExpr( "?()" ); 716 725 AlternativeFinder funcOpFinder( indexer, env ); 717 NameExpr *opExpr = new NameExpr( "?()" ); 718 try { 719 funcOpFinder.findWithAdjustment( opExpr ); 720 } catch( SemanticError &e ) { 721 // it's ok if there aren't any defined function ops 722 } 726 // it's ok if there aren't any defined function ops 727 funcOpFinder.maybeFind( opExpr); 723 728 PRINT( 724 729 std::cerr << "known function ops:" << std::endl; … … 928 933 AlternativeFinder finder( indexer, env ); 929 934 // don't prune here, since it's guaranteed all alternatives will have the same type 930 // (giving the alternatives different types is half of the point of ConstructorExpr nodes) 931 finder.findWithAdjustment( castExpr->get_arg(), false ); 935 finder.findWithoutPrune( castExpr->get_arg() ); 932 936 for ( Alternative & alt : finder.alternatives ) { 933 937 alternatives.push_back( Alternative( … … 1226 1230 // don't prune here, since it's guaranteed all alternatives will have the same type 1227 1231 // (giving the alternatives different types is half of the point of ConstructorExpr nodes) 1228 finder.findWith Adjustment( ctorExpr->get_callExpr(), false);1232 finder.findWithoutPrune( ctorExpr->get_callExpr() ); 1229 1233 for ( Alternative & alt : finder.alternatives ) { 1230 1234 alternatives.push_back( Alternative( new ConstructorExpr( alt.expr->clone() ), alt.env, alt.cost ) ); -
src/ResolvExpr/AlternativeFinder.h
ra6c5d7c r6e49f18 34 34 public: 35 35 AlternativeFinder( const SymTab::Indexer &indexer, const TypeEnvironment &env ); 36 void find( Expression *expr, bool adjust = false, bool prune = true );36 void find( Expression *expr, bool adjust = false, bool prune = true, bool failFast = true ); 37 37 /// Calls find with the adjust flag set; adjustment turns array and function types into equivalent pointer types 38 void findWithAdjustment( Expression *expr, bool prune = true ); 38 void findWithAdjustment( Expression *expr ); 39 /// Calls find with the adjust flag set and prune flag unset; pruning ensures there is at most one alternative per result type 40 void findWithoutPrune( Expression *expr ); 41 /// Calls find with the adjust and prune flags set, failFast flags unset; fail fast ensures that there is at least one resulting alternative 42 void maybeFind( Expression *expr ); 39 43 AltList &get_alternatives() { return alternatives; } 40 44 -
src/SymTab/Autogen.cc
ra6c5d7c r6e49f18 119 119 ObjectDecl *dstParam = new ObjectDecl( "_dst", Type::StorageClasses(), LinkageSpec::Cforall, nullptr, new ReferenceType( Type::Qualifiers(), paramType->clone() ), nullptr ); 120 120 ftype->get_parameters().push_back( dstParam ); 121 122 121 return ftype; 123 122 } -
src/SymTab/Autogen.h
ra6c5d7c r6e49f18 44 44 extern FunctionDecl * dereferenceOperator; 45 45 46 // temporary46 // generate the type of an assignment function for paramType 47 47 FunctionType * genAssignType( Type * paramType ); 48 49 // generate the type of a default constructor or destructor for paramType 50 FunctionType * genDefaultType( Type * paramType ); 51 52 // generate the type of a copy constructor for paramType 53 FunctionType * genCopyType( Type * paramType ); 48 54 49 55 /// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls. -
src/SynTree/Attribute.h
ra6c5d7c r6e49f18 20 20 #include <string> // for string, operator== 21 21 22 #include "BaseSyntaxNode.h" 23 #include "Mutator.h" 24 #include "Visitor.h" 25 22 26 class Expression; 23 27 24 28 // GCC attribute 25 29 // https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax 26 class Attribute {30 class Attribute : public BaseSyntaxNode { 27 31 public: 32 std::string name; 33 // to keep things nice and tight, use NameExpr for special identifier parameters 34 std::list< Expression * > parameters; 35 28 36 Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {} 29 37 Attribute( const Attribute &other ); … … 35 43 bool empty() const { return name == ""; } 36 44 37 Attribute * clone() const { return new Attribute( *this ); } 38 void print( std:: ostream &os, int indent = 0 ) const; 39 private: 40 std::string name; 41 // to keep things nice and tight, use NameExpr for special identifier parameters 42 std::list< Expression * > parameters; 45 Attribute * clone() const override { return new Attribute( *this ); } 46 virtual void accept( Visitor & v ) override { v.visit( this ); } 47 virtual Attribute * acceptMutator( Mutator & m ) override { return m.mutate( this ); } 48 virtual void print( std::ostream & os, int indent = 0 ) const override; 43 49 }; 44 50 -
src/SynTree/BaseSyntaxNode.h
ra6c5d7c r6e49f18 18 18 #include "Common/CodeLocation.h" 19 19 class Visitor; 20 class Mutator; 20 21 21 22 class BaseSyntaxNode { … … 25 26 virtual ~BaseSyntaxNode() {} 26 27 28 virtual BaseSyntaxNode * clone() const = 0; 27 29 virtual void accept( Visitor & v ) = 0; 28 virtual void print( std::ostream & os, int indent = 0 ) const = 0; 30 virtual BaseSyntaxNode * acceptMutator( Mutator & m ) = 0; 31 virtual void print( std::ostream & os, int indent = 0 ) const = 0; 29 32 }; 30 33 -
src/SynTree/Declaration.h
ra6c5d7c r6e49f18 61 61 62 62 void fixUniqueId( void ); 63 virtual Declaration *clone() const = 0;63 virtual Declaration *clone() const override = 0; 64 64 virtual void accept( Visitor &v ) override = 0; 65 virtual Declaration *acceptMutator( Mutator &m ) = 0;65 virtual Declaration *acceptMutator( Mutator &m ) override = 0; 66 66 virtual void print( std::ostream &os, int indent = 0 ) const override = 0; 67 67 virtual void printShort( std::ostream &os, int indent = 0 ) const = 0; … … 164 164 CompoundStmt *get_statements() const { return statements; } 165 165 void set_statements( CompoundStmt *newValue ) { statements = newValue; } 166 167 static FunctionDecl * newFunction( const std::string & name, FunctionType * type, CompoundStmt * statements ); 166 168 167 169 virtual FunctionDecl *clone() const override { return new FunctionDecl( *this ); } -
src/SynTree/Expression.h
ra6c5d7c r6e49f18 55 55 Expression * set_extension( bool exten ) { extension = exten; return this; } 56 56 57 virtual Expression * clone() const = 0;58 virtual void accept( Visitor & v ) = 0;59 virtual Expression * acceptMutator( Mutator & m ) = 0;60 virtual void print( std::ostream & os, int indent = 0 ) const ;57 virtual Expression * clone() const override = 0; 58 virtual void accept( Visitor & v ) override = 0; 59 virtual Expression * acceptMutator( Mutator & m ) override = 0; 60 virtual void print( std::ostream & os, int indent = 0 ) const override; 61 61 }; 62 62 -
src/SynTree/FunctionDecl.cc
ra6c5d7c r6e49f18 26 26 #include "Statement.h" // for CompoundStmt 27 27 #include "Type.h" // for Type, FunctionType, Type::FuncSpecif... 28 #include "VarExprReplacer.h" 28 29 29 30 extern bool translation_unit_nomain; … … 39 40 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 40 41 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 42 43 VarExprReplacer::DeclMap declMap; 44 for ( auto p : group_iterate( other.type->parameters, type->parameters ) ) { 45 declMap[ std::get<0>(p) ] = std::get<1>(p); 46 } 47 for ( auto p : group_iterate( other.type->returnVals, type->returnVals ) ) { 48 declMap[ std::get<0>(p) ] = std::get<1>(p); 49 } 50 if ( ! declMap.empty() ) { 51 VarExprReplacer replacer( declMap ); 52 accept( replacer ); 53 } 41 54 } 42 55 … … 44 57 delete type; 45 58 delete statements; 59 } 60 61 FunctionDecl * FunctionDecl::newFunction( const std::string & name, FunctionType * type, CompoundStmt * statements ) { 62 return new FunctionDecl( name, Type::StorageClasses(), LinkageSpec::C, type, statements ); 46 63 } 47 64 -
src/SynTree/Initializer.h
ra6c5d7c r6e49f18 37 37 std::list< Expression * > & get_designators() { return designators; } 38 38 39 virtual Designation * clone() const { return new Designation( *this ); };39 virtual Designation * clone() const override { return new Designation( *this ); }; 40 40 virtual void accept( Visitor &v ) override { v.visit( this ); } 41 virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }41 virtual Designation * acceptMutator( Mutator &m ) override { return m.mutate( this ); } 42 42 virtual void print( std::ostream &os, int indent = 0 ) const override; 43 43 }; … … 54 54 bool get_maybeConstructed() { return maybeConstructed; } 55 55 56 virtual Initializer *clone() const = 0;56 virtual Initializer *clone() const override = 0; 57 57 virtual void accept( Visitor &v ) override = 0; 58 virtual Initializer *acceptMutator( Mutator &m ) = 0;58 virtual Initializer *acceptMutator( Mutator &m ) override = 0; 59 59 virtual void print( std::ostream &os, int indent = 0 ) const override = 0; 60 60 private: … … 117 117 Statement * ctor; 118 118 Statement * dtor; 119 // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback 120 // if an appropriate constructor definition is not found by the resolver 121 Initializer * init; 119 122 120 123 ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init ); … … 135 138 136 139 private: 137 // C-style initializer made up of SingleInit and ListInit nodes to use as a fallback138 // if an appropriate constructor definition is not found by the resolver139 Initializer * init;140 140 }; 141 141 -
src/SynTree/Mutator.cc
ra6c5d7c r6e49f18 17 17 #include <list> // for list 18 18 19 #include "Attribute.h" // for Attribute 19 20 #include "Declaration.h" // for ObjectDecl, Declaration, DeclarationWi... 20 21 #include "Expression.h" // for Expression, ConstantExpr, ConditionalExpr … … 36 37 objectDecl->set_init( maybeMutate( objectDecl->get_init(), *this ) ); 37 38 objectDecl->set_bitfieldWidth( maybeMutate( objectDecl->get_bitfieldWidth(), *this ) ); 39 mutateAll( objectDecl->attributes, *this ); 38 40 return objectDecl; 39 41 } … … 42 44 functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) ); 43 45 functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) ); 46 mutateAll( functionDecl->attributes, *this ); 44 47 return functionDecl; 45 48 } … … 618 621 } 619 622 623 Attribute * Mutator::mutate( Attribute * attribute ) { 624 mutateAll( attribute->parameters, *this ); 625 return attribute; 626 } 627 620 628 // Local Variables: // 621 629 // tab-width: 4 // -
src/SynTree/Mutator.h
ra6c5d7c r6e49f18 25 25 virtual ~Mutator(); 26 26 public: 27 virtual DeclarationWithType * mutate( ObjectDecl *objectDecl );28 virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );29 virtual Declaration * mutate( StructDecl *aggregateDecl );30 virtual Declaration * mutate( UnionDecl *aggregateDecl );31 virtual Declaration * mutate( EnumDecl *aggregateDecl );32 virtual Declaration * mutate( TraitDecl *aggregateDecl );33 virtual Declaration * mutate( TypeDecl *typeDecl );34 virtual Declaration * mutate( TypedefDecl *typeDecl );35 virtual AsmDecl * mutate( AsmDecl *asmDecl );27 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ); 28 virtual DeclarationWithType * mutate( FunctionDecl * functionDecl ); 29 virtual Declaration * mutate( StructDecl * aggregateDecl ); 30 virtual Declaration * mutate( UnionDecl * aggregateDecl ); 31 virtual Declaration * mutate( EnumDecl * aggregateDecl ); 32 virtual Declaration * mutate( TraitDecl * aggregateDecl ); 33 virtual Declaration * mutate( TypeDecl * typeDecl ); 34 virtual Declaration * mutate( TypedefDecl * typeDecl ); 35 virtual AsmDecl * mutate( AsmDecl * asmDecl ); 36 36 37 virtual CompoundStmt * mutate( CompoundStmt *compoundStmt );38 virtual Statement * mutate( ExprStmt *exprStmt );39 virtual Statement * mutate( AsmStmt *asmStmt );40 virtual Statement * mutate( IfStmt *ifStmt );41 virtual Statement * mutate( WhileStmt *whileStmt );42 virtual Statement * mutate( ForStmt *forStmt );43 virtual Statement * mutate( SwitchStmt *switchStmt );44 virtual Statement * mutate( CaseStmt *caseStmt );45 virtual Statement * mutate( BranchStmt *branchStmt );46 virtual Statement * mutate( ReturnStmt *returnStmt );47 virtual Statement * mutate( ThrowStmt *throwStmt );48 virtual Statement * mutate( TryStmt *tryStmt );49 virtual Statement * mutate( CatchStmt *catchStmt );50 virtual Statement * mutate( FinallyStmt *catchStmt );51 virtual Statement * mutate( WaitForStmt *waitforStmt );52 virtual NullStmt * mutate( NullStmt *nullStmt );53 virtual Statement * mutate( DeclStmt *declStmt );54 virtual Statement * mutate( ImplicitCtorDtorStmt *impCtorDtorStmt );37 virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ); 38 virtual Statement * mutate( ExprStmt * exprStmt ); 39 virtual Statement * mutate( AsmStmt * asmStmt ); 40 virtual Statement * mutate( IfStmt * ifStmt ); 41 virtual Statement * mutate( WhileStmt * whileStmt ); 42 virtual Statement * mutate( ForStmt * forStmt ); 43 virtual Statement * mutate( SwitchStmt * switchStmt ); 44 virtual Statement * mutate( CaseStmt * caseStmt ); 45 virtual Statement * mutate( BranchStmt * branchStmt ); 46 virtual Statement * mutate( ReturnStmt * returnStmt ); 47 virtual Statement * mutate( ThrowStmt * throwStmt ); 48 virtual Statement * mutate( TryStmt * tryStmt ); 49 virtual Statement * mutate( CatchStmt * catchStmt ); 50 virtual Statement * mutate( FinallyStmt * catchStmt ); 51 virtual Statement * mutate( WaitForStmt * waitforStmt ); 52 virtual NullStmt * mutate( NullStmt * nullStmt ); 53 virtual Statement * mutate( DeclStmt * declStmt ); 54 virtual Statement * mutate( ImplicitCtorDtorStmt * impCtorDtorStmt ); 55 55 56 virtual Expression* mutate( ApplicationExpr * applicationExpr );57 virtual Expression* mutate( UntypedExpr * untypedExpr );58 virtual Expression* mutate( NameExpr * nameExpr );59 virtual Expression* mutate( AddressExpr * castExpr );60 virtual Expression* mutate( LabelAddressExpr * labAddressExpr );61 virtual Expression* mutate( CastExpr * castExpr );62 virtual Expression* mutate( VirtualCastExpr * castExpr );63 virtual Expression* mutate( UntypedMemberExpr * memberExpr );64 virtual Expression* mutate( MemberExpr * memberExpr );65 virtual Expression* mutate( VariableExpr * variableExpr );66 virtual Expression* mutate( ConstantExpr * constantExpr );67 virtual Expression* mutate( SizeofExpr * sizeofExpr );68 virtual Expression* mutate( AlignofExpr * alignofExpr );69 virtual Expression* mutate( UntypedOffsetofExpr * offsetofExpr );70 virtual Expression* mutate( OffsetofExpr * offsetofExpr );71 virtual Expression* mutate( OffsetPackExpr * offsetPackExpr );72 virtual Expression* mutate( AttrExpr * attrExpr );73 virtual Expression* mutate( LogicalExpr * logicalExpr );74 virtual Expression* mutate( ConditionalExpr * conditionalExpr );75 virtual Expression* mutate( CommaExpr * commaExpr );76 virtual Expression* mutate( TypeExpr * typeExpr );77 virtual Expression* mutate( AsmExpr * asmExpr );78 virtual Expression* mutate( ImplicitCopyCtorExpr * impCpCtorExpr );79 virtual Expression* mutate( ConstructorExpr * ctorExpr );80 virtual Expression* mutate( CompoundLiteralExpr * compLitExpr );81 virtual Expression* mutate( RangeExpr * rangeExpr );82 virtual Expression* mutate( UntypedTupleExpr * tupleExpr );83 virtual Expression* mutate( TupleExpr * tupleExpr );84 virtual Expression* mutate( TupleIndexExpr * tupleExpr );85 virtual Expression* mutate( TupleAssignExpr * assignExpr );86 virtual Expression* mutate( StmtExpr * stmtExpr );87 virtual Expression* mutate( UniqueExpr * uniqueExpr );88 virtual Expression* mutate( UntypedInitExpr * initExpr );89 virtual Expression* mutate( InitExpr * initExpr );56 virtual Expression* mutate( ApplicationExpr * applicationExpr ); 57 virtual Expression* mutate( UntypedExpr * untypedExpr ); 58 virtual Expression* mutate( NameExpr * nameExpr ); 59 virtual Expression* mutate( AddressExpr * castExpr ); 60 virtual Expression* mutate( LabelAddressExpr * labAddressExpr ); 61 virtual Expression* mutate( CastExpr * castExpr ); 62 virtual Expression* mutate( VirtualCastExpr * castExpr ); 63 virtual Expression* mutate( UntypedMemberExpr * memberExpr ); 64 virtual Expression* mutate( MemberExpr * memberExpr ); 65 virtual Expression* mutate( VariableExpr * variableExpr ); 66 virtual Expression* mutate( ConstantExpr * constantExpr ); 67 virtual Expression* mutate( SizeofExpr * sizeofExpr ); 68 virtual Expression* mutate( AlignofExpr * alignofExpr ); 69 virtual Expression* mutate( UntypedOffsetofExpr * offsetofExpr ); 70 virtual Expression* mutate( OffsetofExpr * offsetofExpr ); 71 virtual Expression* mutate( OffsetPackExpr * offsetPackExpr ); 72 virtual Expression* mutate( AttrExpr * attrExpr ); 73 virtual Expression* mutate( LogicalExpr * logicalExpr ); 74 virtual Expression* mutate( ConditionalExpr * conditionalExpr ); 75 virtual Expression* mutate( CommaExpr * commaExpr ); 76 virtual Expression* mutate( TypeExpr * typeExpr ); 77 virtual Expression* mutate( AsmExpr * asmExpr ); 78 virtual Expression* mutate( ImplicitCopyCtorExpr * impCpCtorExpr ); 79 virtual Expression* mutate( ConstructorExpr * ctorExpr ); 80 virtual Expression* mutate( CompoundLiteralExpr * compLitExpr ); 81 virtual Expression* mutate( RangeExpr * rangeExpr ); 82 virtual Expression* mutate( UntypedTupleExpr * tupleExpr ); 83 virtual Expression* mutate( TupleExpr * tupleExpr ); 84 virtual Expression* mutate( TupleIndexExpr * tupleExpr ); 85 virtual Expression* mutate( TupleAssignExpr * assignExpr ); 86 virtual Expression* mutate( StmtExpr * stmtExpr ); 87 virtual Expression* mutate( UniqueExpr * uniqueExpr ); 88 virtual Expression* mutate( UntypedInitExpr * initExpr ); 89 virtual Expression* mutate( InitExpr * initExpr ); 90 90 91 virtual Type * mutate( VoidType *basicType );92 virtual Type * mutate( BasicType *basicType );93 virtual Type * mutate( PointerType *pointerType );94 virtual Type * mutate( ArrayType *arrayType );95 virtual Type * mutate( ReferenceType *refType );96 virtual Type * mutate( FunctionType *functionType );97 virtual Type * mutate( StructInstType *aggregateUseType );98 virtual Type * mutate( UnionInstType *aggregateUseType );99 virtual Type * mutate( EnumInstType *aggregateUseType );100 virtual Type * mutate( TraitInstType *aggregateUseType );101 virtual Type * mutate( TypeInstType *aggregateUseType );102 virtual Type * mutate( TupleType *tupleType );103 virtual Type * mutate( TypeofType *typeofType );104 virtual Type * mutate( AttrType *attrType );105 virtual Type * mutate( VarArgsType *varArgsType );106 virtual Type * mutate( ZeroType *zeroType );107 virtual Type * mutate( OneType *oneType );91 virtual Type * mutate( VoidType * basicType ); 92 virtual Type * mutate( BasicType * basicType ); 93 virtual Type * mutate( PointerType * pointerType ); 94 virtual Type * mutate( ArrayType * arrayType ); 95 virtual Type * mutate( ReferenceType * refType ); 96 virtual Type * mutate( FunctionType * functionType ); 97 virtual Type * mutate( StructInstType * aggregateUseType ); 98 virtual Type * mutate( UnionInstType * aggregateUseType ); 99 virtual Type * mutate( EnumInstType * aggregateUseType ); 100 virtual Type * mutate( TraitInstType * aggregateUseType ); 101 virtual Type * mutate( TypeInstType * aggregateUseType ); 102 virtual Type * mutate( TupleType * tupleType ); 103 virtual Type * mutate( TypeofType * typeofType ); 104 virtual Type * mutate( AttrType * attrType ); 105 virtual Type * mutate( VarArgsType * varArgsType ); 106 virtual Type * mutate( ZeroType * zeroType ); 107 virtual Type * mutate( OneType * oneType ); 108 108 109 virtual Designation * mutate( Designation *designation );110 virtual Initializer * mutate( SingleInit *singleInit );111 virtual Initializer * mutate( ListInit *listInit );112 virtual Initializer * mutate( ConstructorInit *ctorInit );109 virtual Designation * mutate( Designation * designation ); 110 virtual Initializer * mutate( SingleInit * singleInit ); 111 virtual Initializer * mutate( ListInit * listInit ); 112 virtual Initializer * mutate( ConstructorInit * ctorInit ); 113 113 114 virtual Subrange * mutate( Subrange *subrange );114 virtual Subrange * mutate( Subrange * subrange ); 115 115 116 virtual Constant *mutate( Constant *constant ); 116 virtual Constant * mutate( Constant * constant ); 117 118 virtual Attribute * mutate( Attribute * attribute ); 117 119 private: 118 virtual Declaration * handleAggregateDecl(AggregateDecl *aggregateDecl );119 virtual Declaration * handleNamedTypeDecl(NamedTypeDecl *typeDecl );120 virtual Type * handleReferenceToType(ReferenceToType *aggregateUseType );120 virtual Declaration * handleAggregateDecl(AggregateDecl * aggregateDecl ); 121 virtual Declaration * handleNamedTypeDecl(NamedTypeDecl * typeDecl ); 122 virtual Type * handleReferenceToType(ReferenceToType * aggregateUseType ); 121 123 }; 122 124 -
src/SynTree/Statement.h
ra6c5d7c r6e49f18 43 43 const std::list<Label> & get_labels() const { return labels; } 44 44 45 virtual Statement *clone() const = 0;45 virtual Statement *clone() const override = 0; 46 46 virtual void accept( Visitor &v ) override = 0; 47 virtual Statement *acceptMutator( Mutator &m ) = 0;47 virtual Statement *acceptMutator( Mutator &m ) override = 0; 48 48 virtual void print( std::ostream &os, int indent = 0 ) const override; 49 49 }; -
src/SynTree/VarExprReplacer.h
ra6c5d7c r6e49f18 29 29 private: 30 30 const DeclMap & declMap; 31 31 bool debug; 32 32 public: 33 33 VarExprReplacer( const DeclMap & declMap, bool debug = false ); … … 35 35 // replace variable with new node from decl map 36 36 virtual void visit( VariableExpr * varExpr ); 37 38 static void replace( BaseSyntaxNode * node, const DeclMap & declMap, bool debug = false ) { 39 VarExprReplacer replacer( declMap, debug ); 40 maybeAccept( node, replacer ); 41 } 37 42 }; 38 43 -
src/SynTree/Visitor.cc
ra6c5d7c r6e49f18 17 17 #include <list> // for list 18 18 19 #include "Attribute.h" // for Attribute 19 20 #include "Constant.h" // for Constant 20 21 #include "Declaration.h" // for DeclarationWithType, ObjectDecl, Declaration … … 35 36 maybeAccept( objectDecl->get_init(), *this ); 36 37 maybeAccept( objectDecl->get_bitfieldWidth(), *this ); 38 acceptAll( objectDecl->attributes, *this ); 37 39 } 38 40 … … 40 42 maybeAccept( functionDecl->get_functionType(), *this ); 41 43 maybeAccept( functionDecl->get_statements(), *this ); 44 acceptAll( functionDecl->attributes, *this ); 42 45 } 43 46 … … 487 490 488 491 489 void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {} 490 491 492 void Visitor::visit( __attribute__((unused)) Constant *constant ) {} 492 void Visitor::visit( Subrange * ) {} 493 494 495 void Visitor::visit( Constant * ) {} 496 497 void Visitor::visit( Attribute * attribute ) { 498 acceptAll( attribute->parameters, *this ); 499 } 500 493 501 // Local Variables: // 494 502 // tab-width: 4 // -
src/SynTree/Visitor.h
ra6c5d7c r6e49f18 27 27 // of the given syntax node, but performs no other action. 28 28 29 virtual void visit( ObjectDecl * objectDecl );30 virtual void visit( FunctionDecl * functionDecl );31 virtual void visit( StructDecl * aggregateDecl );32 virtual void visit( UnionDecl * aggregateDecl );33 virtual void visit( EnumDecl * aggregateDecl );34 virtual void visit( TraitDecl * aggregateDecl );35 virtual void visit( TypeDecl * typeDecl );36 virtual void visit( TypedefDecl * typeDecl );37 virtual void visit( AsmDecl * asmDecl );29 virtual void visit( ObjectDecl * objectDecl ); 30 virtual void visit( FunctionDecl * functionDecl ); 31 virtual void visit( StructDecl * aggregateDecl ); 32 virtual void visit( UnionDecl * aggregateDecl ); 33 virtual void visit( EnumDecl * aggregateDecl ); 34 virtual void visit( TraitDecl * aggregateDecl ); 35 virtual void visit( TypeDecl * typeDecl ); 36 virtual void visit( TypedefDecl * typeDecl ); 37 virtual void visit( AsmDecl * asmDecl ); 38 38 39 virtual void visit( CompoundStmt * compoundStmt );40 virtual void visit( ExprStmt * exprStmt );41 virtual void visit( AsmStmt * asmStmt );42 virtual void visit( IfStmt * ifStmt );43 virtual void visit( WhileStmt * whileStmt );44 virtual void visit( ForStmt * forStmt );45 virtual void visit( SwitchStmt * switchStmt );46 virtual void visit( CaseStmt * caseStmt );47 virtual void visit( BranchStmt * branchStmt );48 virtual void visit( ReturnStmt * returnStmt );49 virtual void visit( ThrowStmt * throwStmt );50 virtual void visit( TryStmt * tryStmt );51 virtual void visit( CatchStmt * catchStmt );52 virtual void visit( FinallyStmt * finallyStmt );53 virtual void visit( WaitForStmt * waitforStmt );54 virtual void visit( NullStmt * nullStmt );55 virtual void visit( DeclStmt * declStmt );56 virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt );39 virtual void visit( CompoundStmt * compoundStmt ); 40 virtual void visit( ExprStmt * exprStmt ); 41 virtual void visit( AsmStmt * asmStmt ); 42 virtual void visit( IfStmt * ifStmt ); 43 virtual void visit( WhileStmt * whileStmt ); 44 virtual void visit( ForStmt * forStmt ); 45 virtual void visit( SwitchStmt * switchStmt ); 46 virtual void visit( CaseStmt * caseStmt ); 47 virtual void visit( BranchStmt * branchStmt ); 48 virtual void visit( ReturnStmt * returnStmt ); 49 virtual void visit( ThrowStmt * throwStmt ); 50 virtual void visit( TryStmt * tryStmt ); 51 virtual void visit( CatchStmt * catchStmt ); 52 virtual void visit( FinallyStmt * finallyStmt ); 53 virtual void visit( WaitForStmt * waitforStmt ); 54 virtual void visit( NullStmt * nullStmt ); 55 virtual void visit( DeclStmt * declStmt ); 56 virtual void visit( ImplicitCtorDtorStmt * impCtorDtorStmt ); 57 57 58 virtual void visit( ApplicationExpr * applicationExpr );59 virtual void visit( UntypedExpr * untypedExpr );60 virtual void visit( NameExpr * nameExpr );61 virtual void visit( CastExpr * castExpr );62 virtual void visit( VirtualCastExpr * castExpr );63 virtual void visit( AddressExpr * addressExpr );64 virtual void visit( LabelAddressExpr * labAddressExpr );65 virtual void visit( UntypedMemberExpr * memberExpr );66 virtual void visit( MemberExpr * memberExpr );67 virtual void visit( VariableExpr * variableExpr );68 virtual void visit( ConstantExpr * constantExpr );69 virtual void visit( SizeofExpr * sizeofExpr );70 virtual void visit( AlignofExpr * alignofExpr );71 virtual void visit( UntypedOffsetofExpr * offsetofExpr );72 virtual void visit( OffsetofExpr * offsetofExpr );73 virtual void visit( OffsetPackExpr * offsetPackExpr );74 virtual void visit( AttrExpr * attrExpr );75 virtual void visit( LogicalExpr * logicalExpr );76 virtual void visit( ConditionalExpr * conditionalExpr );77 virtual void visit( CommaExpr * commaExpr );78 virtual void visit( TypeExpr * typeExpr );79 virtual void visit( AsmExpr * asmExpr );80 virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );81 virtual void visit( ConstructorExpr * ctorExpr );82 virtual void visit( CompoundLiteralExpr * compLitExpr );83 virtual void visit( RangeExpr * rangeExpr );84 virtual void visit( UntypedTupleExpr * tupleExpr );85 virtual void visit( TupleExpr * tupleExpr );86 virtual void visit( TupleIndexExpr * tupleExpr );87 virtual void visit( TupleAssignExpr * assignExpr );88 virtual void visit( StmtExpr * stmtExpr );89 virtual void visit( UniqueExpr * uniqueExpr );90 virtual void visit( UntypedInitExpr * initExpr );91 virtual void visit( InitExpr * initExpr );58 virtual void visit( ApplicationExpr * applicationExpr ); 59 virtual void visit( UntypedExpr * untypedExpr ); 60 virtual void visit( NameExpr * nameExpr ); 61 virtual void visit( CastExpr * castExpr ); 62 virtual void visit( VirtualCastExpr * castExpr ); 63 virtual void visit( AddressExpr * addressExpr ); 64 virtual void visit( LabelAddressExpr * labAddressExpr ); 65 virtual void visit( UntypedMemberExpr * memberExpr ); 66 virtual void visit( MemberExpr * memberExpr ); 67 virtual void visit( VariableExpr * variableExpr ); 68 virtual void visit( ConstantExpr * constantExpr ); 69 virtual void visit( SizeofExpr * sizeofExpr ); 70 virtual void visit( AlignofExpr * alignofExpr ); 71 virtual void visit( UntypedOffsetofExpr * offsetofExpr ); 72 virtual void visit( OffsetofExpr * offsetofExpr ); 73 virtual void visit( OffsetPackExpr * offsetPackExpr ); 74 virtual void visit( AttrExpr * attrExpr ); 75 virtual void visit( LogicalExpr * logicalExpr ); 76 virtual void visit( ConditionalExpr * conditionalExpr ); 77 virtual void visit( CommaExpr * commaExpr ); 78 virtual void visit( TypeExpr * typeExpr ); 79 virtual void visit( AsmExpr * asmExpr ); 80 virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ); 81 virtual void visit( ConstructorExpr * ctorExpr ); 82 virtual void visit( CompoundLiteralExpr * compLitExpr ); 83 virtual void visit( RangeExpr * rangeExpr ); 84 virtual void visit( UntypedTupleExpr * tupleExpr ); 85 virtual void visit( TupleExpr * tupleExpr ); 86 virtual void visit( TupleIndexExpr * tupleExpr ); 87 virtual void visit( TupleAssignExpr * assignExpr ); 88 virtual void visit( StmtExpr * stmtExpr ); 89 virtual void visit( UniqueExpr * uniqueExpr ); 90 virtual void visit( UntypedInitExpr * initExpr ); 91 virtual void visit( InitExpr * initExpr ); 92 92 93 virtual void visit( VoidType * basicType );94 virtual void visit( BasicType * basicType );95 virtual void visit( PointerType * pointerType );96 virtual void visit( ArrayType * arrayType );97 virtual void visit( ReferenceType * refType );98 virtual void visit( FunctionType * functionType );99 virtual void visit( StructInstType * aggregateUseType );100 virtual void visit( UnionInstType * aggregateUseType );101 virtual void visit( EnumInstType * aggregateUseType );102 virtual void visit( TraitInstType * aggregateUseType );103 virtual void visit( TypeInstType * aggregateUseType );104 virtual void visit( TupleType * tupleType );105 virtual void visit( TypeofType * typeofType );106 virtual void visit( AttrType * attrType );107 virtual void visit( VarArgsType * varArgsType );108 virtual void visit( ZeroType * zeroType );109 virtual void visit( OneType * oneType );93 virtual void visit( VoidType * basicType ); 94 virtual void visit( BasicType * basicType ); 95 virtual void visit( PointerType * pointerType ); 96 virtual void visit( ArrayType * arrayType ); 97 virtual void visit( ReferenceType * refType ); 98 virtual void visit( FunctionType * functionType ); 99 virtual void visit( StructInstType * aggregateUseType ); 100 virtual void visit( UnionInstType * aggregateUseType ); 101 virtual void visit( EnumInstType * aggregateUseType ); 102 virtual void visit( TraitInstType * aggregateUseType ); 103 virtual void visit( TypeInstType * aggregateUseType ); 104 virtual void visit( TupleType * tupleType ); 105 virtual void visit( TypeofType * typeofType ); 106 virtual void visit( AttrType * attrType ); 107 virtual void visit( VarArgsType * varArgsType ); 108 virtual void visit( ZeroType * zeroType ); 109 virtual void visit( OneType * oneType ); 110 110 111 virtual void visit( Designation * designation );112 virtual void visit( SingleInit * singleInit );113 virtual void visit( ListInit * listInit );114 virtual void visit( ConstructorInit * ctorInit );111 virtual void visit( Designation * designation ); 112 virtual void visit( SingleInit * singleInit ); 113 virtual void visit( ListInit * listInit ); 114 virtual void visit( ConstructorInit * ctorInit ); 115 115 116 virtual void visit( Subrange * subrange );116 virtual void visit( Subrange * subrange ); 117 117 118 virtual void visit( Constant *constant ); 118 virtual void visit( Constant * constant ); 119 120 virtual void visit( Attribute * attribute ); 119 121 private: 120 122 virtual void handleAggregateDecl( AggregateDecl *aggregateDecl ); -
src/libcfa/concurrency/invoke.h
ra6c5d7c r6e49f18 110 110 struct monitor_desc self_mon; // monitor body used for mutual exclusion 111 111 struct monitor_desc * self_mon_p; // pointer to monitor with sufficient lifetime for current monitors 112 struct __monitor_group_t monitors; 112 struct __monitor_group_t monitors; // monitors currently held by this thread 113 113 114 114 // Link lists fields -
src/tests/sched-ext-barge.c
ra6c5d7c r6e49f18 1 //--------------------------------------------------------- 2 // Barging test 3 // Ensures that no barging can occur between : 4 // - the frontend of the waitfor and the waited call 5 // - the waited call and the backend of the waitfor 6 //--------------------------------------------------------- 7 1 8 #include <fstream> 2 9 #include <kernel> -
src/tests/sched-ext-parse.c
ra6c5d7c r6e49f18 1 //---------------------------------------------------------------------------------------- 2 //---------------------------------------------------------------------------------------- 3 // 4 // DEPRECATED TEST 5 // DIFFERS BETWEEN DEBUG AND RELEASE 6 // 7 //---------------------------------------------------------------------------------------- 8 //---------------------------------------------------------------------------------------- 9 1 10 #include <monitor> 2 11 -
src/tests/sched-int-barge.c
ra6c5d7c r6e49f18 1 //---------------------------------------------------------------------------------------- 2 //---------------------------------------------------------------------------------------- 3 // 4 // DEPRECATED TEST 5 // 6 //---------------------------------------------------------------------------------------- 7 //---------------------------------------------------------------------------------------- 8 1 9 #include <fstream> 2 10 #include <kernel> -
src/tests/sched-int-block.c
ra6c5d7c r6e49f18 1 //--------------------------------------------------------- 2 // Barging test 3 // Ensures that no barging can occur between : 4 // - the frontend of the signal_block and the signaled thread 5 // - the signaled threadand the backend of the signal_block 6 //--------------------------------------------------------- 7 8 1 9 #include <fstream> 2 10 #include <kernel> -
src/tests/sched-int-wait.c
ra6c5d7c r6e49f18 1 //--------------------------------------------------------- 2 // Multi wait test 3 // Ensures that no deadlock from waiting/signalling conditions 4 //--------------------------------------------------------- 5 6 1 7 #include <fstream> 2 8 #include <kernel>
Note: See TracChangeset
for help on using the changeset viewer.