Changeset c3a2007
- Timestamp:
- Oct 28, 2019, 4:28:37 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8364209
- Parents:
- c921712 (diff), 9bdb8b7 (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:
-
- 1 added
- 3 deleted
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
rc921712 rc3a2007 224 224 //Routine responsible of sending the email notification once the build is completed 225 225 //=========================================================================================================== 226 @NonCPS 227 def SplitLines(String text) { 228 def list = [] 229 230 text.eachLine { 231 list += it 232 } 233 234 return list 235 } 236 226 237 def GitLogMessage() { 227 238 if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n" 228 239 229 sh "${SrcDir}/tools/PrettyGitLogs.sh ${SrcDir} ${BuildDir} ${Settings.GitOldRef} ${Settings.GitNewRef}" 230 231 def gitUpdate = readFile("${BuildDir}/GIT_UPDATE") 232 def gitLog = readFile("${BuildDir}/GIT_LOG") 233 def gitDiff = readFile("${BuildDir}/GIT_DIFF") 240 def oldRef = Settings.GitOldRef 241 def newRef = Settings.GitNewRef 242 243 def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim() 244 def revList = SplitLines( revText ) 245 246 def gitUpdate = "" 247 revList.each { rev -> 248 def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim() 249 gitUpdate = gitUpdate + " via ${rev} (${type})" 250 } 251 252 def rev = oldRef 253 def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim() 254 gitUpdate = gitUpdate + " from ${rev} (${type})" 255 256 def gitLog = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim() 257 258 def gitDiff = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim() 259 gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">') 260 gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">') 261 gitDiff = gitDiff.replace('[m', '</span>') 234 262 235 263 return """ -
Makefile.in
rc921712 rc3a2007 264 264 CCDEPMODE = @CCDEPMODE@ 265 265 CFACC = @CFACC@ 266 CFACC_INSTALL = @CFACC_INSTALL@ 266 267 CFACPP = @CFACPP@ 267 268 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
benchmark/Makefile.am
rc921712 rc3a2007 22 22 23 23 AM_CFLAGS = -O2 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror 24 AM_CFAFLAGS = -quiet -nodebug -in-tree24 AM_CFAFLAGS = -quiet -nodebug 25 25 AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14 26 26 -
benchmark/Makefile.in
rc921712 rc3a2007 214 214 CCDEPMODE = @CCDEPMODE@ 215 215 CFACC = @CFACC@ 216 CFACC_INSTALL = @CFACC_INSTALL@ 216 217 CFACPP = @CFACPP@ 217 218 CFA_BACKEND_CC = @CFA_BACKEND_CC@ … … 375 376 # applies to both programs 376 377 AM_CFLAGS = -O2 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror 377 AM_CFAFLAGS = -quiet -nodebug -in-tree378 AM_CFAFLAGS = -quiet -nodebug 378 379 AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14 379 380 BENCH_V_CC = $(__bench_v_CC_$(__quiet)) -
configure
rc921712 rc3a2007 715 715 BUILD_IN_TREE_FLAGS 716 716 CFACPP 717 CFACC_INSTALL 717 718 CFACC 718 719 DRIVER_DIR … … 3303 3304 DRIVER_DIR=${TOP_BUILDDIR}driver/ 3304 3305 CFACC=${DRIVER_DIR}cfa 3306 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME} 3305 3307 CFACPP=${DRIVER_DIR}cfa-cpp 3308 3306 3309 3307 3310 -
configure.ac
rc921712 rc3a2007 93 93 DRIVER_DIR=${TOP_BUILDDIR}driver/ 94 94 CFACC=${DRIVER_DIR}cfa 95 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME} 95 96 CFACPP=${DRIVER_DIR}cfa-cpp 96 97 AC_SUBST(DRIVER_DIR) 97 98 AC_SUBST(CFACC) 99 AC_SUBST(CFACC_INSTALL) 98 100 AC_SUBST(CFACPP) 99 101 -
driver/Makefile.in
rc921712 rc3a2007 201 201 CCDEPMODE = @CCDEPMODE@ 202 202 CFACC = @CFACC@ 203 CFACC_INSTALL = @CFACC_INSTALL@ 203 204 CFACPP = @CFACPP@ 204 205 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
driver/cc1.cc
rc921712 rc3a2007 10 10 // Created On : Fri Aug 26 14:23:51 2005 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 9 17:50:53 201913 // Update Count : 38 412 // Last Modified On : Sun Oct 20 08:14:33 2019 13 // Update Count : 385 14 14 // 15 15 … … 503 503 execvp( args[0], (char * const *)args ); // should not return 504 504 perror( "CC1 Translator error: stage 2 cc1, execvp" ); 505 cerr << " invoked " << cargs[0] << endl;505 cerr << " invoked " << args[0] << endl; 506 506 exit( EXIT_FAILURE ); // tell gcc not to go any further 507 507 } // if -
driver/cfa.cc
rc921712 rc3a2007 15 15 16 16 #include <iostream> 17 #include <cstdio> // perror 18 #include <cstdlib> // putenv, exit 19 #include <unistd.h> // execvp 20 #include <string> // STL version 21 #include <string.h> // strcmp 22 #include <algorithm> // find 17 #include <cstdio> // perror 18 #include <cstdlib> // putenv, exit 19 #include <climits> // PATH_MAX 20 #include <unistd.h> // execvp 21 #include <string> // STL version 22 #include <string.h> // strcmp 23 #include <algorithm> // find 23 24 24 25 #include <sys/types.h> … … 35 36 // #define __DEBUG_H__ 36 37 37 static string __CFA_FLAGPREFIX__( "__CFA_FLAG" ); // "N__=" suffix 38 // "N__=" suffix 39 static string __CFA_FLAGPREFIX__( "__CFA_FLAG" ); 38 40 39 41 void Putenv( char * argv[], string arg ) { … … 57 59 } 58 60 59 bool suffix( const string & arg ) { // check if string has suffix 61 // check if string has suffix 62 bool suffix( const string & arg ) { 60 63 enum { NumSuffixes = 3 }; 61 64 static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" }; … … 76 79 static inline string dir(const string & path) { 77 80 return path.substr(0, path.find_last_of('/')); 81 } 82 83 // Different path modes 84 enum PathMode { 85 Installed, // cfa is installed, use prefix 86 BuildTree, // cfa is in the tree, use source and build tree 87 Distributed // cfa is distributed, use build tree for includes and executable directory for .cfs 88 }; 89 90 // Get path mode from /proc 91 PathMode FromProc() { 92 std::string abspath; 93 abspath.resize(PATH_MAX); 94 95 // get executable path from /proc/self/exe 96 ssize_t size = readlink("/proc/self/exe", const_cast<char*>(abspath.c_str()), abspath.size()); 97 if(size <= 0) { 98 std::cerr << "Error could not evaluate absolute path from /proc/self/exe" << std::endl; 99 std::cerr << "Failed with " << std::strerror(errno) << std::endl; 100 std::exit(1); 101 } 102 103 // Trim extra characters 104 abspath.resize(size); 105 106 // Are we installed 107 if(abspath.rfind(CFA_BINDIR , 0) == 0) { return Installed; } 108 109 // Is this the build tree 110 if(abspath.rfind(TOP_BUILDDIR, 0) == 0) { return BuildTree; } 111 112 // Does this look like distcc 113 if(abspath.find("/.cfadistcc/") != std::string::npos) { return Distributed; } 114 115 // None of the above? Give up since we don't know where the prelude or include directories are 116 std::cerr << "Cannot find required files from excutable path " << abspath << std::endl; 117 std::exit(1); 78 118 } 79 119 … … 113 153 bool m32 = false; // -m32 flag 114 154 bool m64 = false; // -m64 flag 115 bool intree = false; // build in tree116 155 bool compiling_libs = false; 117 bool disttree = false;118 156 int o_file = 0; // -o filename position 157 158 PathMode path = FromProc(); 119 159 120 160 const char *args[argc + 100]; // cfa command line values, plus some space for additional flags … … 171 211 } else if ( arg == "-no-include-stdhdr" ) { 172 212 noincstd_flag = true; // strip the no-include-stdhdr flag 173 } else if ( arg == "-in-tree" ) {174 intree = true;175 } else if ( arg == "-dist-tree" ) {176 disttree = true;177 213 } else if ( arg == "-cfalib") { 178 214 compiling_libs = true; … … 283 319 284 320 // add the CFA include-library paths, which allow direct access to header files without directory qualification 285 if ( ! intree ) { 321 string libbase; 322 switch(path) { 323 case Installed: 286 324 args[nargs++] = "-I" CFA_INCDIR; 287 if ( ! noincstd_flag ) { // do not use during build 325 // do not use during build 326 if ( ! noincstd_flag ) { 288 327 args[nargs++] = "-I" CFA_INCDIR "stdhdr"; 289 328 } // if 290 329 args[nargs++] = "-I" CFA_INCDIR "concurrency"; 291 330 args[nargs++] = "-I" CFA_INCDIR "containers"; 292 } else { 331 libbase = CFA_LIBDIR; 332 break; 333 case BuildTree: 334 case Distributed: 293 335 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src"; 294 if ( ! noincstd_flag ) { // do not use during build 336 // do not use during build 337 if ( ! noincstd_flag ) { 295 338 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr"; 296 339 } // if 297 340 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency"; 298 341 args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/containers"; 342 343 libbase = TOP_BUILDDIR "libcfa/"; 344 345 break; 299 346 } // if 300 347 … … 302 349 args[nargs++] = "-imacros"; 303 350 args[nargs++] = "stdbool.h"; 304 305 string libbase;306 if ( ! intree ) {307 libbase = CFA_LIBDIR;308 } else {309 libbase = TOP_BUILDDIR "libcfa/";310 } // if311 351 312 352 if( compiling_libs ) { … … 326 366 string libdir = libbase + arch + "-" + config; 327 367 328 if ( !disttree) {368 if (path != Distributed) { 329 369 if ( ! nolib && ! dirExists( libdir ) ) { 330 370 cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl; … … 344 384 } // if 345 385 346 if(disttree) { 347 Putenv( argv, "--prelude-dir=" + dir(argv[0]) ); 348 } else if(intree) { 349 Putenv( argv, "--prelude-dir=" + libdir + "/prelude" ); 350 } else { 351 Putenv( argv, "--prelude-dir=" + libdir ); 386 switch(path) { 387 case Installed : Putenv( argv, "--prelude-dir=" + libdir ); break; 388 case BuildTree : Putenv( argv, "--prelude-dir=" + libdir + "/prelude" ); break; 389 case Distributed : Putenv( argv, "--prelude-dir=" + dir(argv[0]) ); break; 352 390 } 353 391 … … 365 403 366 404 // include the cfa library in case it is needed 367 args[nargs++] = ( *new string( string("-L" ) + libdir + ( intree? "/src/.libs" : "")) ).c_str();368 args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + ( intree? "/src/.libs" : "")) ).c_str();405 args[nargs++] = ( *new string( string("-L" ) + libdir + (path != Installed ? "/src/.libs" : "")) ).c_str(); 406 args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + (path != Installed ? "/src/.libs" : "")) ).c_str(); 369 407 args[nargs++] = "-Wl,--push-state,--as-needed"; 370 408 args[nargs++] = "-lcfathread"; … … 410 448 411 449 if ( bprefix.length() == 0 ) { 412 if(disttree) { 413 bprefix = dir(argv[0]); 414 } else if(intree) { 415 bprefix = srcdriverdir; 416 } else { 417 bprefix = installlibdir; 450 switch(path) { 451 case Installed : bprefix = installlibdir; break; 452 case BuildTree : bprefix = srcdriverdir ; break; 453 case Distributed : bprefix = dir(argv[0]) ; break; 418 454 } 419 455 if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/'; -
libcfa/Makefile.in
rc921712 rc3a2007 296 296 PACKAGE_VERSION = @PACKAGE_VERSION@ 297 297 PATH_SEPARATOR = @PATH_SEPARATOR@ 298 PRELUDEFLAG = @PRELUDEFLAG@299 298 RANLIB = @RANLIB@ 300 299 SED = @SED@ -
libcfa/configure
rc921712 rc3a2007 707 707 CONFIG_CFLAGS 708 708 ARCH_FLAGS 709 PRELUDEFLAG710 709 CFADIR_HASH 711 710 LOCAL_CC1 … … 2960 2959 if test x$enable_distcc = xno; then 2961 2960 CFACC=${DRIVER_DIR}cfa 2962 PRELUDEFLAG='-in-tree'2963 2961 echo "no" 2964 2962 else … … 2968 2966 CFADIR_HASH=$($tools/distcc_hash $config) 2969 2967 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 2970 PRELUDEFLAG='-dist-tree'2971 2968 echo "yes (hash=${CFADIR_HASH})" 2972 2969 fi … … 2982 2979 ENABLE_DISTCC_FALSE= 2983 2980 fi 2984 2985 2981 2986 2982 -
libcfa/configure.ac
rc921712 rc3a2007 34 34 if test x$enable_distcc = xno; then 35 35 CFACC=${DRIVER_DIR}cfa 36 PRELUDEFLAG='-in-tree'37 36 echo "no" 38 37 else … … 42 41 CFADIR_HASH=$($tools/distcc_hash $config) 43 42 CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa" 44 PRELUDEFLAG='-dist-tree'45 43 echo "yes (hash=${CFADIR_HASH})" 46 44 fi … … 57 55 AC_SUBST(CFADIR_HASH) 58 56 AC_SUBST(CFA_VERSION) 59 AC_SUBST(PRELUDEFLAG)60 57 61 58 #============================================================================== -
libcfa/prelude/Makefile.in
rc921712 rc3a2007 239 239 PACKAGE_VERSION = @PACKAGE_VERSION@ 240 240 PATH_SEPARATOR = @PATH_SEPARATOR@ 241 PRELUDEFLAG = @PRELUDEFLAG@242 241 RANLIB = @RANLIB@ 243 242 SED = @SED@ -
libcfa/prelude/extras.regx
rc921712 rc3a2007 19 19 typedef.* uint32_t; 20 20 typedef.* uint64_t; 21 typedef.* __uint_least16_t; 22 typedef.* __uint_least32_t; 21 23 typedef.* char16_t; 22 24 typedef.* char32_t; -
libcfa/src/Makefile.am
rc921712 rc3a2007 32 32 # use -no-include-stdhdr to prevent rebuild cycles 33 33 # The built sources must not depend on the installed headers 34 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@-I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@34 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ 35 35 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 36 36 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 96 96 97 97 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 98 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}98 ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 99 99 100 100 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 101 101 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 102 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}102 $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 103 103 104 104 #---------------------------------------------------------------------------------------------------------------- -
libcfa/src/Makefile.in
rc921712 rc3a2007 349 349 PACKAGE_VERSION = @PACKAGE_VERSION@ 350 350 PATH_SEPARATOR = @PATH_SEPARATOR@ 351 PRELUDEFLAG = @PRELUDEFLAG@352 351 RANLIB = @RANLIB@ 353 352 SED = @SED@ … … 445 444 # use -no-include-stdhdr to prevent rebuild cycles 446 445 # The built sources must not depend on the installed headers 447 AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@-I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@446 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@ 448 447 AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@ 449 448 AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@ … … 954 953 955 954 prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 956 ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}955 ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 957 956 958 957 prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@ 959 958 ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \ 960 $(CFACOMPILE) -quiet @PRELUDEFLAG@-XCFA -l ${<} -c -o ${@}959 $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@} 961 960 962 961 #---------------------------------------------------------------------------------------------------------------- -
libcfa/src/concurrency/kernel_private.hfa
rc921712 rc3a2007 34 34 static inline void WakeThread( thread_desc * thrd ) { 35 35 if( !thrd ) return; 36 37 verify(thrd->state == Inactive); 36 38 37 39 disable_interrupts(); -
libcfa/src/heap.cfa
rc921712 rc3a2007 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 24 13:12:45201913 // Update Count : 55 012 // Last Modified On : Fri Oct 18 07:42:09 2019 13 // Update Count : 556 14 14 // 15 15 … … 541 541 // along with the block and is a multiple of the alignment size. 542 542 543 if ( unlikely( size > ~0ul - sizeof(HeapManager.Storage) ) ) return 0; 543 544 size_t tsize = size + sizeof(HeapManager.Storage); 544 545 if ( likely( tsize < mmapStart ) ) { // small size => sbrk … … 592 593 block->header.kind.real.home = freeElem; // pointer back to free list of apropriate size 593 594 } else { // large size => mmap 595 if ( unlikely( size > ~0ul - pageSize ) ) return 0; 594 596 tsize = libCeiling( tsize, pageSize ); // must be multiple of page size 595 597 #ifdef __STATISTICS__ … … 888 890 } // realloc 889 891 890 891 892 // The obsolete function memalign() allocates size bytes and returns a pointer to the allocated memory. The memory 892 893 // address will be a multiple of alignment, which must be a power of two. … … 992 993 size_t malloc_alignment( void * addr ) { 993 994 if ( unlikely( addr == 0 ) ) return libAlign(); // minimum alignment 994 HeapManager.Storage.Header * header = (HeapManager.Storage.Header *)( (char *)addr - sizeof(HeapManager.Storage));995 HeapManager.Storage.Header * header = headerAddr( addr ); 995 996 if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ? 996 997 return header->kind.fake.alignment & -2; // remove flag from value … … 1004 1005 bool malloc_zero_fill( void * addr ) { 1005 1006 if ( unlikely( addr == 0 ) ) return false; // null allocation is not zero fill 1006 1007 HeapManager.Storage.Header * header = (HeapManager.Storage.Header *)( (char *)addr - sizeof(HeapManager.Storage) ); 1007 HeapManager.Storage.Header * header = headerAddr( addr ); 1008 1008 if ( (header->kind.fake.alignment & 1) == 1 ) { // fake header ? 1009 1009 header = (HeapManager.Storage.Header *)((char *)header - header->kind.fake.offset); -
libcfa/src/stdlib.cfa
rc921712 rc3a2007 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jun 24 17:34:44201913 // Update Count : 4 6212 // Last Modified On : Tue Oct 22 08:57:52 2019 13 // Update Count : 478 14 14 // 15 15 … … 21 21 #include <string.h> // memcpy, memset 22 22 #include <malloc.h> // malloc_usable_size 23 #include <math.h> // fabsf, fabs, fabsl23 //#include <math.h> // fabsf, fabs, fabsl 24 24 #include <complex.h> // _Complex_I 25 25 #include <assert.h> … … 27 27 //--------------------------------------- 28 28 29 // resize, non-array types 30 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill ) { 31 size_t olen = malloc_usable_size( ptr ); // current allocation 32 char * nptr = (void *)realloc( (void *)ptr, dim * (size_t)sizeof(T) ); // C realloc 33 size_t nlen = malloc_usable_size( nptr ); // new allocation 34 if ( nlen > olen ) { // larger ? 35 memset( nptr + olen, (int)fill, nlen - olen ); // initialize added storage 36 } // 37 return (T *)nptr; 38 } // alloc 29 forall( dtype T | sized(T) ) { 30 T * alloc_set( T ptr[], size_t dim, char fill ) { // realloc array with fill 31 size_t olen = malloc_usable_size( ptr ); // current allocation 32 char * nptr = (char *)realloc( (void *)ptr, dim * sizeof(T) ); // C realloc 33 size_t nlen = malloc_usable_size( nptr ); // new allocation 34 if ( nlen > olen ) { // larger ? 35 memset( nptr + olen, (int)fill, nlen - olen ); // initialize added storage 36 } // if 37 return (T *)nptr; 38 } // alloc_set 39 40 T * alloc_align( T ptr[], size_t align ) { // aligned realloc array 41 char * nptr; 42 size_t alignment = malloc_alignment( ptr ); 43 if ( align != alignment && (uintptr_t)ptr % align != 0 ) { 44 size_t olen = malloc_usable_size( ptr ); // current allocation 45 nptr = (char *)memalign( align, olen ); 46 size_t nlen = malloc_usable_size( nptr ); // new allocation 47 size_t lnth = olen < nlen ? olen : nlen; // min 48 memcpy( nptr, ptr, lnth ); // initialize storage 49 free( ptr ); 50 } else { 51 nptr = (char *)ptr; 52 } // if 53 return (T *)nptr; 54 } // alloc_align 55 56 T * alloc_align( T ptr[], size_t align, size_t dim ) { // aligned realloc array 57 char * nptr; 58 size_t alignment = malloc_alignment( ptr ); 59 if ( align != alignment ) { 60 size_t olen = malloc_usable_size( ptr ); // current allocation 61 nptr = (char *)memalign( align, dim * sizeof(T) ); 62 size_t nlen = malloc_usable_size( nptr ); // new allocation 63 size_t lnth = olen < nlen ? olen : nlen; // min 64 memcpy( nptr, ptr, lnth ); // initialize storage 65 free( ptr ); 66 } else { 67 nptr = (char *)realloc( (void *)ptr, dim * sizeof(T) ); // C realloc 68 } // if 69 return (T *)nptr; 70 } // alloc_align 71 72 T * alloc_align_set( T ptr[], size_t align, char fill ) { // aligned realloc with fill 73 size_t olen = malloc_usable_size( ptr ); // current allocation 74 char * nptr = alloc_align( ptr, align ); 75 size_t nlen = malloc_usable_size( nptr ); // new allocation 76 if ( nlen > olen ) { // larger ? 77 memset( nptr + olen, (int)fill, nlen - olen ); // initialize added storage 78 } // if 79 return (T *)nptr; 80 } // alloc_align_set 81 } // distribution 39 82 40 83 // allocation/deallocation and constructor/destructor, non-array types 41 84 forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) 42 85 T * new( Params p ) { 43 return &(*malloc()){ p }; 86 return &(*malloc()){ p }; // run constructor 44 87 } // new 45 88 … … 47 90 void delete( T * ptr ) { 48 91 if ( ptr ) { // ignore null 49 ^(*ptr){}; 92 ^(*ptr){}; // run destructor 50 93 free( ptr ); 51 94 } // if … … 55 98 void delete( T * ptr, Params rest ) { 56 99 if ( ptr ) { // ignore null 57 ^(*ptr){}; 100 ^(*ptr){}; // run destructor 58 101 free( ptr ); 59 102 } // if -
libcfa/src/stdlib.hfa
rc921712 rc3a2007 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 23 14:14:59201913 // Update Count : 3 7312 // Last Modified On : Sun Oct 20 22:57:33 2019 13 // Update Count : 390 14 14 // 15 15 … … 25 25 void * memset( void * dest, int fill, size_t size ); // string.h 26 26 void * memcpy( void * dest, const void * src, size_t size ); // string.h 27 void * cmemalign( size_t alignment, size_t noOfElems, size_t elemSize ); // CFA 27 void * cmemalign( size_t alignment, size_t noOfElems, size_t elemSize ); // CFA heap 28 28 } // extern "C" 29 29 … … 52 52 T * realloc( T * ptr, size_t size ) { 53 53 if ( unlikely( ptr == 0 ) ) return malloc(); 54 return (T *)(void *)realloc( (void *)ptr, size ); 54 return (T *)(void *)realloc( (void *)ptr, size ); // C realloc 55 55 } // realloc 56 56 57 57 T * memalign( size_t align ) { 58 return (T *)memalign( align, sizeof(T) ); 58 return (T *)memalign( align, sizeof(T) ); // C memalign 59 59 } // memalign 60 60 61 61 T * aligned_alloc( size_t align ) { 62 return (T *)aligned_alloc( align, sizeof(T) ); 62 return (T *)aligned_alloc( align, sizeof(T) ); // C aligned_alloc 63 63 } // aligned_alloc 64 64 … … 67 67 } // posix_memalign 68 68 69 70 69 // Cforall dynamic allocation 71 70 … … 74 73 } // alloc 75 74 76 T * alloc( char fill ) {77 T * ptr;78 if ( _Alignof(T) <= libAlign() ) ptr = (T *)(void *)malloc( (size_t)sizeof(T) ); // C malloc79 else ptr = (T *)memalign( _Alignof(T), sizeof(T) );80 return (T *)memset( ptr, (int)fill, sizeof(T) ); // initialize with fill value81 } // alloc82 83 75 T * alloc( size_t dim ) { 84 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc76 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( dim * (size_t)sizeof(T) ); 85 77 else return (T *)memalign( _Alignof(T), dim * sizeof(T) ); 86 78 } // alloc 87 79 88 T * alloc( size_t dim, char fill ) { 80 T * alloc( T ptr[], size_t dim ) { // realloc 81 return realloc( ptr, dim * sizeof(T) ); 82 } // alloc 83 84 T * alloc_set( char fill ) { 85 return (T *)memset( (T *)alloc(), (int)fill, sizeof(T) ); // initialize with fill value 86 } // alloc 87 88 T * alloc_set( T fill ) { 89 return (T *)memcpy( (T *)alloc(), &fill, sizeof(T) ); // initialize with fill value 90 } // alloc 91 92 T * alloc_set( size_t dim, char fill ) { 89 93 return (T *)memset( (T *)alloc( dim ), (int)fill, dim * sizeof(T) ); // initialize with fill value 90 94 } // alloc 91 95 92 T * alloc( T ptr[], size_t dim ) { 93 return realloc( ptr, dim * sizeof(T) ); 94 } // alloc 95 } // distribution 96 97 98 static inline forall( dtype T | sized(T) ) { 99 T * align_alloc( size_t align ) { 96 T * alloc_set( size_t dim, T fill ) { 97 T * r = (T *)alloc( dim ); 98 for ( i; dim ) { memcpy( &r[i], &fill, sizeof(T) ); } // initialize with fill value 99 return r; 100 } // alloc 101 102 T * alloc_set( size_t dim, const T fill[] ) { 103 return (T *)memcpy( (T *)alloc( dim ), fill, dim * sizeof(T) ); // initialize with fill value 104 } // alloc 105 } // distribution 106 107 forall( dtype T | sized(T) ) { 108 T * alloc_set( T ptr[], size_t dim, char fill ); // realloc array with fill 109 } // distribution 110 111 static inline forall( dtype T | sized(T) ) { 112 T * alloc_align( size_t align ) { 100 113 return (T *)memalign( align, sizeof(T) ); 101 } // align_alloc 102 103 T * align_alloc( size_t align, char fill ) { 104 T * ptr = (T *)memalign( align, sizeof(T) ); 105 return (T *)memset( ptr, (int)fill, sizeof(T) ); 106 } // align_alloc 107 108 T * align_alloc( size_t align, size_t dim ) { 114 } // alloc_align 115 116 T * alloc_align( size_t align, size_t dim ) { 109 117 return (T *)memalign( align, dim * sizeof(T) ); 110 } // align_alloc 111 112 T * align_alloc( size_t align, size_t dim, char fill ) { 113 if ( fill == '\0' ) { 114 return (T *)cmemalign( align, dim, sizeof(T) ); 115 } else { 116 return (T *)memset( (T *)memalign( align, dim * sizeof(T) ), (int)fill, dim * sizeof(T) ); 117 } // if 118 } // align_alloc 119 } // distribution 120 121 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill ); 122 118 } // alloc_align 119 120 T * alloc_align_set( size_t align, char fill ) { 121 return (T *)memset( (T *)alloc_align( align ), (int)fill, sizeof(T) ); // initialize with fill value 122 } // alloc_align 123 124 T * alloc_align_set( size_t align, T fill ) { 125 return (T *)memcpy( (T *)alloc_align( align ), &fill, sizeof(T) ); // initialize with fill value 126 } // alloc_align 127 128 T * alloc_align_set( size_t align, size_t dim, char fill ) { 129 return (T *)memset( (T *)alloc_align( align, dim ), (int)fill, dim * sizeof(T) ); // initialize with fill value 130 } // alloc_align 131 132 T * alloc_align_set( size_t align, size_t dim, T fill ) { 133 T * r = (T *)alloc_align( align, dim ); 134 for ( i; dim ) { memcpy( &r[i], &fill, sizeof(T) ); } // initialize with fill value 135 return r; 136 } // alloc_align 137 138 T * alloc_align_set( size_t align, size_t dim, const T fill[] ) { 139 return (T *)memcpy( (T *)alloc_align( align, dim ), fill, dim * sizeof(T) ); 140 } // alloc_align 141 } // distribution 142 143 forall( dtype T | sized(T) ) { 144 T * alloc_align( T ptr[], size_t align ); // realign 145 T * alloc_align( T ptr[], size_t align, size_t dim ); // aligned realloc array 146 T * alloc_align_set( T ptr[], size_t align, size_t dim, char fill ); // aligned realloc array with fill 147 } // distribution 123 148 124 149 static inline forall( dtype T | sized(T) ) { 125 150 // data, non-array types 126 127 151 T * memset( T * dest, char fill ) { 128 152 return (T *)memset( dest, fill, sizeof(T) ); … … 136 160 static inline forall( dtype T | sized(T) ) { 137 161 // data, array types 138 139 162 T * amemset( T dest[], char fill, size_t dim ) { 140 163 return (T *)(void *)memset( dest, fill, dim * sizeof(T) ); // C memset -
longrun_tests/Makefile.am
rc921712 rc3a2007 42 42 -I$(abs_top_srcdir)/tests \ 43 43 -I$(srcdir) \ 44 -DTEST_$(shell cat .type | tr a-z A-Z) \ 45 -in-tree 44 -DTEST_$(shell cat .type | tr a-z A-Z) 46 45 47 46 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield -
longrun_tests/Makefile.in
rc921712 rc3a2007 348 348 CCDEPMODE = @CCDEPMODE@ 349 349 CFACC = @CFACC@ 350 CFACC_INSTALL = @CFACC_INSTALL@ 350 351 CFACPP = @CFACPP@ 351 352 CFA_BACKEND_CC = @CFA_BACKEND_CC@ … … 525 526 -I$(abs_top_srcdir)/tests \ 526 527 -I$(srcdir) \ 527 -DTEST_$(shell cat .type | tr a-z A-Z) \ 528 -in-tree 528 -DTEST_$(shell cat .type | tr a-z A-Z) 529 529 530 530 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield -
src/CodeGen/CodeGenerator.cc
rc921712 rc3a2007 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Thr May 2 10:47:00201913 // Update Count : 49711 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Oct 19 19:30:38 2019 13 // Update Count : 506 14 14 // 15 15 #include "CodeGenerator.h" … … 198 198 // deleted decls should never be used, so don't print them 199 199 if ( objectDecl->isDeleted && options.genC ) return; 200 if (objectDecl->get_name().empty() && options.genC ) { 200 201 // gcc allows an empty declarator (no name) for bit-fields and C states: 6.7.2.1 Structure and union specifiers, 202 // point 4, page 113: If the (bit field) value is zero, the declaration shall have no declarator. For anything 203 // else, the anonymous name refers to the anonymous object for plan9 inheritance. 204 if ( objectDecl->get_name().empty() && options.genC && ! objectDecl->get_bitfieldWidth() ) { 201 205 // only generate an anonymous name when generating C code, otherwise it clutters the output too much 202 206 static UniqueName name = { "__anonymous_object" }; 203 207 objectDecl->set_name( name.newName() ); 204 205 206 207 208 // Stops unused parameter warnings. 209 if ( options.anonymousUnused ) { 210 objectDecl->attributes.push_back( new Attribute( "unused" ) ); 211 } 208 212 } 209 213 -
src/CodeGen/GenType.cc
rc921712 rc3a2007 335 335 typeString = "_Atomic " + typeString; 336 336 } // if 337 if ( type->get_lvalue() && ! options.genC ) {338 // when not generating C code, print lvalue for debugging.339 typeString = "lvalue " + typeString;340 }341 337 } 342 338 } // namespace CodeGen -
src/ControlStruct/MLEMutator.cc
rc921712 rc3a2007 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 8 17:08:25 201813 // Update Count : 2 1912 // Last Modified On : Tue Oct 22 17:22:44 2019 13 // Update Count : 220 14 14 // 15 15 … … 313 313 } 314 314 315 void MLEMutator::premutate( TryStmt * tryStmt ) { 316 // generate a label for breaking out of a labeled if 317 bool labeledBlock = !(tryStmt->get_labels().empty()); 318 if ( labeledBlock ) { 319 Label brkLabel = generator->newLabel("blockBreak", tryStmt); 320 enclosingControlStructures.push_back( Entry( tryStmt, brkLabel ) ); 321 GuardAction( [this]() { enclosingControlStructures.pop_back(); } ); 322 } // if 323 } 324 325 Statement * MLEMutator::postmutate( TryStmt * tryStmt ) { 326 bool labeledBlock = !(tryStmt->get_labels().empty()); 327 if ( labeledBlock ) { 328 if ( ! enclosingControlStructures.back().useBreakExit().empty() ) { 329 set_breakLabel( enclosingControlStructures.back().useBreakExit() ); 330 } // if 331 } // if 332 return tryStmt; 333 } 334 315 335 void MLEMutator::premutate( CaseStmt *caseStmt ) { 316 336 visit_children = false; -
src/ControlStruct/MLEMutator.h
rc921712 rc3a2007 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 8 16:42:32 201813 // Update Count : 4 112 // Last Modified On : Tue Oct 22 17:22:47 2019 13 // Update Count : 45 14 14 // 15 15 … … 47 47 void premutate( SwitchStmt *switchStmt ); 48 48 Statement * postmutate( SwitchStmt *switchStmt ); 49 void premutate( TryStmt *tryStmt ); 50 Statement * postmutate( TryStmt *tryStmt ); 49 51 50 52 Statement *mutateLoop( Statement *bodyLoop, Entry &e ); … … 73 75 explicit Entry( SwitchStmt *stmt, Label breakExit, Label fallDefaultExit ) : 74 76 stmt( stmt ), breakExit( breakExit ), fallDefaultExit( fallDefaultExit ) {} 77 78 explicit Entry( TryStmt *stmt, Label breakExit ) : 79 stmt( stmt ), breakExit( breakExit ) {} 75 80 76 81 bool operator==( const Statement *other ) { return stmt == other; } -
src/GenPoly/Box.cc
rc921712 rc3a2007 837 837 deref->args.push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) ); 838 838 deref->result = arg->get_type()->clone(); 839 deref->result->set_lvalue( true );840 839 return deref; 841 840 } // if -
src/GenPoly/Lvalue.cc
rc921712 rc3a2007 54 54 delete ret->result; 55 55 ret->result = base->clone(); 56 ret->result->set_lvalue( true );57 56 return ret; 58 57 } else { … … 167 166 ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result ); 168 167 appExpr->result = result->base->clone(); 169 appExpr->result->set_lvalue( true );170 168 if ( ! inIntrinsic ) { 171 169 // when not in an intrinsic function, add a cast to … … 436 434 delete ret->result; 437 435 ret->result = castExpr->result; 438 ret->result->set_lvalue( true); // ensure result is lvalue436 assert( ret->get_lvalue() ); // ensure result is lvalue 439 437 castExpr->env = nullptr; 440 438 castExpr->arg = nullptr; -
src/Makefile.in
rc921712 rc3a2007 231 231 SynTree/Initializer.$(OBJEXT) \ 232 232 SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \ 233 SynTree/DeclReplacer.$(OBJEXT) SynTree/TopLvalue.$(OBJEXT)233 SynTree/DeclReplacer.$(OBJEXT) 234 234 am__objects_8 = CompilationState.$(OBJEXT) $(am__objects_1) \ 235 235 $(am__objects_2) Concurrency/Keywords.$(OBJEXT) \ … … 411 411 CCDEPMODE = @CCDEPMODE@ 412 412 CFACC = @CFACC@ 413 CFACC_INSTALL = @CFACC_INSTALL@ 413 414 CFACPP = @CFACPP@ 414 415 CFA_BACKEND_CC = @CFA_BACKEND_CC@ … … 695 696 SynTree/TypeSubstitution.cc \ 696 697 SynTree/Attribute.cc \ 697 SynTree/DeclReplacer.cc \ 698 SynTree/TopLvalue.cc 698 SynTree/DeclReplacer.cc 699 699 700 700 … … 1025 1025 SynTree/DeclReplacer.$(OBJEXT): SynTree/$(am__dirstamp) \ 1026 1026 SynTree/$(DEPDIR)/$(am__dirstamp) 1027 SynTree/TopLvalue.$(OBJEXT): SynTree/$(am__dirstamp) \1028 SynTree/$(DEPDIR)/$(am__dirstamp)1029 1027 Tuples/$(am__dirstamp): 1030 1028 @$(MKDIR_P) Tuples … … 1337 1335 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/ReferenceType.Po@am__quote@ 1338 1336 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/Statement.Po@am__quote@ 1339 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/TopLvalue.Po@am__quote@1340 1337 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/TupleExpr.Po@am__quote@ 1341 1338 @AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/TupleType.Po@am__quote@ -
src/ResolvExpr/ConversionCost.cc
rc921712 rc3a2007 157 157 if ( typesCompatibleIgnoreQualifiers( src, destAsRef->base, indexer, env ) ) { 158 158 PRINT( std::cerr << "converting compatible base type" << std::endl; ) 159 assert( src->get_lvalue() == srcIsLvalue );160 159 if ( srcIsLvalue ) { 161 160 PRINT( -
src/ResolvExpr/ResolveAssertions.cc
rc921712 rc3a2007 156 156 for ( const auto& assn : x.assns ) { 157 157 // compute conversion cost from satisfying decl to assertion 158 assert( !assn.match.adjType->get_lvalue() );159 158 k += computeConversionCost( 160 159 assn.match.adjType, assn.decl->get_type(), false, indexer, x.env ); -
src/SymTab/Autogen.h
rc921712 rc3a2007 97 97 // type->get_qualifiers() = Type::Qualifiers(); 98 98 Type * castType = addCast->clone(); 99 castType->get_qualifiers() -= Type::Qualifiers( Type:: Lvalue | Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );99 castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic ); 100 100 // castType->set_lvalue( true ); // xxx - might not need this 101 101 dstParam = new CastExpr( dstParam, new ReferenceType( Type::Qualifiers(), castType ) ); -
src/SymTab/ManglerCommon.cc
rc921712 rc3a2007 88 88 { Type::Atomic, "DA" }, // A is array, so need something unique for atmoic. For now, go with multiletter DA 89 89 { Type::Mutex, "X" }, 90 { Type::Lvalue, "L" },91 90 }; 92 91 -
src/SymTab/Validate.cc
rc921712 rc3a2007 81 81 #include "SynTree/Label.h" // for operator==, Label 82 82 #include "SynTree/Mutator.h" // for Mutator 83 #include "SynTree/TopLvalue.h" // for assertTopLvalue, clearInnerLvalue84 83 #include "SynTree/Type.h" // for Type, TypeInstType, EnumInstType 85 84 #include "SynTree/TypeSubstitution.h" // for TypeSubstitution … … 309 308 PassVisitor<FixQualifiedTypes> fixQual; 310 309 311 assertTopLvalue( translationUnit );312 310 { 313 311 Stats::Heap::newPass("validate-A"); … … 318 316 acceptAll( translationUnit, epc ); // must happen before VerifyCtorDtorAssign, because void return objects should not exist; before LinkReferenceToTypes_old because it is an indexer and needs correct types for mangling 319 317 } 320 assertTopLvalue( translationUnit );321 318 { 322 319 Stats::Heap::newPass("validate-B"); 323 320 Stats::Time::BlockGuard guard("validate-B"); 324 assertTopLvalue( translationUnit );325 321 Stats::Time::TimeBlock("Link Reference To Types", [&]() { 326 322 acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions 327 323 }); 328 clearInnerLvalue( translationUnit );329 assertTopLvalue( translationUnit );330 324 Stats::Time::TimeBlock("Fix Qualified Types", [&]() { 331 325 mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes_old, because aggregate members are accessed 332 326 }); 333 assertTopLvalue( translationUnit );334 327 Stats::Time::TimeBlock("Hoist Structs", [&]() { 335 328 HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order 336 329 }); 337 assertTopLvalue( translationUnit );338 330 Stats::Time::TimeBlock("Eliminate Typedefs", [&]() { 339 331 EliminateTypedef::eliminateTypedef( translationUnit ); // 340 332 }); 341 333 } 342 assertTopLvalue( translationUnit );343 334 { 344 335 Stats::Heap::newPass("validate-C"); … … 349 340 InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen 350 341 } 351 assertTopLvalue( translationUnit );352 342 { 353 343 Stats::Heap::newPass("validate-D"); 354 344 Stats::Time::BlockGuard guard("validate-D"); 355 assertTopLvalue( translationUnit );356 345 Stats::Time::TimeBlock("Apply Concurrent Keywords", [&]() { 357 346 Concurrency::applyKeywords( translationUnit ); 358 347 }); 359 clearInnerLvalue( translationUnit );360 assertTopLvalue( translationUnit );361 348 Stats::Time::TimeBlock("Forall Pointer Decay", [&]() { 362 349 acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution 363 350 }); 364 assertTopLvalue( translationUnit );365 351 Stats::Time::TimeBlock("Hoist Control Declarations", [&]() { 366 352 ControlStruct::hoistControlDecls( translationUnit ); // hoist initialization out of for statements; must happen before autogenerateRoutines 367 353 }); 368 assertTopLvalue( translationUnit );369 354 Stats::Time::TimeBlock("Generate Autogen routines", [&]() { 370 355 autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay_old 371 356 }); 372 clearInnerLvalue( translationUnit ); 373 } 374 assertTopLvalue( translationUnit ); 357 } 375 358 { 376 359 Stats::Heap::newPass("validate-E"); 377 360 Stats::Time::BlockGuard guard("validate-E"); 378 assertTopLvalue( translationUnit );379 361 Stats::Time::TimeBlock("Implement Mutex Func", [&]() { 380 362 Concurrency::implementMutexFuncs( translationUnit ); 381 363 }); 382 clearInnerLvalue( translationUnit );383 assertTopLvalue( translationUnit );384 364 Stats::Time::TimeBlock("Implement Thread Start", [&]() { 385 365 Concurrency::implementThreadStarter( translationUnit ); 386 366 }); 387 assertTopLvalue( translationUnit );388 367 Stats::Time::TimeBlock("Compound Literal", [&]() { 389 368 mutateAll( translationUnit, compoundliteral ); 390 369 }); 391 assertTopLvalue( translationUnit );392 370 Stats::Time::TimeBlock("Resolve With Expressions", [&]() { 393 371 ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables 394 372 }); 395 clearInnerLvalue( translationUnit ); 396 } 397 assertTopLvalue( translationUnit ); 373 } 398 374 { 399 375 Stats::Heap::newPass("validate-F"); 400 376 Stats::Time::BlockGuard guard("validate-F"); 401 assertTopLvalue( translationUnit );402 377 Stats::Time::TimeBlock("Fix Object Type", [&]() { 403 378 FixObjectType::fix( translationUnit ); 404 379 }); 405 assertTopLvalue( translationUnit );406 380 Stats::Time::TimeBlock("Array Length", [&]() { 407 381 ArrayLength::computeLength( translationUnit ); 408 382 }); 409 clearInnerLvalue( translationUnit );410 assertTopLvalue( translationUnit );411 383 Stats::Time::TimeBlock("Find Special Declarations", [&]() { 412 384 Validate::findSpecialDecls( translationUnit ); 413 385 }); 414 assertTopLvalue( translationUnit );415 386 Stats::Time::TimeBlock("Fix Label Address", [&]() { 416 387 mutateAll( translationUnit, labelAddrFixer ); 417 388 }); 418 assertTopLvalue( translationUnit );419 389 Stats::Time::TimeBlock("Handle Attributes", [&]() { 420 390 Validate::handleAttributes( translationUnit ); 421 391 }); 422 392 } 423 assertTopLvalue( translationUnit );424 393 } 425 394 … … 1334 1303 void FixObjectType::previsit( ObjectDecl * objDecl ) { 1335 1304 Type * new_type = ResolvExpr::resolveTypeof( objDecl->get_type(), indexer ); 1336 new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type1337 1305 objDecl->set_type( new_type ); 1338 1306 } … … 1340 1308 void FixObjectType::previsit( FunctionDecl * funcDecl ) { 1341 1309 Type * new_type = ResolvExpr::resolveTypeof( funcDecl->type, indexer ); 1342 new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type1343 1310 funcDecl->set_type( new_type ); 1344 1311 } … … 1347 1314 if ( typeDecl->get_base() ) { 1348 1315 Type * new_type = ResolvExpr::resolveTypeof( typeDecl->get_base(), indexer ); 1349 new_type->get_qualifiers() -= Type::Lvalue; // even if typeof is lvalue, variable can never have lvalue-qualified type1350 1316 typeDecl->set_base( new_type ); 1351 1317 } // if -
src/SynTree/AddressExpr.cc
rc921712 rc3a2007 53 53 } // if 54 54 } 55 // result of & is never an lvalue56 get_result()->set_lvalue( false );57 55 } 58 56 } -
src/SynTree/ApplicationExpr.cc
rc921712 rc3a2007 25 25 #include "Declaration.h" // for Declaration 26 26 #include "Expression.h" // for ParamEntry, ApplicationExpr, Expression 27 #include "InitTweak/InitTweak.h" // for getFunction 27 28 #include "ResolvExpr/typeops.h" // for extractResultType 28 29 #include "Type.h" // for Type, PointerType, FunctionType … … 77 78 78 79 bool ApplicationExpr::get_lvalue() const { 79 return result->get_lvalue(); 80 // from src/GenPoly/Lvalue.cc: isIntrinsicReference 81 static std::set<std::string> lvalueFunctions = { "*?", "?[?]" }; 82 if ( const DeclarationWithType * func = InitTweak::getFunction( this ) ) { 83 return func->linkage == LinkageSpec::Intrinsic && lvalueFunctions.count(func->name); 84 } 85 return false; 80 86 } 81 87 -
src/SynTree/ArrayType.cc
rc921712 rc3a2007 26 26 ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes ) 27 27 : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) { 28 base->set_lvalue( false );29 28 } 30 29 -
src/SynTree/CommaExpr.cc
rc921712 rc3a2007 23 23 CommaExpr::CommaExpr( Expression *arg1, Expression *arg2 ) 24 24 : Expression(), arg1( arg1 ), arg2( arg2 ) { 25 // xxx - result of a comma expression is never an lvalue, so should set lvalue26 // to false on all result types. Actually doing this causes some strange things27 // to happen in later passes (particularly, Specialize, Lvalue, and Box). This needs to be looked into.28 25 set_result( maybeClone( arg2->get_result() ) ); 29 // get_type->set_isLvalue( false );30 26 } 31 27 … … 40 36 41 37 bool CommaExpr::get_lvalue() const { 42 // xxx - as above, shouldn't be an lvalue but that information is used anyways. 43 return result->get_lvalue(); 38 // This is wrong by C, but the current implementation uses it. 39 // (ex: Specialize, Lvalue and Box) 40 return arg2->get_lvalue(); 44 41 } 45 42 -
src/SynTree/Expression.cc
rc921712 rc3a2007 19 19 #include <iostream> // for ostream, operator<<, basic_ostream 20 20 #include <list> // for list, _List_iterator, list<>::co... 21 #include <set> // for set 21 22 22 23 #include "Common/utility.h" // for maybeClone, cloneAll, deleteAll … … 64 65 65 66 bool Expression::get_lvalue() const { 66 assert( !result->get_lvalue() );67 67 return false; 68 68 } … … 115 115 assert( var->get_type() ); 116 116 Type * type = var->get_type()->clone(); 117 type->set_lvalue( true );118 117 119 118 // xxx - doesn't quite work yet - get different alternatives with the same cost … … 125 124 // long long int value; 126 125 // if ( decl->valueOf( var, value ) ) { 127 // type->set_lvalue( false ); 126 // type->set_lvalue( false ); // Would have to move to get_lvalue. 128 127 // } 129 128 // } … … 140 139 141 140 bool VariableExpr::get_lvalue() const { 142 return result->get_lvalue(); 141 // It isn't always an lvalue, but it is never an rvalue. 142 return true; 143 143 } 144 144 … … 277 277 278 278 bool CastExpr::get_lvalue() const { 279 return result->get_lvalue(); 279 // This is actually wrong by C, but it works with our current set-up. 280 return arg->get_lvalue(); 280 281 } 281 282 … … 360 361 } 361 362 363 bool UntypedMemberExpr::get_lvalue() const { 364 return aggregate->get_lvalue(); 365 } 366 362 367 void UntypedMemberExpr::print( std::ostream & os, Indenter indent ) const { 363 368 os << "Untyped Member Expression, with field: " << std::endl << indent+1; … … 378 383 sub.apply( res ); 379 384 result = res; 380 result->set_lvalue( true );381 385 result->get_qualifiers() |= aggregate->result->get_qualifiers(); 382 386 } … … 392 396 393 397 bool MemberExpr::get_lvalue() const { 394 assert( result->get_lvalue() );398 // This is actually wrong by C, but it works with our current set-up. 395 399 return true; 396 400 } … … 427 431 // if references are still allowed in the AST, dereference returns a reference 428 432 ret->set_result( new ReferenceType( Type::Qualifiers(), ret->get_result() ) ); 429 } else {430 // references have been removed, in which case dereference returns an lvalue of the base type.431 ret->result->set_lvalue( true );432 433 } 433 434 } … … 447 448 448 449 bool UntypedExpr::get_lvalue() const { 449 return result->get_lvalue(); 450 // from src/GenPoly/Lvalue.cc: isIntrinsicReference 451 static std::set<std::string> lvalueFunctions = { "*?", "?[?]" }; 452 std::string fname = InitTweak::getFunctionName( const_cast< UntypedExpr * >( this ) ); 453 return lvalueFunctions.count(fname); 450 454 } 451 455 … … 510 514 511 515 bool ConditionalExpr::get_lvalue() const { 512 return result->get_lvalue();516 return false; 513 517 } 514 518 … … 570 574 571 575 bool ConstructorExpr::get_lvalue() const { 572 return result->get_lvalue();576 return false; 573 577 } 574 578 … … 582 586 CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : initializer( initializer ) { 583 587 assert( type && initializer ); 584 type->set_lvalue( true );585 588 set_result( type ); 586 589 } … … 593 596 594 597 bool CompoundLiteralExpr::get_lvalue() const { 595 assert( result->get_lvalue() );596 598 return true; 597 599 } … … 648 650 } 649 651 bool StmtExpr::get_lvalue() const { 650 return result->get_lvalue();652 return false; 651 653 } 652 654 void StmtExpr::print( std::ostream & os, Indenter indent ) const { -
src/SynTree/Expression.h
rc921712 rc3a2007 275 275 virtual ~UntypedMemberExpr(); 276 276 277 bool get_lvalue() const final; 278 277 279 Expression * get_member() const { return member; } 278 280 void set_member( Expression * newValue ) { member = newValue; } -
src/SynTree/TupleExpr.cc
rc921712 rc3a2007 58 58 59 59 bool TupleExpr::get_lvalue() const { 60 return result->get_lvalue();60 return false; 61 61 } 62 62 … … 71 71 assertf( type->size() > index, "TupleIndexExpr index out of bounds: tuple size %d, requested index %d in expr %s", type->size(), index, toString( tuple ).c_str() ); 72 72 set_result( (*std::next( type->get_types().begin(), index ))->clone() ); 73 // like MemberExpr, TupleIndexExpr is always an lvalue74 get_result()->set_lvalue( true );75 73 } 76 74 … … 83 81 84 82 bool TupleIndexExpr::get_lvalue() const { 85 assert( result->get_lvalue() ); 86 return true; 83 return tuple->get_lvalue(); 87 84 } 88 85 -
src/SynTree/Type.cc
rc921712 rc3a2007 85 85 const char * Type::FuncSpecifiersNames[] = { "inline", "_Noreturn", "fortran" }; 86 86 const char * Type::StorageClassesNames[] = { "extern", "static", "auto", "register", "_Thread_local" }; 87 const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", " lvalue", "mutex", "_Atomic" };87 const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "mutex", "_Atomic" }; 88 88 89 89 Type * Type::stripDeclarator() { -
src/SynTree/Type.h
rc921712 rc3a2007 102 102 }; // StorageClasses 103 103 104 enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6};104 enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Mutex = 1 << 3, Atomic = 1 << 4, NumTypeQualifier = 5 }; 105 105 static const char * QualifiersNames[]; 106 106 union Qualifiers { 107 enum { Mask = ~ (Restrict | Lvalue)};107 enum { Mask = ~Restrict }; 108 108 unsigned int val; 109 109 struct { … … 111 111 bool is_restrict : 1; 112 112 bool is_volatile : 1; 113 bool is_lvalue : 1;114 113 bool is_mutex : 1; 115 114 bool is_atomic : 1; … … 153 152 bool get_volatile() const { return tq.is_volatile; } 154 153 bool get_restrict() const { return tq.is_restrict; } 155 bool get_lvalue() const { return tq.is_lvalue; }156 154 bool get_mutex() const { return tq.is_mutex; } 157 155 bool get_atomic() const { return tq.is_atomic; } … … 159 157 void set_volatile( bool newValue ) { tq.is_volatile = newValue; } 160 158 void set_restrict( bool newValue ) { tq.is_restrict = newValue; } 161 void set_lvalue( bool newValue ) { tq.is_lvalue = newValue; }162 159 void set_mutex( bool newValue ) { tq.is_mutex = newValue; } 163 160 void set_atomic( bool newValue ) { tq.is_atomic = newValue; } -
src/SynTree/module.mk
rc921712 rc3a2007 49 49 SynTree/TypeSubstitution.cc \ 50 50 SynTree/Attribute.cc \ 51 SynTree/DeclReplacer.cc \ 52 SynTree/TopLvalue.cc 51 SynTree/DeclReplacer.cc 53 52 54 53 SRC += $(SRC_SYNTREE) -
src/Tuples/TupleExpansion.cc
rc921712 rc3a2007 304 304 // produce the TupleType which aggregates the types of the exprs 305 305 std::list< Type * > types; 306 Type::Qualifiers qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type:: Lvalue | Type::Atomic | Type::Mutex );306 Type::Qualifiers qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic | Type::Mutex ); 307 307 for ( Expression * expr : exprs ) { 308 308 assert( expr->get_result() ); -
src/main.cc
rc921712 rc3a2007 59 59 #include "ResolvExpr/Resolver.h" // for resolve 60 60 #include "SymTab/Validate.h" // for validate 61 #include "SynTree/TopLvalue.h" // for assertTopLvalue, clearInn...62 61 #include "SynTree/Declaration.h" // for Declaration 63 62 #include "SynTree/Visitor.h" // for acceptAll … … 259 258 Stats::Time::StopBlock(); 260 259 261 //std::cerr << "Post-Parse Check" << std::endl;262 clearInnerLvalue( translationUnit );263 assertTopLvalue( translationUnit );264 265 260 // add the assignment statement after the initialization of a type parameter 266 261 PASS( "Validate", SymTab::validate( translationUnit, symtabp ) ); … … 281 276 } // if 282 277 283 assertTopLvalue( translationUnit );284 278 PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) ); 285 assertTopLvalue( translationUnit );286 279 PASS( "Fix Names", CodeGen::fixNames( translationUnit ) ); 287 assertTopLvalue( translationUnit );288 280 PASS( "Gen Init", InitTweak::genInit( translationUnit ) ); 289 assertTopLvalue( translationUnit );290 281 PASS( "Expand Member Tuples" , Tuples::expandMemberTuples( translationUnit ) ); 291 assertTopLvalue( translationUnit );292 282 if ( libcfap ) { 293 283 // generate the bodies of cfa library functions … … 313 303 } // if 314 304 315 assertTopLvalue( translationUnit );316 317 305 PASS( "Resolve", ResolvExpr::resolve( translationUnit ) ); 318 306 if ( exprp ) { … … 321 309 } // if 322 310 323 clearInnerLvalue( translationUnit );324 assertTopLvalue( translationUnit );325 326 311 // fix ObjectDecl - replaces ConstructorInit nodes 327 312 PASS( "Fix Init", InitTweak::fix( translationUnit, buildingLibrary() ) ); 328 clearInnerLvalue( translationUnit );329 assertTopLvalue( translationUnit );330 313 if ( ctorinitp ) { 331 314 dump ( translationUnit ); … … 334 317 335 318 PASS( "Expand Unique Expr", Tuples::expandUniqueExpr( translationUnit ) ); // xxx - is this the right place for this? want to expand ASAP so tha, sequent passes don't need to worry about double-visiting a unique expr - needs to go after InitTweak::fix so that copy constructed return declarations are reused 336 assertTopLvalue( translationUnit );337 319 338 320 PASS( "Translate EHM" , ControlStruct::translateEHM( translationUnit ) ); 339 assertTopLvalue( translationUnit );340 321 341 322 PASS( "Gen Waitfor" , Concurrency::generateWaitFor( translationUnit ) ); 342 clearInnerLvalue( translationUnit );343 assertTopLvalue( translationUnit );344 323 345 324 PASS( "Convert Specializations", GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded 346 clearInnerLvalue( translationUnit );347 assertTopLvalue( translationUnit );348 325 349 326 PASS( "Expand Tuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this? 350 assertTopLvalue( translationUnit );351 327 352 328 if ( tuplep ) { … … 356 332 357 333 PASS( "Virtual Expand Casts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM 358 assertTopLvalue( translationUnit );359 334 360 335 PASS( "Instantiate Generics", GenPoly::instantiateGeneric( translationUnit ) ); … … 363 338 return EXIT_SUCCESS; 364 339 } // if 365 clearInnerLvalue( translationUnit ); 366 assertTopLvalue( translationUnit ); 340 367 341 PASS( "Convert L-Value", GenPoly::convertLvalue( translationUnit ) ); 368 clearInnerLvalue( translationUnit );369 assertTopLvalue( translationUnit );370 342 371 343 if ( bboxp ) { … … 374 346 } // if 375 347 PASS( "Box", GenPoly::box( translationUnit ) ); 376 clearInnerLvalue( translationUnit );377 assertTopLvalue( translationUnit );378 348 379 349 if ( bcodegenp ) { … … 387 357 388 358 CodeTools::fillLocations( translationUnit ); 389 assertTopLvalue( translationUnit );390 359 PASS( "Code Gen", CodeGen::generate( translationUnit, *output, ! genproto, prettycodegenp, true, linemarks ) ); 391 360 -
tests/.expect/alloc-ERROR.txt
rc921712 rc3a2007 1 alloc.cfa: 265:1 error: No reasonable alternatives for expression Applying untyped:1 alloc.cfa:311:1 error: No reasonable alternatives for expression Applying untyped: 2 2 Name: ?=? 3 3 ...to: … … 19 19 20 20 21 alloc.cfa: 266:1 error: No reasonable alternatives for expression Applying untyped:21 alloc.cfa:312:1 error: No reasonable alternatives for expression Applying untyped: 22 22 Name: ?=? 23 23 ...to: … … 39 39 40 40 41 alloc.cfa: 267:1 error: No reasonable alternatives for expression Applying untyped:41 alloc.cfa:313:1 error: No reasonable alternatives for expression Applying untyped: 42 42 Name: ?=? 43 43 ...to: … … 50 50 51 51 52 alloc.cfa: 268:1 error: No reasonable alternatives for expression Applying untyped:52 alloc.cfa:314:1 error: No reasonable alternatives for expression Applying untyped: 53 53 Name: ?=? 54 54 ...to: -
tests/.expect/alloc.txt
rc921712 rc3a2007 2 2 CFA malloc 0xdeadbeef 3 3 CFA alloc 0xdeadbeef 4 CFA alloc, fill ffffffff 4 CFA array alloc, fill 0xde 5 CFA alloc, fill dededede 6 CFA alloc, fill 3 5 7 6 8 C array calloc, fill 0 … … 10 12 CFA array alloc, no fill 11 13 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 12 CFA array alloc, fill 0xff 13 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 14 CFA array alloc, fill 0xde 15 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 16 CFA array alloc, fill 0xef 17 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 18 CFA array alloc, fill from array 19 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 0xefefefef 0xefefefef, 14 20 15 C 16 0x deadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef21 C realloc 22 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 17 23 CFA realloc 18 0x deadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x101010124 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0xefefefef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 19 25 20 CFA resize a lloc26 CFA resize array alloc 21 27 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 22 28 CFA resize array alloc … … 25 31 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 26 32 CFA resize array alloc, fill 27 0x ffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff33 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 28 34 CFA resize array alloc, fill 29 0x ffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff35 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 30 36 CFA resize array alloc, fill 31 0x ffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff37 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0xdeadbeef 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0x1010101 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 0xdededede 32 38 33 39 C memalign 42 42.5 … … 35 41 CFA posix_memalign 42 42.5 36 42 CFA posix_memalign 42 42.5 37 CFA aligned_alloc 42 42.5 38 CFA align_alloc 42 42.5 39 CFA align_alloc fill 0xffffffff -nan 43 CFA alloc_align 42 42.5 44 CFA alloc_align 42 42.5 45 CFA alloc_align fill 0xdededede -0x1.ededededededep+494 46 CFA alloc_align fill 42 42.5 47 CFA alloc_align 42 42.5 40 48 41 CFA array al ign_alloc49 CFA array alloc_align 42 50 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 43 CFA array align_alloc, fill 44 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 51 CFA array alloc_align, fill 52 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 53 CFA array alloc_align, fill 54 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 55 CFA array alloc_align, fill array 56 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 57 CFA realloc array alloc_align 58 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 42 42.5, 45 59 46 CFA memset 0x ffffffff -nan47 CFA memcpy 0x ffffffff -nan60 CFA memset 0xdededede -0x1.ededededededep+494 61 CFA memcpy 0xdededede -0x1.ededededededep+494 48 62 49 63 CFA array memset 50 0x ffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan,64 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 51 65 CFA array memcpy 52 0x ffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan, 0xffffffff -nan,66 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 0xdededede -0x1.ededededededep+494, 53 67 54 68 CFA new initialize -
tests/.expect/attributes.x64.txt
rc921712 rc3a2007 784 784 signed int _X4apd7Fi_Fi_i_Fi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object23)(__attribute__ ((unused)) signed int __anonymous_object24), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object25)(__attribute__ ((unused)) signed int __anonymous_object26)); 785 785 struct Vad { 786 __attribute__ ((unused)) signed int __anonymous_object27:4;787 __attribute__ ((unused)) signed int __anonymous_object28:4;788 __attribute__ ((unused,unused)) signed int __anonymous_object29:6;786 __attribute__ ((unused)) signed int :4; 787 __attribute__ ((unused)) signed int :4; 788 __attribute__ ((unused,unused)) signed int :6; 789 789 }; 790 790 static inline void _X12_constructorFv_S3Vad_autogen___1(struct Vad *_X4_dstS3Vad_1); -
tests/.expect/attributes.x86.txt
rc921712 rc3a2007 784 784 signed int _X4apd7Fi_Fi_i_Fi_i___1(__attribute__ ((unused,unused,unused)) signed int (*__anonymous_object23)(__attribute__ ((unused)) signed int __anonymous_object24), __attribute__ ((unused,unused,unused)) signed int (*__anonymous_object25)(__attribute__ ((unused)) signed int __anonymous_object26)); 785 785 struct Vad { 786 __attribute__ ((unused)) signed int __anonymous_object27:4;787 __attribute__ ((unused)) signed int __anonymous_object28:4;788 __attribute__ ((unused,unused)) signed int __anonymous_object29:6;786 __attribute__ ((unused)) signed int :4; 787 __attribute__ ((unused)) signed int :4; 788 __attribute__ ((unused,unused)) signed int :6; 789 789 }; 790 790 static inline void _X12_constructorFv_S3Vad_autogen___1(struct Vad *_X4_dstS3Vad_1); -
tests/Makefile.am
rc921712 rc3a2007 24 24 archiveerrors= 25 25 26 INSTALL_FLAGS=-in-tree27 26 DEBUG_FLAGS=-debug -O0 28 27 … … 43 42 -DIN_DIR="${abs_srcdir}/.in/" 44 43 44 # get the desired cfa to test 45 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 46 45 47 # adjust CC to current flags 46 CC = $(if $( DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})48 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 47 49 CFACC = $(CC) 48 50 … … 51 53 52 54 # adjusted CC but without the actual distcc call 53 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 54 56 55 57 PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && -
tests/Makefile.in
rc921712 rc3a2007 214 214 215 215 # adjust CC to current flags 216 CC = $(if $( DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})216 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 217 217 CCAS = @CCAS@ 218 218 CCASDEPMODE = @CCASDEPMODE@ … … 220 220 CCDEPMODE = @CCDEPMODE@ 221 221 CFACC = $(CC) 222 CFACC_INSTALL = @CFACC_INSTALL@ 222 223 CFACPP = @CFACPP@ 223 224 CFA_BACKEND_CC = @CFA_BACKEND_CC@ … … 381 382 installed = no 382 383 archiveerrors = 383 INSTALL_FLAGS = -in-tree384 384 DEBUG_FLAGS = -debug -O0 385 385 quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes … … 398 398 399 399 400 # get the desired cfa to test 401 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@) 402 400 403 # get local binary for depedencies 401 404 CFACCBIN = @CFACC@ 402 405 403 406 # adjusted CC but without the actual distcc call 404 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})407 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS}) 405 408 PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} && 406 409 avl_test_SOURCES = avltree/avl_test.cfa avltree/avl0.cfa avltree/avl1.cfa avltree/avl2.cfa avltree/avl3.cfa avltree/avl4.cfa avltree/avl-private.cfa -
tests/alloc.cfa
rc921712 rc3a2007 10 10 // Created On : Wed Feb 3 07:56:22 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:50:52 201813 // Update Count : 3 3912 // Last Modified On : Sun Oct 20 21:45:21 2019 13 // Update Count : 391 14 14 // 15 15 … … 19 19 #include <stdlib.h> // posix_memalign 20 20 #include <fstream.hfa> 21 #include <stdlib.hfa> 21 #include <stdlib.hfa> // access C malloc, realloc 22 22 23 23 int * foo( int * p, int c ) { return p; } … … 27 27 int main( void ) { 28 28 size_t dim = 10; 29 char fill = '\x ff';30 int * p ;29 char fill = '\xde'; 30 int * p, * p1; 31 31 32 32 // allocation, non-array types 33 34 // int & r = malloc();35 // r = 0xdeadbeef;36 // printf( "C malloc %#x\n", r );37 // free( &r );38 33 39 34 p = (int *)malloc( sizeof(*p) ); // C malloc, type unsafe … … 52 47 free( p ); 53 48 54 p = alloc( fill ); // CFA alloc, fill 49 p = alloc_set( fill ); // CFA alloc, fill 50 printf( "CFA array alloc, fill %#hhx\n", fill ); 55 51 printf( "CFA alloc, fill %08x\n", *p ); 52 free( p ); 53 54 p = alloc_set( 3 ); // CFA alloc, fill 55 printf( "CFA alloc, fill %d\n", *p ); 56 56 free( p ); 57 57 … … 79 79 free( p ); 80 80 81 p = alloc ( 2 * dim, fill );// CFA array alloc, fill81 p = alloc_set( 2 * dim, fill ); // CFA array alloc, fill 82 82 printf( "CFA array alloc, fill %#hhx\n", fill ); 83 83 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 84 84 printf( "\n" ); 85 // do not free 85 free( p ); 86 87 p = alloc_set( 2 * dim, 0xdeadbeef ); // CFA array alloc, fill 88 printf( "CFA array alloc, fill %#hhx\n", 0xdeadbeef ); 89 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 90 printf( "\n" ); 91 // do not free 92 93 p1 = alloc_set( 2 * dim, p ); // CFA array alloc, fill 94 printf( "CFA array alloc, fill from array\n" ); 95 for ( i; 2 * dim ) { printf( "%#x %#x, ", p[i], p1[i] ); } 96 free( p1 ); 97 printf( "\n" ); 86 98 87 99 … … 90 102 91 103 p = (int *)realloc( p, dim * sizeof(*p) ); // C realloc 92 for ( i; dim ) { p[i] = 0xdeadbeef; }93 printf( "C realloc\n" );94 for ( i; dim ) { printf( "%#x ", p[i] ); }95 printf( "\n" );104 printf( "C realloc\n" ); 105 for ( i; dim ) { printf( "%#x ", p[i] ); } 106 printf( "\n" ); 107 // do not free 96 108 97 109 p = realloc( p, 2 * dim * sizeof(*p) ); // CFA realloc … … 108 120 p = alloc( p, dim ); // CFA resize array alloc 109 121 for ( i; dim ) { p[i] = 0xdeadbeef; } 110 printf( "CFA resize alloc\n" ); 111 for ( i; dim ) { printf( "%#x ", p[i] ); } 112 printf( "\n" ); 122 printf( "CFA resize array alloc\n" ); 123 for ( i; dim ) { printf( "%#x ", p[i] ); } 124 printf( "\n" ); 125 // do not free 113 126 114 127 p = alloc( p, 2 * dim ); // CFA resize array alloc … … 117 130 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 118 131 printf( "\n" ); 119 120 p = alloc( p, dim ); // CFA array alloc 132 // do not free 133 134 p = alloc( p, dim ); // CFA resize array alloc 121 135 printf( "CFA resize array alloc\n" ); 122 136 for ( i; dim ) { printf( "%#x ", p[i] ); } 123 137 printf( "\n" ); 124 125 free( p ); 126 p = 0; 127 128 p = alloc( p, dim, fill ); // CFA array alloc, fill 138 // do not free 139 140 p = alloc_set( p, 3 * dim, fill ); // CFA resize array alloc, fill 129 141 printf( "CFA resize array alloc, fill\n" ); 130 for ( i; dim ) { printf( "%#x ", p[i] ); } 131 printf( "\n" ); 132 133 p = alloc( p, 2 * dim, fill ); // CFA array alloc, fill 142 for ( i; 3 * dim ) { printf( "%#x ", p[i] ); } 143 printf( "\n" ); 144 // do not free 145 146 p = alloc_set( p, dim, fill ); // CFA resize array alloc, fill 134 147 printf( "CFA resize array alloc, fill\n" ); 135 for ( i; 2 * dim ) { printf( "%#x ", p[i] ); } 136 printf( "\n" ); 137 138 p = alloc( p, dim, fill ); // CFA array alloc, fill 148 for ( i; dim ) { printf( "%#x ", p[i] ); } 149 printf( "\n" ); 150 // do not free 151 152 p = alloc_set( p, 3 * dim, fill ); // CFA resize array alloc, fill 139 153 printf( "CFA resize array alloc, fill\n" ); 140 for ( i; dim ) { printf( "%#x ", p[i] );; }154 for ( i; 3 * dim ) { printf( "%#x ", p[i] );; } 141 155 printf( "\n" ); 142 156 free( p ); … … 172 186 free( stp ); 173 187 174 stp = &(*aligned_alloc( Alignment )){ 42, 42.5 }; // CFA aligned_alloc 175 assert( (uintptr_t)stp % Alignment == 0 ); 176 printf( "CFA aligned_alloc %d %g\n", stp->x, stp->y ); 177 free( stp ); 178 179 stp = &(*align_alloc( Alignment )){ 42, 42.5 }; // CFA align_alloc 180 assert( (uintptr_t)stp % Alignment == 0 ); 181 printf( "CFA align_alloc %d %g\n", stp->x, stp->y ); 182 free( stp ); 183 184 stp = align_alloc( Alignment, fill ); // CFA memalign, fill 185 assert( (uintptr_t)stp % Alignment == 0 ); 186 printf( "CFA align_alloc fill %#x %a\n", stp->x, stp->y ); 188 stp = &(*alloc_align( Alignment)){ 42, 42.5 }; // CFA alloc_align 189 assert( (uintptr_t)stp % Alignment == 0 ); 190 printf( "CFA alloc_align %d %g\n", stp->x, stp->y ); 191 free( stp ); 192 193 stp = &(*alloc_align( Alignment )){ 42, 42.5 }; // CFA alloc_align 194 assert( (uintptr_t)stp % Alignment == 0 ); 195 printf( "CFA alloc_align %d %g\n", stp->x, stp->y ); 196 free( stp ); 197 198 stp = alloc_align_set( Alignment, fill ); // CFA memalign, fill 199 assert( (uintptr_t)stp % Alignment == 0 ); 200 printf( "CFA alloc_align fill %#x %a\n", stp->x, stp->y ); 201 free( stp ); 202 203 stp = alloc_align_set( Alignment, (Struct){ 42, 42.5 } ); // CFA memalign, fill 204 assert( (uintptr_t)stp % Alignment == 0 ); 205 printf( "CFA alloc_align fill %d %g\n", stp->x, stp->y ); 206 // do not free 207 208 stp = &(*alloc_align( stp, 4096 )){ 42, 42.5 }; // CFA realign 209 assert( (uintptr_t)stp % 4096 == 0 ); 210 printf( "CFA alloc_align %d %g\n", stp->x, stp->y ); 187 211 free( stp ); 188 212 … … 191 215 printf( "\n" ); 192 216 193 stp = al ign_alloc( Alignment, dim ); // CFA array memalign217 stp = alloc_align( Alignment, dim ); // CFA array memalign 194 218 assert( (uintptr_t)stp % Alignment == 0 ); 195 219 for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; } 196 printf( "CFA array al ign_alloc\n" );220 printf( "CFA array alloc_align\n" ); 197 221 for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); } 198 222 printf( "\n" ); 199 223 free( stp ); 200 224 201 stp = al ign_alloc( Alignment, dim, fill );// CFA array memalign, fill202 assert( (uintptr_t)stp % Alignment == 0 ); 203 printf( "CFA array al ign_alloc, fill\n" );225 stp = alloc_align_set( Alignment, dim, fill ); // CFA array memalign, fill 226 assert( (uintptr_t)stp % Alignment == 0 ); 227 printf( "CFA array alloc_align, fill\n" ); 204 228 for ( i; dim ) { printf( "%#x %a, ", stp[i].x, stp[i].y ); } 229 printf( "\n" ); 230 free( stp ); 231 232 stp = alloc_align_set( Alignment, dim, (Struct){ 42, 42.5 } ); // CFA array memalign, fill 233 assert( (uintptr_t)stp % Alignment == 0 ); 234 printf( "CFA array alloc_align, fill\n" ); 235 for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); } 236 printf( "\n" ); 237 // do not free 238 239 stp1 = alloc_align_set( Alignment, dim, stp ); // CFA array memalign, fill 240 assert( (uintptr_t)stp % Alignment == 0 ); 241 printf( "CFA array alloc_align, fill array\n" ); 242 for ( i; dim ) { printf( "%d %g, ", stp1[i].x, stp1[i].y ); } 243 printf( "\n" ); 244 free( stp1 ); 245 246 stp = alloc_align( stp, 4096, dim ); // CFA aligned realloc array 247 assert( (uintptr_t)stp % 4096 == 0 ); 248 for ( i; dim ) { stp[i] = (Struct){ 42, 42.5 }; } 249 printf( "CFA realloc array alloc_align\n" ); 250 for ( i; dim ) { printf( "%d %g, ", stp[i].x, stp[i].y ); } 205 251 printf( "\n" ); 206 252 free( stp ); -
tests/concurrent/examples/quickSort.cfa
rc921712 rc3a2007 11 11 // Created On : Wed Dec 6 12:15:52 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri Jun 21 08:27:45201914 // Update Count : 17 213 // Last Modified On : Thu Oct 10 13:58:18 2019 14 // Update Count : 176 15 15 // 16 16 … … 66 66 if ( depth > 0 ) { 67 67 depth -= 1; 68 Quicksort rqs = { values, low, right, depth }; // concurrently sort upper half 69 //Quicksort lqs( values, left, high, depth ); // concurrently sort lower half 70 sort( values, left, high, depth ); // concurrently sort lower half 68 Quicksort lqs = { values, low, right, depth }; // concurrently sort lower half 69 Quicksort rqs = { values, left, high, depth }; // concurrently sort upper half 70 // Quicksort lqs = { values, low, right, depth }; // concurrently sort lower half 71 // sort( values, left, high, depth ); // concurrently sort upper half 71 72 } else { 72 73 sort( values, low, right, 0 ); // sequentially sort lower half … … 162 163 processor processors[ (1 << depth) - 1 ] __attribute__(( unused )); // create 2^depth-1 kernel threads 163 164 164 int * values = alloc( size ); // values to be sorted, too large to put on stack165 for ( counter; size ) { // generate unsorted numbers165 int * values = alloc( size ); // values to be sorted, too large to put on stack 166 for ( counter; size ) { // generate unsorted numbers 166 167 values[counter] = size - counter; // descending values 168 } // for 169 for ( int i = 0; i < 200; i +=1 ) { // random shuffle a few values 170 swap( values[rand() % size], values[rand() % size] ); 167 171 } // for 168 172 { … … 178 182 } // main 179 183 184 // for depth in 0 1 2 3 4 5 ; do echo "sort 500000000 values with ${depth} depth" ; time -f "%Uu %Ss %E %Mkb" a.out -t 500000000 ${depth} ; done 185 180 186 // Local Variables: // 181 187 // tab-width: 4 // -
tests/labelledExit.cfa
rc921712 rc3a2007 10 10 // Created On : Wed Aug 10 07:29:39 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Nov 6 17:57:42 201813 // Update Count : 412 // Last Modified On : Fri Oct 25 17:41:51 2019 13 // Update Count : 7 14 14 // 15 15 … … 136 136 } 137 137 138 // all nested control options, labelled exits 139 140 Comp: { 141 Try: try { 142 For: for ( ;; ) { 143 While: while ( true ) { 144 Do: do { 145 If: if ( true ) { 146 Switch2: switch ( 3 ) { 147 case 3: 148 break Try; 149 break Comp; 150 break For; continue For; 151 break While; continue While; 152 break Do; continue Do; 153 break If; 154 break Switch2; 155 } // switch 156 } // if 157 } while ( true ); 158 } // while 159 } // for 160 } finally {} // always executed 161 } // compound 162 138 163 // computed goto 139 164 // { -
tests/pybin/settings.py
rc921712 rc3a2007 96 96 distribute = False 97 97 98 self.string = "installed" if value else "in -tree"99 self.flags = """ INSTALL_FLAGS=%s""" % ("" if value else "-in-tree")98 self.string = "installed" if value else "in tree" 99 self.flags = """installed=%s""" % ("yes" if value else "no") 100 100 101 101 class Timeouts: -
tests/pybin/tools.py
rc921712 rc3a2007 343 343 # make a directory for this test 344 344 # mkdir makes the parent directory only so add a dummy 345 mkdir(os.path.join(dst, "dir"))345 mkdir(os.path.join(dst, name )) 346 346 347 347 # moves the files -
tools/Makefile.in
rc921712 rc3a2007 208 208 CCDEPMODE = @CCDEPMODE@ 209 209 CFACC = @CFACC@ 210 CFACC_INSTALL = @CFACC_INSTALL@ 210 211 CFACPP = @CFACPP@ 211 212 CFA_BACKEND_CC = @CFA_BACKEND_CC@ -
tools/prettyprinter/Makefile.in
rc921712 rc3a2007 237 237 CCDEPMODE = @CCDEPMODE@ 238 238 CFACC = @CFACC@ 239 CFACC_INSTALL = @CFACC_INSTALL@ 239 240 CFACPP = @CFACPP@ 240 241 CFA_BACKEND_CC = @CFA_BACKEND_CC@
Note: See TracChangeset
for help on using the changeset viewer.