Changeset 70ac8d0
- Timestamp:
- May 12, 2020, 4:55:42 PM (3 years ago)
- Branches:
- ADT, arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 068a202, f2d05e9
- Parents:
- 5c581cc (diff), 730f4f1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r5c581cc r70ac8d0 802 802 with_cfa_name 803 803 enable_distcc 804 with_bwlimit 804 805 with_target_hosts 805 806 enable_gprofiler … … 1481 1482 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1482 1483 --with-cfa-name=NAME NAME too which cfa will be installed 1484 --with-bwlimit=RATE RATE the maximum rate at which rsync will be limited when using distributed builds 1483 1485 --with-target-hosts=HOSTS HOSTS comma seperated list of hosts to build for, format ARCH:debug|nodebug|nolib 1484 1486 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use … … 3198 3200 else 3199 3201 enable_distcc=no 3202 fi 3203 3204 3205 3206 # Check whether --with-bwlimit was given. 3207 if test "${with_bwlimit+set}" = set; then : 3208 withval=$with_bwlimit; 3200 3209 fi 3201 3210 -
configure.ac
r5c581cc r70ac8d0 64 64 [ --enable-distcc whether or not to enable distributed compilation], 65 65 enable_distcc=$enableval, enable_distcc=no) 66 67 AC_ARG_WITH(bwlimit, 68 [ --with-bwlimit=RATE RATE the maximum rate at which rsync will be limited when using distributed builds], 69 [], []) 66 70 67 71 AM_CONDITIONAL([ENABLE_DISTCC], [test x$enable_distcc = xyes]) -
doc/proposals/vtable.md
r5c581cc r70ac8d0 237 237 default is provided or not, the second syntax can be used to pick a 238 238 parameter on instantiation. 239 240 ### Extension: Object Access 241 This requires that the resolution scope (see below) is at the type level or 242 has explicate points with names. These are the tables and table names used 243 here. 244 245 The system already knows where to find the virtual table and the object. If 246 the tables have particular identities, or on the user side names, then it is 247 meaningful to check if a binding virtual table is the same* as another. The 248 main use of this is virtual table declarations also give the type they bind 249 and if a binding table matches a known table then the underlyind object in the 250 trait object must be of that type. 251 252 * By identity, by value would work and in some senses be more flexiable. But 253 it would be slower and refering to further away functions would be harder. 254 255 This gives one of the main new features of the hierarchical use of virtual 256 tables (see below); the ability to recover the underlying object. Or a pointer 257 of the approprate type it which both reflects the implementation and gives a 258 convenent way to encode the boolean/conditional aspect of the operation which 259 is that a different virtual table might be in use. 260 261 There are two general ways to reperent this; a cast or a field access. The 262 cast is traditional and would definitely fit if a single pointer repersents 263 a trait object with the virtual table as part of the object. However for a 264 double pointer field access might be more approprate. By this system though 265 it is not the type that is used as the identifier but the virtual table. If 266 there is one table per type than it becomes equivilant again. Otherwise the 267 table has to be used as the identifier and the type is just a result of that 268 which seems important for syntax. 239 269 240 270 Hierarchy … … 560 590 be used in only some of the declarations. 561 591 562 trait combiner fee = (summation_instance, sum);592 trait combiner fee = {summation_instance, sum}; 563 593 trait combiner foe = summation_instance; 564 594 -
libcfa/Makefile.in
r5c581cc r70ac8d0 253 253 DEFS = @DEFS@ 254 254 DEPDIR = @DEPDIR@ 255 DIST_BWLIMIT = @DIST_BWLIMIT@ 255 256 DLLTOOL = @DLLTOOL@ 256 257 DRIVER_DIR = @DRIVER_DIR@ -
libcfa/configure
r5c581cc r70ac8d0 707 707 CONFIG_CFLAGS 708 708 ARCH_FLAGS 709 DIST_BWLIMIT 709 710 CFADIR_HASH 710 711 LOCAL_CC1 … … 789 790 enable_silent_rules 790 791 enable_distcc 792 with_bwlimit 791 793 with_cfa_name 792 794 enable_static … … 1465 1467 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1466 1468 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1469 --with-bwlimit=RATE RATE the maximum rate at which rsync will be limited when using distributed builds 1467 1470 --with-cfa-name=NAME NAME too which cfa will be installed 1468 1471 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use … … 3047 3050 3048 3051 3052 3053 # Check whether --with-bwlimit was given. 3054 if test "${with_bwlimit+set}" = set; then : 3055 withval=$with_bwlimit; DIST_BWLIMIT=$withval 3056 else 3057 DIST_BWLIMIT=0 3058 fi 3059 3060 3049 3061 echo -n "checking for distributated build... " 3050 3062 if test x$enable_distcc = xno; then … … 3070 3082 ENABLE_DISTCC_FALSE= 3071 3083 fi 3084 3072 3085 3073 3086 -
libcfa/configure.ac
r5c581cc r70ac8d0 31 31 enable_distcc=$enableval, enable_distcc=no) 32 32 33 AC_ARG_WITH(bwlimit, 34 [ --with-bwlimit=RATE RATE the maximum rate at which rsync will be limited when using distributed builds], 35 DIST_BWLIMIT=$withval, DIST_BWLIMIT=0) 36 33 37 echo -n "checking for distributated build... " 34 38 if test x$enable_distcc = xno; then … … 55 59 AC_SUBST(CFADIR_HASH) 56 60 AC_SUBST(CFA_VERSION) 61 AC_SUBST(DIST_BWLIMIT) 57 62 58 63 #============================================================================== -
libcfa/prelude/Makefile.am
r5c581cc r70ac8d0 72 72 if ENABLE_DISTCC 73 73 distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 74 ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 74 ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@ 75 75 @echo "Dummy file to track distribution to remote hosts" > ${@} 76 76 -
libcfa/prelude/Makefile.in
r5c581cc r70ac8d0 215 215 DEFS = @DEFS@ 216 216 DEPDIR = @DEPDIR@ 217 DIST_BWLIMIT = @DIST_BWLIMIT@ 217 218 DLLTOOL = @DLLTOOL@ 218 219 DRIVER_DIR = @DRIVER_DIR@ … … 655 656 656 657 @ENABLE_DISTCC_TRUE@distribution: @LOCAL_CFACC@ @LOCAL_CC1@ @CFACPP@ gcc-builtins.cf builtins.cf extras.cf prelude.cfa bootloader.c $(srcdir)/../../tools/build/push2dist.sh 657 @ENABLE_DISTCC_TRUE@ ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ 658 @ENABLE_DISTCC_TRUE@ ${AM_V_GEN}$(srcdir)/../../tools/build/push2dist.sh @CFADIR_HASH@ @DIST_BWLIMIT@ 658 659 @ENABLE_DISTCC_TRUE@ @echo "Dummy file to track distribution to remote hosts" > ${@} 659 660 -
libcfa/src/Makefile.in
r5c581cc r70ac8d0 307 307 DEFS = @DEFS@ 308 308 DEPDIR = @DEPDIR@ 309 DIST_BWLIMIT = @DIST_BWLIMIT@ 309 310 DLLTOOL = @DLLTOOL@ 310 311 DRIVER_DIR = @DRIVER_DIR@ -
libcfa/src/concurrency/kernel.cfa
r5c581cc r70ac8d0 374 374 375 375 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 376 /* paranoid */ verify( kernelTLS.this_thread == thrd_dst ); 376 377 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); // add escape condition if we are setting up the processor 377 378 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit) || thrd_dst->curr_cor == proc_cor, "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); // add escape condition if we are setting up the processor … … 384 385 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) > ((uintptr_t)__get_stack(thrd_dst->curr_cor)->limit), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too large.\n", thrd_dst ); 385 386 /* paranoid */ verifyf( ((uintptr_t)thrd_dst->context.SP) < ((uintptr_t)__get_stack(thrd_dst->curr_cor)->base ), "ERROR : Destination $thread %p has been corrupted.\n StackPointer too small.\n", thrd_dst ); 387 /* paranoid */ verify( kernelTLS.this_thread == thrd_dst ); 386 388 /* paranoid */ verify( ! kernelTLS.preemption_state.enabled ); 387 389 -
libcfa/src/exception.c
r5c581cc r70ac8d0 121 121 122 122 123 // TERMINATION =============================================================== 124 125 // MEMORY MANAGEMENT (still for integers) 126 // May have to move to cfa for constructors and destructors (references). 123 // MEMORY MANAGEMENT ========================================================= 127 124 128 125 // How to clean up an exception in various situations. … … 203 200 } 204 201 205 // If this isn't a rethrow (*except==0), delete the provided exception. 206 void __cfaehm_cleanup_terminate( void * except ) { 207 if ( *(void**)except ) __cfaehm_delete_exception( *(exception_t **)except ); 208 } 202 // CANCELLATION ============================================================== 209 203 210 204 // Function needed by force unwind … … 228 222 } 229 223 224 // Cancel the current stack, prefroming approprate clean-up and messaging. 225 static __attribute__((noreturn)) void __cfaehm_cancel_stack( 226 exception_t * exception ) { 227 // TODO: Detect current stack and pick a particular stop-function. 228 _Unwind_Reason_Code ret; 229 ret = _Unwind_ForcedUnwind( &this_exception_storage, _Stop_Fn, (void*)0x22 ); 230 printf("UNWIND ERROR %d after force unwind\n", ret); 231 abort(); 232 } 233 234 235 // TERMINATION =============================================================== 236 237 // If this isn't a rethrow (*except==0), delete the provided exception. 238 void __cfaehm_cleanup_terminate( void * except ) { 239 if ( *(void**)except ) __cfaehm_delete_exception( *(exception_t **)except ); 240 } 241 230 242 // The exception that is being thrown must already be stored. 231 243 static __attribute__((noreturn)) void __cfaehm_begin_unwind(void) { … … 245 257 // the whole stack. 246 258 259 // No handler found, go to the default operation. 260 // Currently this will always be a cancellation. 247 261 if ( ret == _URC_END_OF_STACK ) { 248 // No proper handler was found. This can be handled in many ways, C++ calls std::terminate. 249 // Here we force unwind the stack, basically raising a cancellation. 250 printf("Uncaught exception %p\n", &this_exception_storage); 251 252 ret = _Unwind_ForcedUnwind( &this_exception_storage, _Stop_Fn, (void*)0x22 ); 253 printf("UNWIND ERROR %d after force unwind\n", ret); 254 abort(); 262 __cfadbg_print_safe(exception, "Uncaught exception %p\n", &this_exception_storage); 263 264 __cfaehm_cancel_stack(this_exception_context()->current_exception); 255 265 } 256 266 -
tests/exceptions/.expect/resume.txt
r5c581cc r70ac8d0 4 4 end of try clause 5 5 Exiting: simple try clause 6 7 catch-all 6 8 7 9 throwing child exception -
tests/exceptions/.expect/terminate.txt
r5c581cc r70ac8d0 3 3 simple catch 4 4 Exiting: simple catch clause 5 6 catch-all 5 7 6 8 throwing child exception -
tests/exceptions/data-except.cfa
r5c581cc r70ac8d0 12 12 this.first = first; 13 13 this.second = second; 14 }15 16 void copy(paired * this, paired * other) {17 *this = *other;18 14 } 19 15 -
tests/exceptions/resume.cfa
r5c581cc r70ac8d0 19 19 loud_exit a = "simple catch clause"; 20 20 printf("simple catch\n"); 21 } 22 printf("\n"); 23 24 // Throw catch-all test. 25 try { 26 throwResume &(zen){}; 27 } catchResume (exception_t * error) { 28 printf("catch-all\n"); 21 29 } 22 30 printf("\n"); -
tests/exceptions/terminate.cfa
r5c581cc r70ac8d0 17 17 printf("end of try clause\n"); 18 18 } catch (zen * error) { 19 19 loud_exit a = "simple catch clause"; 20 20 printf("simple catch\n"); 21 } 22 printf("\n"); 23 24 // Throw catch-all test. 25 try { 26 throw &(zen){}; 27 } catch (exception_t * error) { 28 printf("catch-all\n"); 21 29 } 22 30 printf("\n"); -
tools/build/push2dist.sh
r5c581cc r70ac8d0 2 2 3 3 hash="$1" 4 bwlim="$2" 4 5 valid=$(distcc -j 2> /dev/null) 5 6 # if test "${valid}" != 0 … … 24 25 function push() { 25 26 ssh ${host} "mkdir -p ~/.cfadistcc/${hash}/" 26 rsync - a ${dV} ${files} ${host}:~/.cfadistcc/${hash}/.27 rsync --bwlimit=${bwlim} -a ${dV} ${files} ${host}:~/.cfadistcc/${hash}/. 27 28 } 28 29
Note: See TracChangeset
for help on using the changeset viewer.