Changeset 09f34a84 for src/Concurrency
- Timestamp:
- Sep 16, 2022, 11:19:04 AM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation
- Children:
- 4407b7e
- Parents:
- 9a90092
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
r9a90092 r09f34a84 508 508 ObjectDecl * vtable_object = Virtual::makeVtableForward( 509 509 "_default_vtable_object_declaration", 510 vtable_decl->makeInst( move( poly_args ) ) );510 vtable_decl->makeInst( std::move( poly_args ) ) ); 511 511 declsToAddBefore.push_back( vtable_object ); 512 512 declsToAddBefore.push_back( … … 681 681 void lock (monitor_t & this) { 682 682 lock(get_monitor(this)); 683 } 683 } 684 684 */ 685 685 FunctionDecl * lock_decl = new FunctionDecl( … … 700 700 CompoundStmt * lock_statement = new CompoundStmt(); 701 701 lock_statement->push_back( 702 new ExprStmt( 702 new ExprStmt( 703 703 new UntypedExpr ( 704 704 new NameExpr( "lock" ), … … 716 716 void unlock (monitor_t & this) { 717 717 unlock(get_monitor(this)); 718 } 718 } 719 719 */ 720 720 FunctionDecl * unlock_decl = new FunctionDecl( … … 736 736 737 737 unlock_statement->push_back( 738 new ExprStmt( 738 new ExprStmt( 739 739 new UntypedExpr( 740 740 new NameExpr( "unlock" ), … … 746 746 ); 747 747 unlock_decl->set_statements( unlock_statement ); 748 748 749 749 // pushes routines to declsToAddAfter to add at a later time 750 750 declsToAddAfter.push_back( lock_decl ); … … 1054 1054 assert( !thread_guard_decl ); 1055 1055 thread_guard_decl = decl; 1056 } 1056 } 1057 1057 else if ( decl->name == "__mutex_stmt_lock_guard" && decl->body ) { 1058 1058 assert( !lock_guard_decl ); … … 1206 1206 new NameExpr( "__get_mutexstmt_lock_type" ), 1207 1207 { args.front()->clone() } 1208 ) 1208 ) 1209 1209 ) 1210 1210 ), … … 1225 1225 1226 1226 StructInstType * lock_guard_struct = new StructInstType( noQualifiers, lock_guard_decl ); 1227 TypeExpr * lock_type_expr = new TypeExpr( 1227 TypeExpr * lock_type_expr = new TypeExpr( 1228 1228 new TypeofType( noQualifiers, new UntypedExpr( 1229 1229 new NameExpr( "__get_mutexstmt_lock_type" ), 1230 1230 { args.front()->clone() } 1231 ) 1232 ) 1231 ) 1232 ) 1233 1233 ); 1234 1234
Note: See TracChangeset
for help on using the changeset viewer.