Changes in / [00675a1:3b80db8]
- Files:
-
- 4 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/plot.py
r00675a1 r3b80db8 33 33 "Ops per threads" : Field('Ops' , 0, False), 34 34 "ns per ops/procs" : Field('ns' , 0, False), 35 "Number of threads" : Field(' ', 1, False),35 "Number of threads" : Field('thrd' , 1, False), 36 36 "Total Operations(ops)" : Field('Ops' , 0, False), 37 37 "Ops/sec/procs" : Field('Ops' , 0, False), … … 40 40 "Cycle size (# thrds)" : Field('thrd' , 1, False), 41 41 "Duration (ms)" : Field('ms' , 0, False), 42 "Target QPS" : Field('' , 0, False), 43 "Actual QPS" : Field('' , 0, False), 44 "Average Read Latency" : Field('us' , 0, True), 42 "Target QPS" : Field('QPS' , 0, False), 43 "Actual QPS" : Field('QPS' , 0, False), 45 44 "Median Read Latency" : Field('us' , 0, True), 46 45 "Tail Read Latency" : Field('us' , 0, True), 47 "Average Update Latency": Field('us' , 0, True),48 46 "Median Update Latency" : Field('us' , 0, True), 49 47 "Tail Update Latency" : Field('us' , 0, True), 50 "Update Ratio" : Field('\%' , 0, False),51 48 } 52 49 … … 95 92 print("Making Plots") 96 93 97 for name, data in s orted(series.items()):94 for name, data in series.items(): 98 95 _col = next(colors) 99 96 plt.scatter(data['x'], data['y'], color=_col, label=name, marker='x') -
benchmark/process-mutilate.py
r00675a1 r3b80db8 14 14 parser = argparse.ArgumentParser(description='Python Script to convert output from mutilate to rmit like output') 15 15 parser.add_argument('--out', nargs='?', type=argparse.FileType('w'), default=sys.stdout) 16 parser.add_argument('--var', nargs='?', type=str, default='Target QPS')17 16 try: 18 17 options = parser.parse_args() … … 32 31 33 32 try: 34 latAvs = fields[1]35 33 lat50s = fields[6] 36 34 lat99s = fields[9] … … 39 37 40 38 try: 41 latAv = locale.atof(latAvs)42 39 lat50 = locale.atof(lat50s) 43 40 lat99 = locale.atof(lat99s) … … 45 42 raise Warning("Warning: \"{}\" \"{}\"! can't convert to float".format(lat50s, lat99s)) 46 43 47 return lat Av, lat50, lat9944 return lat50, lat99 48 45 49 46 def want0(line): … … 61 58 try: 62 59 if line.startswith("read"): 63 rlat Av, rlat50, rlat99 = precentile(line)60 rlat50, rlat99 = precentile(line) 64 61 65 62 elif line.startswith("update"): 66 ulat Av, ulat50, ulat99 = precentile(line)63 ulat50, ulat99 = precentile(line) 67 64 68 65 elif line.startswith("Total QPS"): … … 87 84 88 85 try: 89 out['Average Read Latency'] = rlatAv90 86 out['Median Read Latency'] = rlat50 91 87 out['Tail Read Latency'] = rlat99 … … 94 90 95 91 try: 96 out['Average Update Latency'] = ulatAv97 92 out['Median Update Latency'] = ulat50 98 93 out['Tail Update Latency'] = ulat99 … … 117 112 continue 118 113 119 d = { options.var: int(rate) }114 d = { 'Target QPS': int(rate) } 120 115 121 116 w = extract( f, d ) -
libcfa/src/concurrency/io.cfa
r00675a1 r3b80db8 244 244 245 245 remote = true; 246 __STATS__( true, io.calls.helped++; )246 __STATS__( false, io.calls.helped++; ) 247 247 } 248 248 proc->io.target = MAX; -
libcfa/src/concurrency/locks.cfa
r00675a1 r3b80db8 220 220 221 221 //----------------------------------------------------------------------------- 222 // Synchronization Locks222 // condition variable 223 223 forall(L & | is_blocking_lock(L)) { 224 224 225 //-----------------------------------------------------------------------------226 // condition variable227 225 void ?{}( condition_variable(L) & this ){ 228 226 this.lock{}; … … 339 337 bool wait( condition_variable(L) & this, L & l, Duration duration ) with(this) { WAIT_TIME( 0 , &l , duration ) } 340 338 bool wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration ) with(this) { WAIT_TIME( info, &l , duration ) } 341 342 //-----------------------------------------------------------------------------343 // fast_cond_var344 void ?{}( fast_cond_var(L) & this ){345 this.blocked_threads{};346 #ifdef __CFA_DEBUG__347 this.lock_used = 0p;348 #endif349 }350 void ^?{}( fast_cond_var(L) & this ){ }351 352 bool notify_one( fast_cond_var(L) & this ) with(this) {353 bool ret = ! blocked_threads`isEmpty;354 if ( ret ) {355 info_thread(L) & popped = try_pop_front( blocked_threads );356 on_notify(*popped.lock, popped.t);357 }358 return ret;359 }360 bool notify_all( fast_cond_var(L) & this ) with(this) {361 bool ret = ! blocked_threads`isEmpty;362 while( ! blocked_threads`isEmpty ) {363 info_thread(L) & popped = try_pop_front( blocked_threads );364 on_notify(*popped.lock, popped.t);365 }366 return ret;367 }368 369 uintptr_t front( fast_cond_var(L) & this ) with(this) { return blocked_threads`isEmpty ? NULL : blocked_threads`first.info; }370 bool empty ( fast_cond_var(L) & this ) with(this) { return blocked_threads`isEmpty; }371 372 void wait( fast_cond_var(L) & this, L & l ) {373 wait( this, l, 0 );374 }375 376 void wait( fast_cond_var(L) & this, L & l, uintptr_t info ) with(this) {377 // brand cond lock with lock378 #ifdef __CFA_DEBUG__379 if ( lock_used == 0p ) lock_used = &l;380 else { assert(lock_used == &l); }381 #endif382 info_thread( L ) i = { active_thread(), info, &l };383 insert_last( blocked_threads, i );384 size_t recursion_count = on_wait( *i.lock );385 park( );386 on_wakeup(*i.lock, recursion_count);387 }388 339 } 389 340 -
libcfa/src/concurrency/locks.hfa
r00675a1 r3b80db8 73 73 static inline void on_notify( owner_lock & this, struct thread$ * t ) { on_notify( (blocking_lock &)this, t ); } 74 74 75 //-----------------------------------------------------------------------------76 // MCS Lock77 75 struct mcs_node { 78 76 mcs_node * volatile next; … … 100 98 } 101 99 102 //-----------------------------------------------------------------------------103 // Linear backoff Spinlock104 100 struct linear_backoff_then_block_lock { 105 101 // Spin lock used for mutual exclusion … … 203 199 204 200 //----------------------------------------------------------------------------- 205 // Fast Block Lock206 207 // High efficiency minimal blocking lock208 // - No reacquire for cond var209 // - No recursive acquisition210 // - No ownership211 struct fast_block_lock {212 // Spin lock used for mutual exclusion213 __spinlock_t lock;214 215 // List of blocked threads216 dlist( thread$ ) blocked_threads;217 218 bool held:1;219 };220 221 static inline void ?{}( fast_block_lock & this ) with(this) {222 lock{};223 blocked_threads{};224 held = false;225 }226 static inline void ^?{}( fast_block_lock & this ) {}227 static inline void ?{}( fast_block_lock & this, fast_block_lock this2 ) = void;228 static inline void ?=?( fast_block_lock & this, fast_block_lock this2 ) = void;229 230 // if this is called recursively IT WILL DEADLOCK!!!!!231 static inline void lock(fast_block_lock & this) with(this) {232 lock( lock __cfaabi_dbg_ctx2 );233 if (held) {234 insert_last( blocked_threads, *active_thread() );235 unlock( lock );236 park( );237 return;238 }239 held = true;240 unlock( lock );241 }242 243 static inline void unlock(fast_block_lock & this) with(this) {244 lock( lock __cfaabi_dbg_ctx2 );245 /* paranoid */ verifyf( held != false, "Attempt to release lock %p that isn't held", &this );246 thread$ * t = &try_pop_front( blocked_threads );247 held = ( t ? true : false );248 unpark( t );249 unlock( lock );250 }251 252 static inline void on_notify(fast_block_lock & this, struct thread$ * t ) { unpark(t); }253 static inline size_t on_wait(fast_block_lock & this) { unlock(this); return 0; }254 static inline void on_wakeup(fast_block_lock & this, size_t recursion ) { }255 256 //-----------------------------------------------------------------------------257 201 // is_blocking_lock 258 202 trait is_blocking_lock(L & | sized(L)) { … … 282 226 // Synchronization Locks 283 227 forall(L & | is_blocking_lock(L)) { 284 285 //-----------------------------------------------------------------------------286 // condition_variable287 288 // The multi-tool condition variable289 // - can pass timeouts to wait for either a signal or timeout290 // - can wait without passing a lock291 // - can have waiters reacquire different locks while waiting on the same cond var292 // - has shadow queue293 // - can be signalled outside of critical sections with no locks held294 228 struct condition_variable { 295 229 // Spin lock used for mutual exclusion … … 324 258 bool wait( condition_variable(L) & this, L & l, Duration duration ); 325 259 bool wait( condition_variable(L) & this, L & l, uintptr_t info, Duration duration ); 326 327 //----------------------------------------------------------------------------- 328 // fast_cond_var 329 330 // The trimmed and slim condition variable 331 // - no internal lock so you must hold a lock while using this cond var 332 // - signalling without holding branded lock is UNSAFE! 333 // - only allows usage of one lock, cond var is branded after usage 334 struct fast_cond_var { 335 // List of blocked threads 336 dlist( info_thread(L) ) blocked_threads; 337 338 #ifdef __CFA_DEBUG__ 339 L * lock_used; 340 #endif 341 }; 342 343 344 void ?{}( fast_cond_var(L) & this ); 345 void ^?{}( fast_cond_var(L) & this ); 346 347 bool notify_one( fast_cond_var(L) & this ); 348 bool notify_all( fast_cond_var(L) & this ); 349 350 uintptr_t front( fast_cond_var(L) & this ); 351 352 bool empty ( fast_cond_var(L) & this ); 353 354 void wait( fast_cond_var(L) & this, L & l ); 355 void wait( fast_cond_var(L) & this, L & l, uintptr_t info ); 356 } 260 } -
libcfa/src/concurrency/ready_subqueue.hfa
r00675a1 r3b80db8 83 83 /* paranoid */ verify( node->link.ts != 0 ); 84 84 /* paranoid */ verify( this.anchor.ts != 0 ); 85 /* paranoid */ verify( (this.anchor.ts == MAX) == is_empty );86 85 return [node, this.anchor.ts]; 87 86 } … … 94 93 // Return the timestamp 95 94 static inline unsigned long long ts(__intrusive_lane_t & this) { 96 // Cannot verify 'emptiness'here since it may not be locked95 // Cannot verify here since it may not be locked 97 96 /* paranoid */ verify(this.anchor.ts != 0); 98 97 return this.anchor.ts; -
src/AST/Convert.cpp
r00675a1 r3b80db8 93 93 }; 94 94 95 96 97 98 95 template<typename T> 96 Getter<T> get() { 97 return Getter<T>{ *this }; 98 } 99 99 100 100 Label makeLabel(Statement * labelled, const ast::Label& label) { … … 1651 1651 // GET_ACCEPT_1(type, FunctionType), 1652 1652 std::move(forall), 1653 std::move(assertions),1654 1653 std::move(paramVars), 1655 1654 std::move(returnVars), … … 1665 1664 cache.emplace( old, decl ); 1666 1665 1666 decl->assertions = std::move(assertions); 1667 1667 decl->withExprs = GET_ACCEPT_V(withExprs, Expr); 1668 1668 decl->stmts = GET_ACCEPT_1(statements, CompoundStmt); -
src/AST/Copy.cpp
r00675a1 r3b80db8 10 10 // Created On : Thr Nov 11 9:16:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : T ue May 3 16:28:00 202213 // Update Count : 112 // Last Modified On : Thr Nov 11 9:28:00 2021 13 // Update Count : 0 14 14 // 15 15 … … 77 77 } 78 78 79 void postvisit( const UniqueExpr * node ) {80 readonlyInsert( &node->object );81 }82 83 79 void postvisit( const MemberExpr * node ) { 84 80 readonlyInsert( &node->member ); -
src/AST/Decl.cpp
r00675a1 r3b80db8 9 9 // Author : Aaron B. Moss 10 10 // Created On : Thu May 9 10:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : T hu May 5 12:10:00 202213 // Update Count : 2 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jan 12 16:54:55 2021 13 // Update Count : 23 14 14 // 15 15 … … 53 53 // --- FunctionDecl 54 54 55 FunctionDecl::FunctionDecl( const CodeLocation & loc, const std::string & name, 55 FunctionDecl::FunctionDecl( const CodeLocation & loc, const std::string & name, 56 56 std::vector<ptr<TypeDecl>>&& forall, 57 57 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, … … 74 74 } 75 75 this->type = ftype; 76 }77 78 FunctionDecl::FunctionDecl( const CodeLocation & location, const std::string & name,79 std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions,80 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns,81 CompoundStmt * stmts, Storage::Classes storage, Linkage::Spec linkage,82 std::vector<ptr<Attribute>>&& attrs, Function::Specs fs, bool isVarArgs)83 : DeclWithType( location, name, storage, linkage, std::move(attrs), fs ),84 params( std::move(params) ), returns( std::move(returns) ),85 type_params( std::move( forall) ), assertions( std::move( assertions ) ),86 type( nullptr ), stmts( stmts ) {87 FunctionType * type = new FunctionType( (isVarArgs) ? VariableArgs : FixedArgs );88 for ( auto & param : this->params ) {89 type->params.emplace_back( param->get_type() );90 }91 for ( auto & ret : this->returns ) {92 type->returns.emplace_back( ret->get_type() );93 }94 for ( auto & param : this->type_params ) {95 type->forall.emplace_back( new TypeInstType( param ) );96 }97 for ( auto & assertion : this->assertions ) {98 type->assertions.emplace_back(99 new VariableExpr( assertion->location, assertion ) );100 }101 this->type = type;102 76 } 103 77 -
src/AST/Decl.hpp
r00675a1 r3b80db8 9 9 // Author : Aaron B. Moss 10 10 // Created On : Thu May 9 10:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thu May 5 12:09:00 202213 // Update Count : 3 311 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 12 18:25:05 2021 13 // Update Count : 32 14 14 // 15 15 … … 135 135 std::vector< ptr<Expr> > withExprs; 136 136 137 // The difference between the two constructors is in how they handle138 // assertions. The first constructor uses the assertions from the type139 // parameters, in the style of the old ast, and puts them on the type.140 // The second takes an explicite list of assertions and builds a list of141 // references to them on the type.142 143 137 FunctionDecl( const CodeLocation & loc, const std::string & name, std::vector<ptr<TypeDecl>>&& forall, 144 138 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, 145 139 CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C, 146 140 std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false); 147 148 FunctionDecl( const CodeLocation & location, const std::string & name, 149 std::vector<ptr<TypeDecl>>&& forall, std::vector<ptr<DeclWithType>>&& assertions, 150 std::vector<ptr<DeclWithType>>&& params, std::vector<ptr<DeclWithType>>&& returns, 151 CompoundStmt * stmts, Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::C, 152 std::vector<ptr<Attribute>>&& attrs = {}, Function::Specs fs = {}, bool isVarArgs = false); 141 // : DeclWithType( loc, name, storage, linkage, std::move(attrs), fs ), params(std::move(params)), returns(std::move(returns)), 142 // stmts( stmts ) {} 153 143 154 144 const Type * get_type() const override; -
src/AST/Expr.hpp
r00675a1 r3b80db8 784 784 public: 785 785 ptr<Expr> expr; 786 readonly<ObjectDecl> object;786 ptr<ObjectDecl> object; 787 787 ptr<VariableExpr> var; 788 788 unsigned long long id; -
src/AST/Node.hpp
r00675a1 r3b80db8 10 10 // Created On : Wed May 8 10:27:04 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon May 9 10:20:00 202213 // Update Count : 812 // Last Modified On : Fri Mar 25 10:33:00 2022 13 // Update Count : 7 14 14 // 15 15 … … 49 49 50 50 bool unique() const { return strong_count == 1; } 51 bool isManaged() const { return strong_count > 0; } 52 bool isReferenced() const { return weak_count > 0; } 51 bool isManaged() const {return strong_count > 0; } 53 52 54 53 private: -
src/AST/Stmt.cpp
r00675a1 r3b80db8 9 9 // Author : Aaron B. Moss 10 10 // Created On : Wed May 8 13:00:00 2019 11 // Last Modified By : Andrew Beach12 // Last Modified On : Tue May 3 15:18:20 202213 // Update Count : 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 2 19:01:20 2022 13 // Update Count : 3 14 14 // 15 15 16 16 #include "Stmt.hpp" 17 17 18 #include "Copy.hpp" 18 19 19 #include "DeclReplacer.hpp" 20 20 #include "Type.hpp" … … 23 23 24 24 // --- CompoundStmt 25 CompoundStmt::CompoundStmt( const CompoundStmt& other ) : Stmt(other), kids() { 26 // Statements can have weak references to them, if that happens inserting 27 // the original node into the new list will put the original node in a 28 // bad state, where it cannot be mutated. To avoid this, just perform an 29 // additional shallow copy on the statement. 30 for ( const Stmt * kid : other.kids ) { 31 if ( kid->isReferenced() ) { 32 kids.emplace_back( ast::shallowCopy( kid ) ); 33 } else { 34 kids.emplace_back( kid ); 35 } 36 } 37 25 CompoundStmt::CompoundStmt( const CompoundStmt& other ) : Stmt(other), kids(other.kids) { 38 26 // when cloning a compound statement, we may end up cloning declarations which 39 27 // are referred to by VariableExprs throughout the block. Cloning a VariableExpr -
src/Common/SemanticError.h
r00675a1 r3b80db8 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 4 14:08:26 202213 // Update Count : 3 512 // Last Modified On : Thu Jul 19 10:09:17 2018 13 // Update Count : 31 14 14 // 15 15 … … 59 59 {"aggregate-forward-decl" , Severity::Warn , "forward declaration of nested aggregate: %s" }, 60 60 {"superfluous-decl" , Severity::Warn , "declaration does not allocate storage: %s" }, 61 {"superfluous-else" , Severity::Warn , "else clause never executed for empty loop conditional" },62 61 {"gcc-attributes" , Severity::Warn , "invalid attribute: %s" }, 63 62 {"c++-like-copy" , Severity::Warn , "Constructor from reference is not a valid copy constructor" }, … … 70 69 AggrForwardDecl, 71 70 SuperfluousDecl, 72 SuperfluousElse,73 71 GccAttributes, 74 72 CppCopy, … … 81 79 ); 82 80 83 #define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, ##__VA_ARGS__)81 #define SemanticWarning(loc, id, ...) SemanticWarningImpl(loc, id, WarningFormats[(int)id].message, __VA_ARGS__) 84 82 85 83 void SemanticWarningImpl (CodeLocation loc, Warning warn, const char * const fmt, ...) __attribute__((format(printf, 3, 4))); -
src/ControlStruct/MultiLevelExit.cpp
r00675a1 r3b80db8 594 594 } 595 595 596 // check if loop node and if so add else clause if it exists597 const WhileDoStmt * whilePtr = dynamic_cast<const WhileDoStmt *>(kid.get());598 if ( whilePtr && whilePtr->else_) ret.push_back(whilePtr->else_);599 const ForStmt * forPtr = dynamic_cast<const ForStmt *>(kid.get());600 if ( forPtr && forPtr->else_) ret.push_back(forPtr->else_);601 602 596 if ( ! break_label.empty() ) { 603 597 ret.push_back( labelledNullStmt( ret.back()->location, break_label ) ); -
src/Parser/parser.yy
r00675a1 r3b80db8 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed May 4 17:22:48202213 // Update Count : 527 912 // Last Modified On : Mon Mar 14 16:35:29 2022 13 // Update Count : 5276 14 14 // 15 15 … … 111 111 112 112 void distInl( DeclarationNode * declaration ) { 113 // distribute INLINEacross all declarations113 // distribute EXTENSION across all declarations 114 114 for ( DeclarationNode *iter = declaration; iter != nullptr; iter = (DeclarationNode *)iter->get_next() ) { 115 115 iter->set_inLine( true ); … … 1221 1221 1222 1222 iteration_statement: 1223 WHILE '(' ')' statement %prec THEN// CFA => while ( 1 )1223 WHILE '(' ')' statement // CFA => while ( 1 ) 1224 1224 { $$ = new StatementNode( build_while( new CondCtl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), maybe_build_compound( $4 ) ) ); } 1225 | WHILE '(' ')' statement ELSE statement // CFA1226 {1227 $$ = new StatementNode( build_while( new CondCtl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), maybe_build_compound( $4 ) ) );1228 SemanticWarning( yylloc, Warning::SuperfluousElse );1229 }1230 1225 | WHILE '(' conditional_declaration ')' statement %prec THEN 1231 1226 { $$ = new StatementNode( build_while( $3, maybe_build_compound( $5 ) ) ); } … … 1234 1229 | DO statement WHILE '(' ')' ';' // CFA => do while( 1 ) 1235 1230 { $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), maybe_build_compound( $2 ) ) ); } 1236 | DO statement WHILE '(' ')' ELSE statement // CFA 1237 { 1238 $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), maybe_build_compound( $2 ) ) ); 1239 SemanticWarning( yylloc, Warning::SuperfluousElse ); 1240 } 1241 | DO statement WHILE '(' comma_expression ')' ';' 1231 | DO statement WHILE '(' comma_expression ')' ';' %prec THEN 1242 1232 { $$ = new StatementNode( build_do_while( $5, maybe_build_compound( $2 ) ) ); } 1243 1233 | DO statement WHILE '(' comma_expression ')' ELSE statement // CFA 1244 1234 { $$ = new StatementNode( build_do_while( $5, maybe_build_compound( $2 ), $8 ) ); } 1245 | FOR '(' ')' statement %prec THEN// CFA => for ( ;; )1235 | FOR '(' ')' statement // CFA => for ( ;; ) 1246 1236 { $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), maybe_build_compound( $4 ) ) ); } 1247 | FOR '(' ')' statement ELSE statement // CFA1248 {1249 $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), maybe_build_compound( $4 ) ) );1250 SemanticWarning( yylloc, Warning::SuperfluousElse );1251 }1252 1237 | FOR '(' for_control_expression_list ')' statement %prec THEN 1253 1238 { $$ = new StatementNode( build_for( $3, maybe_build_compound( $5 ) ) ); } … … 2333 2318 { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); } 2334 2319 2335 $$ = DeclarationNode::newEnum( nullptr, $7, true, $3 ) ->addQualifiers( $5 );2320 $$ = DeclarationNode::newEnum( nullptr, $7, true, $3 ) ->addQualifiers( $5 ); 2336 2321 } 2337 2322 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt identifier attribute_list_opt … … 2342 2327 '{' enumerator_list comma_opt '}' 2343 2328 { 2344 $$ = DeclarationNode::newEnum( $6, $10, true, $3 ) ->addQualifiers( $5 )->addQualifiers( $7 );2329 $$ = DeclarationNode::newEnum( $6, $10, true, $3 ) -> addQualifiers( $5 ) -> addQualifiers( $7 ); 2345 2330 } 2346 2331 | ENUM '(' cfa_abstract_parameter_declaration ')' attribute_list_opt typedef_name attribute_list_opt '{' enumerator_list comma_opt '}' … … 2348 2333 if ( $3->storageClasses.val != 0 || $3->type->qualifiers.val != 0 ) { SemanticError( yylloc, "storage-class and CV qualifiers are not meaningful for enumeration constants, which are const." ); } 2349 2334 typedefTable.makeTypedef( *$6->name ); 2350 $$ = DeclarationNode::newEnum( $6->name, $9, true, $3 ) ->addQualifiers( $5 )->addQualifiers( $7 );2335 $$ = DeclarationNode::newEnum( $6->name, $9, true, $3 ) -> addQualifiers( $5 ) -> addQualifiers( $7 ); 2351 2336 } 2352 2337 | enum_type_nobody -
src/Validate/Autogen.cpp
r00675a1 r3b80db8 350 350 name, 351 351 std::move( type_params ), 352 std::move( assertions ),353 352 std::move( params ), 354 353 std::move( returns ), … … 361 360 // Auto-generated routines are inline to avoid conflicts. 362 361 ast::Function::Specs( ast::Function::Inline ) ); 362 decl->assertions = std::move( assertions ); 363 363 decl->fixUniqueId(); 364 364 return decl; -
tests/unified_locking/.expect/locks.txt
r00675a1 r3b80db8 23 23 Start Test 12: locked condition variable wait/notify with front() 24 24 Done Test 12 25 Start Test 13: fast block lock and fast cond var single wait/notify26 Done Test 13 -
tests/unified_locking/locks.cfa
r00675a1 r3b80db8 18 18 condition_variable( linear_backoff_then_block_lock ) c_l; 19 19 20 fast_block_lock f;21 fast_cond_var( fast_block_lock ) f_c_f;22 23 20 thread T_C_M_WS1 {}; 24 21 … … 102 99 } 103 100 unlock(l); 104 }105 }106 107 thread T_F_C_F_WS1 {};108 109 void main( T_F_C_F_WS1 & this ) {110 for (unsigned int i = 0; i < num_times; i++) {111 lock(f);112 if(empty(f_c_f) && i != num_times - 1) {113 wait(f_c_f,f);114 }else{115 notify_one(f_c_f);116 unlock(f);117 }118 101 } 119 102 } … … 339 322 } 340 323 printf("Done Test 12\n"); 341 342 printf("Start Test 13: fast block lock and fast cond var single wait/notify\n"); 343 { 344 T_F_C_F_WS1 t1[2]; 345 } 346 printf("Done Test 13\n"); 347 348 } 324 }
Note: See TracChangeset
for help on using the changeset viewer.