Changes in / [4084928e:364d70c]
- Files:
-
- 4 deleted
- 34 edited
-
.gitignore (modified) (1 diff)
-
Jenkins/FullBuild (modified) (1 diff)
-
Jenkinsfile (modified) (12 diffs)
-
Makefile.in (modified) (3 diffs)
-
configure (modified) (2 diffs)
-
configure.ac (modified) (1 diff)
-
doc/papers/general/Paper.tex (modified) (1 diff)
-
doc/user/user.tex (modified) (3 diffs)
-
src/Makefile.am (modified) (1 diff)
-
src/Makefile.in (modified) (4 diffs)
-
src/Parser/ParseNode.h (modified) (5 diffs)
-
src/Parser/StatementNode.cc (modified) (5 diffs)
-
src/Parser/parser.yy (modified) (6 diffs)
-
src/SymTab/Validate.cc (modified) (1 diff)
-
src/SynTree/AggregateDecl.cc (modified) (2 diffs)
-
src/benchmark/Makefile.am (modified) (2 diffs)
-
src/benchmark/Makefile.in (modified) (4 diffs)
-
src/cfa.make (deleted)
-
src/driver/Makefile.am (modified) (2 diffs)
-
src/driver/Makefile.in (modified) (15 diffs)
-
src/driver/as.cc (deleted)
-
src/examples/Makefile.am (modified) (1 diff)
-
src/examples/Makefile.in (modified) (4 diffs)
-
src/libcfa/Makefile.am (modified) (2 diffs)
-
src/libcfa/Makefile.in (modified) (4 diffs)
-
src/libcfa/heap.c (modified) (10 diffs)
-
src/libcfa/stdhdr/malloc.h (modified) (2 diffs)
-
src/prelude/Makefile.am (modified) (2 diffs)
-
src/prelude/Makefile.in (modified) (3 diffs)
-
src/tests/.expect/heap.txt (deleted)
-
src/tests/Makefile.am (modified) (3 diffs)
-
src/tests/Makefile.in (modified) (4 diffs)
-
src/tests/heap.c (deleted)
-
src/tests/preempt_longrun/Makefile.am (modified) (1 diff)
-
src/tests/preempt_longrun/Makefile.in (modified) (2 diffs)
-
src/tests/pybin/tools.py (modified) (1 diff)
-
tools/Makefile.in (modified) (3 diffs)
-
tools/prettyprinter/Makefile.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
r4084928e r364d70c 29 29 30 30 # src executables, for lib and bin 31 src/driver/ as31 src/driver/cc1 32 32 src/driver/cfa 33 33 src/driver/cfa-cpp 34 src/driver/cc135 34 36 35 src/prelude/bootloader.c -
Jenkins/FullBuild
r4084928e r364d70c 87 87 88 88 if(result.result != 'SUCCESS') { 89 sh("wget -q -O - http://localhost:8084/jenkins/job/Cforall/job/master/${result.number}/consoleText")89 sh("wget -q -O - ${result.absoluteUrl}/consoleText") 90 90 error(result.result) 91 91 } -
Jenkinsfile
r4084928e r364d70c 22 22 do_sendemail = true 23 23 24 builddir = pwd tmp: true25 srcdir = pwd tmp: false26 27 24 currentBuild.result = "SUCCESS" 28 25 … … 35 32 prepare_build() 36 33 34 checkout() 35 36 notify_server(0) 37 38 build() 39 40 test() 41 42 benchmark() 43 37 44 clean() 38 39 checkout()40 41 notify_server(0)42 43 build()44 45 test()46 47 benchmark()48 45 49 46 build_doc() … … 70 67 finally { 71 68 //Send email with final results if this is not a full build 72 if( do_sendemail ) {69 if( do_sendemail && !bIsSandbox ) { 73 70 echo 'Notifying users of result' 74 email(currentBuild.result, log_needed , bIsSandbox)71 email(currentBuild.result, log_needed) 75 72 } 76 73 … … 158 155 do_sendemail = ! (pSilent == 'true') 159 156 160 collect_git_info()161 162 def full = do_alltests ? " (Full)" : ""163 currentBuild.description = "${compiler.cc_name}:${arch_name}${full}"164 165 157 echo """Compiler : ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc}) 166 158 Architecture : ${arch_name} … … 172 164 Silent : ${ pSilent.toString() } 173 165 """ 166 167 collect_git_info() 174 168 } 175 169 … … 247 241 // Main compilation routines 248 242 //=========================================================================================================== 249 def clean() {250 build_stage('Cleanup') {251 // clean the build by wipping the build directory252 dir(builddir) {253 deleteDir()254 }255 256 //Clean all temporary files to make sure no artifacts of the previous build remain257 sh 'git clean -fdqx'258 259 //Reset the git repo so no local changes persist260 sh 'git reset --hard'261 }262 }263 264 243 //Compilation script is done here but environnement set-up and error handling is done in main loop 265 244 def checkout() { … … 267 246 //checkout the source code and clean the repo 268 247 checkout scm 248 249 //Clean all temporary files to make sure no artifacts of the previous build remain 250 sh 'git clean -fdqx' 251 252 //Reset the git repo so no local changes persist 253 sh 'git reset --hard' 269 254 } 270 255 } … … 272 257 def build() { 273 258 build_stage('Build') { 259 260 def install_dir = pwd tmp: true 261 274 262 // Build outside of the src tree to ease cleaning 275 dir (builddir) { 263 sh "mkdir -p build" 264 dir ('build') { 276 265 //Configure the conpilation (Output is not relevant) 277 266 //Use the current directory as the installation target so nothing escapes the sandbox 278 267 //Also specify the compiler by hand 279 sh " ${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet"268 sh "../configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet" 280 269 281 270 //Compile the project … … 288 277 build_stage('Test') { 289 278 290 dir (builddir) { 291 //Run the tests from the tests directory 292 if ( do_alltests ) { 293 sh 'make --no-print-directory -C src/tests all-tests debug=yes' 294 sh 'make --no-print-directory -C src/tests all-tests debug=no ' 295 } 296 else { 297 sh 'make --no-print-directory -C src/tests' 298 } 279 //Run the tests from the tests directory 280 if ( do_alltests ) { 281 sh 'make -C build/src/tests all-tests debug=yes --no-print-directory' 282 sh 'make -C build/src/tests all-tests debug=no --no-print-directory' 283 } 284 else { 285 sh 'make -C build/src/tests --no-print-directory' 299 286 } 300 287 } … … 306 293 if( !do_benchmark ) return 307 294 308 dir (builddir) { 309 //Append bench results 310 sh "make --no-print-directory -C src/benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json" 311 } 295 //Append bench results 296 sh 'make -C build/src/benchmark --no-print-directory jenkins githash=' + gitRefNewValue + ' arch=' + arch_name + ' | tee bench.json' 297 } 298 } 299 300 def clean() { 301 build_stage('Cleanup') { 302 // clean the build by wipping the build directory 303 sh 'rm -rf build' 312 304 } 313 305 } … … 342 334 //=========================================================================================================== 343 335 //Standard build email notification 344 def email(String status, boolean log , boolean bIsSandbox) {336 def email(String status, boolean log) { 345 337 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 346 338 //Configurations for email format … … 385 377 def email_to = "cforall@lists.uwaterloo.ca" 386 378 387 if( !bIsSandbox ) { 388 //send email notification 389 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log 390 } else { 391 echo "Would send email to: ${email_to}" 392 echo "With title: ${email_subject}" 393 echo "Content: \n${email_body}" 394 } 395 } 379 //send email notification 380 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log 381 } -
Makefile.in
r4084928e r364d70c 250 250 AWK = @AWK@ 251 251 BACKEND_CC = @BACKEND_CC@ # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command 252 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@253 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@254 252 CC = @CC@ 255 253 CCAS = @CCAS@ … … 257 255 CCASFLAGS = @CCASFLAGS@ 258 256 CCDEPMODE = @CCDEPMODE@ 259 CFACC = @CFACC@260 CFACPP = @CFACPP@261 257 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 262 258 CFA_BINDIR = @CFA_BINDIR@ … … 275 271 DEFS = @DEFS@ 276 272 DEPDIR = @DEPDIR@ 277 DRIVER_DIR = @DRIVER_DIR@278 273 ECHO_C = @ECHO_C@ 279 274 ECHO_N = @ECHO_N@ -
configure
r4084928e r364d70c 674 674 build_cpu 675 675 build 676 BUILD_IN_TREE_FLAGS677 BUILD_IN_TREE_FLAGS_NOLIB678 CFACPP679 CFACC680 DRIVER_DIR681 676 CFA_LIBDIR 682 677 CFA_BINDIR … … 3380 3375 3381 3376 3382 # Create variables for commonly used targets3383 DRIVER_DIR='$(top_builddir)/src/driver'3384 CFACC=${DRIVER_DIR}/cfa3385 CFACPP=${DRIVER_DIR}/cfa-cpp3386 3387 3388 3389 3390 # Flag variables needed to build in tree3391 LIBCFA_SRC='$(top_srcdir)/src/libcfa'3392 LIBCFA_BUILD='$(top_builddir)/src/libcfa'3393 BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}"3394 BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr"3395 3396 3397 3398 3377 # Make sure we can run config.sub. 3399 3378 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -
configure.ac
r4084928e r364d70c 170 170 AC_DEFINE_UNQUOTED(CFA_LIBDIR, "${cfa_libdir}", [Location of cc1 and cfa-cpp commands.]) 171 171 AC_SUBST(CFA_LIBDIR, ${cfa_libdir}) 172 173 # Create variables for commonly used targets174 DRIVER_DIR='$(top_builddir)/src/driver'175 CFACC=${DRIVER_DIR}/cfa176 CFACPP=${DRIVER_DIR}/cfa-cpp177 AC_SUBST(DRIVER_DIR)178 AC_SUBST(CFACC)179 AC_SUBST(CFACPP)180 181 # Flag variables needed to build in tree182 LIBCFA_SRC='$(top_srcdir)/src/libcfa'183 LIBCFA_BUILD='$(top_builddir)/src/libcfa'184 BUILD_IN_TREE_FLAGS_NOLIB="-XCFA -t -B${DRIVER_DIR}"185 BUILD_IN_TREE_FLAGS="${BUILD_IN_TREE_FLAGS_NOLIB} -L${LIBCFA_BUILD} -I${LIBCFA_SRC} -I${LIBCFA_SRC}/containers -I${LIBCFA_SRC}/concurrency -I${LIBCFA_SRC}/stdhdr"186 AC_SUBST(BUILD_IN_TREE_FLAGS_NOLIB)187 AC_SUBST(BUILD_IN_TREE_FLAGS)188 172 189 173 AC_CANONICAL_BUILD -
doc/papers/general/Paper.tex
r4084928e r364d70c 203 203 The C programming language is a foundational technology for modern computing with millions of lines of code implementing everything from hobby projects to commercial operating-systems. 204 204 This installation base and the programmers producing it represent a massive software-engineering investment spanning decades and likely to continue for decades more. 205 Nevertheless, C, first standardized almost thirty years ago, lacks many features that make programming in more modern languages safer and more productive.205 Nevertheless, C, first standardized almost forty years ago, lacks many features that make programming in more modern languages safer and more productive. 206 206 207 207 The goal of the \CFA project (pronounced ``C-for-all'') is to create an extension of C that provides modern safety and productivity features while still ensuring strong backwards compatibility with C and its programmers. -
doc/user/user.tex
r4084928e r364d70c 11 11 %% Created On : Wed Apr 6 14:53:29 2016 12 12 %% Last Modified By : Peter A. Buhr 13 %% Last Modified On : Thu Jul 26 17:29:05201814 %% Update Count : 336 613 %% Last Modified On : Mon Jul 9 10:49:52 2018 14 %% Update Count : 3361 15 15 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 16 16 … … 5967 5967 void * memalign( size_t align, size_t size );§\indexc{memalign}§ 5968 5968 int posix_memalign( void ** ptr, size_t align, size_t size );§\indexc{posix_memalign}§ 5969 } 5970 5971 // §\CFA§ safe equivalents, i.e., implicit size specification 5972 forall( dtype T | sized(T) ) T * malloc( void ); 5973 forall( dtype T | sized(T) ) T * calloc( size_t dim ); 5974 forall( dtype T | sized(T) ) T * realloc( T * ptr, size_t size ); 5975 forall( dtype T | sized(T) ) T * memalign( size_t align ); 5976 forall( dtype T | sized(T) ) T * aligned_alloc( size_t align ); 5977 forall( dtype T | sized(T) ) int posix_memalign( T ** ptr, size_t align ); 5978 5979 // §\CFA§ safe general allocation, fill, resize, array 5980 forall( dtype T | sized(T) ) T * alloc( void );§\indexc{alloc}§ 5981 forall( dtype T | sized(T) ) T * alloc( char fill ); 5982 forall( dtype T | sized(T) ) T * alloc( size_t dim ); 5983 forall( dtype T | sized(T) ) T * alloc( size_t dim, char fill ); 5984 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim ); 5985 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill ); 5986 5987 // §\CFA§ safe general allocation, align, fill, array 5988 forall( dtype T | sized(T) ) T * align_alloc( size_t align ); 5989 forall( dtype T | sized(T) ) T * align_alloc( size_t align, char fill ); 5990 forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim ); 5991 forall( dtype T | sized(T) ) T * align_alloc( size_t align, size_t dim, char fill ); 5969 5992 5970 5993 // C unsafe initialization/copy 5994 extern "C" { 5971 5995 void * memset( void * dest, int c, size_t size ); 5972 5996 void * memcpy( void * dest, const void * src, size_t size ); 5973 5997 } 5974 5998 5975 forall( dtype T | sized(T) ) {5976 // §\CFA§ safe equivalents, i.e., implicit size specification5977 T * malloc( void );5978 T * calloc( size_t dim );5979 T * realloc( T * ptr, size_t size );5980 T * memalign( size_t align );5981 T * aligned_alloc( size_t align );5982 int posix_memalign( T ** ptr, size_t align );5983 5984 // §\CFA§ safe general allocation, fill, resize, array5985 T * alloc( void );§\indexc{alloc}§5986 T * alloc( char fill );5987 T * alloc( size_t dim );5988 T * alloc( size_t dim, char fill );5989 T * alloc( T ptr[], size_t dim );5990 T * alloc( T ptr[], size_t dim, char fill );5991 5992 // §\CFA§ safe general allocation, align, fill, array5993 T * align_alloc( size_t align );5994 T * align_alloc( size_t align, char fill );5995 T * align_alloc( size_t align, size_t dim );5996 T * align_alloc( size_t align, size_t dim, char fill );5997 5998 5999 // §\CFA§ safe initialization/copy, i.e., implicit size specification 5999 T * memset( T * dest, char c );§\indexc{memset}§6000 T * memcpy( T * dest, const T * src );§\indexc{memcpy}§6000 forall( dtype T | sized(T) ) T * memset( T * dest, char c );§\indexc{memset}§ 6001 forall( dtype T | sized(T) ) T * memcpy( T * dest, const T * src );§\indexc{memcpy}§ 6001 6002 6002 6003 // §\CFA§ safe initialization/copy array 6003 T * amemset( T dest[], char c, size_t dim ); 6004 T * amemcpy( T dest[], const T src[], size_t dim ); 6005 } 6004 forall( dtype T | sized(T) ) T * memset( T dest[], size_t dim, char c ); 6005 forall( dtype T | sized(T) ) T * memcpy( T dest[], const T src[], size_t dim ); 6006 6006 6007 6007 // §\CFA§ allocation/deallocation and constructor/destructor … … 6063 6063 forall( otype T | { int ?<?( T, T ); } ) 6064 6064 void qsort( const T * arr, size_t dim );§\indexc{qsort}§ 6065 6066 forall( otype E | { int ?<?( E, E ); } ) {6067 E * bsearch( E key, const E * vals, size_t dim );§\indexc{bsearch}§ §\C{// location}§6068 size_t bsearch( E key, const E * vals, size_t dim );§\C{// position}§6069 E * bsearchl( E key, const E * vals, size_t dim );§\indexc{bsearchl}§6070 size_t bsearchl( E key, const E * vals, size_t dim );6071 E * bsearchu( E key, const E * vals, size_t dim );§\indexc{bsearchu}§6072 size_t bsearchu( E key, const E * vals, size_t dim );6073 }6074 6075 forall( otype K, otype E | { int ?<?( K, K ); K getKey( const E & ); } ) {6076 E * bsearch( K key, const E * vals, size_t dim );6077 size_t bsearch( K key, const E * vals, size_t dim );6078 E * bsearchl( K key, const E * vals, size_t dim );6079 size_t bsearchl( K key, const E * vals, size_t dim );6080 E * bsearchu( K key, const E * vals, size_t dim );6081 size_t bsearchu( K key, const E * vals, size_t dim );6082 }6083 6084 forall( otype E | { int ?<?( E, E ); } ) {6085 void qsort( E * vals, size_t dim );§\indexc{qsort}§6086 }6087 6065 \end{cfa} 6088 6066 -
src/Makefile.am
r4084928e r364d70c 42 42 43 43 # put into lib for now 44 cfa_cpplibdir = $ (CFA_LIBDIR)44 cfa_cpplibdir = ${CFA_LIBDIR} 45 45 cfa_cpplib_PROGRAMS = driver/cfa-cpp demangler 46 46 47 driver_cfa_cpp_SOURCES = $ (SRC)47 driver_cfa_cpp_SOURCES = ${SRC} 48 48 driver_cfa_cpp_LDADD = -ldl # yywrap 49 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$ (srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++1449 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14 50 50 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 51 51 -
src/Makefile.in
r4084928e r364d70c 474 474 AWK = @AWK@ 475 475 BACKEND_CC = @BACKEND_CC@ 476 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@477 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@478 476 CC = @CC@ 479 477 CCAS = @CCAS@ … … 481 479 CCASFLAGS = @CCASFLAGS@ 482 480 CCDEPMODE = @CCDEPMODE@ 483 CFACC = @CFACC@484 CFACPP = @CFACPP@485 481 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 486 482 CFA_BINDIR = @CFA_BINDIR@ … … 499 495 DEFS = @DEFS@ 500 496 DEPDIR = @DEPDIR@ 501 DRIVER_DIR = @DRIVER_DIR@502 497 ECHO_C = @ECHO_C@ 503 498 ECHO_N = @ECHO_N@ … … 651 646 652 647 # put into lib for now 653 cfa_cpplibdir = $ (CFA_LIBDIR)654 driver_cfa_cpp_SOURCES = $ (SRC)648 cfa_cpplibdir = ${CFA_LIBDIR} 649 driver_cfa_cpp_SOURCES = ${SRC} 655 650 driver_cfa_cpp_LDADD = -ldl # yywrap 656 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I$ (srcdir)/Parser -I$(srcdir)/include -DYY_NO_INPUT -O2 -g -std=c++14651 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I./Parser -I${abs_top_srcdir}/src/Parser -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14 657 652 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic 658 653 demangler_SOURCES = SymTab/demangler.cc -
src/Parser/ParseNode.h
r4084928e r364d70c 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 4 09:39:40 201813 // Update Count : 85 312 // Last Modified On : Fri Jul 20 14:56:30 2018 13 // Update Count : 850 14 14 // 15 15 … … 132 132 void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {} 133 133 134 Expression *get_expr() const { return expr.get(); }135 134 template<typename T> 136 135 bool isExpressionType() const { return nullptr != dynamic_cast<T>(expr.get()); } … … 391 390 Statement * build_expr( ExpressionNode * ctl ); 392 391 393 struct IfCt rl {394 IfCt rl( DeclarationNode * decl, ExpressionNode * condition ) :392 struct IfCtl { 393 IfCtl( DeclarationNode * decl, ExpressionNode * condition ) : 395 394 init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {} 396 395 … … 399 398 }; 400 399 401 struct ForCt rl {402 ForCt rl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :400 struct ForCtl { 401 ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : 403 402 init( new StatementNode( build_expr( expr ) ) ), condition( condition ), change( change ) {} 404 ForCt rl( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) :403 ForCtl( DeclarationNode * decl, ExpressionNode * condition, ExpressionNode * change ) : 405 404 init( new StatementNode( decl ) ), condition( condition ), change( change ) {} 406 405 … … 410 409 }; 411 410 412 Expression * build_if_control( IfCt rl * ctl, std::list< Statement * > & init );413 Statement * build_if( IfCt rl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );411 Expression * build_if_control( IfCtl * ctl, std::list< Statement * > & init ); 412 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 414 413 Statement * build_switch( bool isSwitch, ExpressionNode * ctl, StatementNode * stmt ); 415 414 Statement * build_case( ExpressionNode * ctl ); 416 415 Statement * build_default(); 417 Statement * build_while( IfCt rl * ctl, StatementNode * stmt );416 Statement * build_while( IfCtl * ctl, StatementNode * stmt ); 418 417 Statement * build_do_while( ExpressionNode * ctl, StatementNode * stmt ); 419 Statement * build_for( ForCt rl * forctl, StatementNode * stmt );418 Statement * build_for( ForCtl * forctl, StatementNode * stmt ); 420 419 Statement * build_branch( BranchStmt::Type kind ); 421 420 Statement * build_branch( std::string * identifier, BranchStmt::Type kind ); -
src/Parser/StatementNode.cc
r4084928e r364d70c 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 4 09:39:25201813 // Update Count : 36 312 // Last Modified On : Tue Jun 5 08:58:34 2018 13 // Update Count : 362 14 14 // 15 15 … … 78 78 } // build_expr 79 79 80 Expression * build_if_control( IfCt rl * ctl, std::list< Statement * > & init ) {80 Expression * build_if_control( IfCtl * ctl, std::list< Statement * > & init ) { 81 81 if ( ctl->init != 0 ) { 82 82 buildMoveList( ctl->init, init ); … … 100 100 } // build_if_control 101 101 102 Statement * build_if( IfCt rl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ) {102 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ) { 103 103 Statement * thenb, * elseb = nullptr; 104 104 std::list< Statement * > branches; … … 145 145 } // build_default 146 146 147 Statement * build_while( IfCt rl * ctl, StatementNode * stmt ) {147 Statement * build_while( IfCtl * ctl, StatementNode * stmt ) { 148 148 std::list< Statement * > branches; 149 149 buildMoveList< Statement, StatementNode >( stmt, branches ); … … 164 164 } // build_do_while 165 165 166 Statement * build_for( ForCt rl * forctl, StatementNode * stmt ) {166 Statement * build_for( ForCtl * forctl, StatementNode * stmt ) { 167 167 std::list< Statement * > branches; 168 168 buildMoveList< Statement, StatementNode >( stmt, branches ); -
src/Parser/parser.yy
r4084928e r364d70c 10 10 // Created On : Sat Sep 1 20:22:55 2001 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Aug 4 09:38:36201813 // Update Count : 3 98612 // Last Modified On : Wed Jul 25 15:54:35 2018 13 // Update Count : 3841 14 14 // 15 15 … … 186 186 } // fieldDecl 187 187 188 ForCtrl * forCtrl( ExpressionNode * type, string * index, ExpressionNode * start, ExpressionNode * comp, ExpressionNode * inc ) {189 return new ForCtrl(190 distAttr( DeclarationNode::newTypeof( type ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),191 new ExpressionNode( build_binary_val( OperKinds::LThan, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ),192 new ExpressionNode( build_binary_val( OperKinds::PlusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );193 } // forCtrl194 195 196 188 bool forall = false, yyy = false; // aggregate have one or more forall qualifiers ? 197 189 … … 225 217 WaitForStmt * wfs; 226 218 Expression * constant; 227 IfCt rl * ifctl;228 ForCt rl * fctl;219 IfCtl * ifctl; 220 ForCtl * fctl; 229 221 LabelNode * label; 230 222 InitializerNode * in; … … 1057 1049 if_control_expression: 1058 1050 comma_expression 1059 { $$ = new IfCt rl( nullptr, $1 ); }1051 { $$ = new IfCtl( nullptr, $1 ); } 1060 1052 | c_declaration // no semi-colon 1061 { $$ = new IfCt rl( $1, nullptr ); }1053 { $$ = new IfCtl( $1, nullptr ); } 1062 1054 | cfa_declaration // no semi-colon 1063 { $$ = new IfCt rl( $1, nullptr ); }1055 { $$ = new IfCtl( $1, nullptr ); } 1064 1056 | declaration comma_expression // semi-colon separated 1065 { $$ = new IfCt rl( $1, $2 ); }1057 { $$ = new IfCtl( $1, $2 ); } 1066 1058 ; 1067 1059 … … 1119 1111 WHILE '(' push if_control_expression ')' statement pop 1120 1112 { $$ = new StatementNode( build_while( $4, $6 ) ); } 1121 | WHILE '(' ')' statement // CFA => while ( 1 )1122 { $$ = new StatementNode( build_while( new IfCtrl( nullptr, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ), $4 ) ); }1123 1113 | DO statement WHILE '(' comma_expression ')' ';' 1124 1114 { $$ = new StatementNode( build_do_while( $5, $2 ) ); } 1125 | DO statement WHILE '(' ')' ';' // CFA => do while( 1 )1126 { $$ = new StatementNode( build_do_while( new ExpressionNode( build_constantInteger( *new string( "1" ) ) ), $2 ) ); }1127 1115 | FOR '(' push for_control_expression ')' statement pop 1128 1116 { $$ = new StatementNode( build_for( $4, $6 ) ); } … … 1130 1118 1131 1119 for_control_expression: 1132 comma_expression_opt // CFA 1133 { 1134 if ( ! $1 ) { // => for ( ;; ) 1135 $$ = new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ); 1136 } else { 1137 $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), $1->clone(), 1138 new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); 1139 } // if 1140 } 1141 | constant_expression '~' constant_expression // CFA 1142 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); } 1143 | constant_expression '~' constant_expression '~' constant_expression // CFA 1144 { $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $3, $5 ); } 1145 | comma_expression_opt ';' comma_expression // CFA 1146 { 1147 if ( ! $1 ) { 1148 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1149 } else if ( ! $3 ) { 1150 SemanticError( yylloc, "Missing loop range." ); $$ = nullptr; 1151 } else { 1152 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1153 $$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ), $3->clone(), 1154 new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); 1155 } else { 1156 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1157 } // if 1158 } // if 1159 } 1160 | comma_expression_opt ';' constant_expression '~' constant_expression // CFA 1161 { 1162 if ( ! $1 ) { 1163 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1164 } else { 1165 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1166 $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); 1167 } else { 1168 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1169 } // if 1170 } // if 1171 } 1172 | comma_expression_opt ';' constant_expression '~' constant_expression '~' constant_expression // CFA 1173 { 1174 if ( ! $1 ) { 1175 SemanticError( yylloc, "Missing loop index." ); $$ = nullptr; 1176 } else { 1177 if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) { 1178 $$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $5, $7 ); 1179 } else { 1180 SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr; 1181 } // if 1182 } // if 1183 } 1184 | comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt 1185 { $$ = new ForCtrl( $1, $3, $5 ); } 1186 | declaration comma_expression_opt ';' comma_expression_opt // C99, declaration has ';' 1187 { $$ = new ForCtrl( $1, $2, $4 ); } 1120 comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt 1121 { $$ = new ForCtl( $1, $3, $5 ); } 1122 | declaration comma_expression_opt ';' comma_expression_opt // C99 1123 { $$ = new ForCtl( $1, $2, $4 ); } 1188 1124 ; 1189 1125 -
src/SymTab/Validate.cc
r4084928e r364d70c 738 738 forwardEnums.erase( fwds ); 739 739 } // if 740 741 for ( Declaration * member : enumDecl->members ) {742 ObjectDecl * field = strict_dynamic_cast<ObjectDecl *>( member );743 if ( field->init ) {744 // need to resolve enumerator initializers early so that other passes that determine if an expression is constexpr have the appropriate information.745 SingleInit * init = strict_dynamic_cast<SingleInit *>( field->init );746 ResolvExpr::findSingleExpression( init->value, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), indexer );747 }748 }749 740 } // if 750 741 } -
src/SynTree/AggregateDecl.cc
r4084928e r364d70c 86 86 std::string TraitDecl::typeString() const { return "trait"; } 87 87 88 namespace { 89 long long int getConstValue( Expression * expr ) { 90 if ( CastExpr * castExpr = dynamic_cast< CastExpr * > ( expr ) ) { 91 return getConstValue( castExpr->arg ); 92 } else if ( ConstantExpr * constExpr = dynamic_cast< ConstantExpr * >( expr ) ) { 93 return constExpr->intValue(); 94 // can be -1, +1, etc. 95 // } else if ( UntypedExpr * untypedExpr = dynamic_cast< UntypedExpr * >( expr ) ) { 96 // if ( untypedExpr-> ) 97 } else { 98 assertf( false, "Unhandled expression type in getConstValue for enumerators: %s", toString( expr ).c_str() ); 99 } 100 } 101 } 102 88 103 bool EnumDecl::valueOf( Declaration * enumerator, long long int & value ) { 89 104 if ( enumValues.empty() ) { … … 93 108 if ( field->init ) { 94 109 SingleInit * init = strict_dynamic_cast< SingleInit * >( field->init ); 95 auto result = eval( init->value ); 96 if ( ! result.second ) SemanticError( init->location, toString( "Non-constexpr in initialization of enumerator: ", field ) ); 97 currentValue = result.first; 110 currentValue = getConstValue( init->value ); 98 111 } 99 112 assertf( enumValues.count( field->name ) == 0, "Enum %s has multiple members with the name %s", name.c_str(), field->name.c_str() ); -
src/benchmark/Makefile.am
r4084928e r364d70c 18 18 CFLAGS = 19 19 AM_CFLAGS = \ 20 -XCFA \ 21 -t \ 22 -B${abs_top_builddir}/src/driver \ 20 23 -g \ 21 24 -O2 \ … … 24 27 -quiet \ 25 28 -I$(srcdir) \ 26 @BUILD_IN_TREE_FLAGS@ 27 28 CC = @CFACC@ 29 -L${abs_top_builddir}/src/libcfa \ 30 -I${abs_top_srcdir}/src/libcfa \ 31 -I${abs_top_srcdir}/src/libcfa/containers \ 32 -I${abs_top_srcdir}/src/libcfa/concurrency \ 33 -I${abs_top_srcdir}/src/libcfa/stdhdr 34 35 CC = ${top_builddir}/src/driver/cfa 29 36 TOOLSDIR = ${abs_top_srcdir}/tools/ 30 37 REPEAT = ${TOOLSDIR}repeat -
src/benchmark/Makefile.in
r4084928e r364d70c 135 135 AWK = @AWK@ 136 136 BACKEND_CC = @BACKEND_CC@ 137 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 138 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 139 CC = @CFACC@ 137 CC = ${top_builddir}/src/driver/cfa 140 138 CCAS = @CCAS@ 141 139 CCASDEPMODE = @CCASDEPMODE@ 142 140 CCASFLAGS = @CCASFLAGS@ 143 141 CCDEPMODE = @CCDEPMODE@ 144 CFACC = @CFACC@145 CFACPP = @CFACPP@146 142 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 147 143 CFA_BINDIR = @CFA_BINDIR@ … … 162 158 DEFS = @DEFS@ 163 159 DEPDIR = @DEPDIR@ 164 DRIVER_DIR = @DRIVER_DIR@165 160 ECHO_C = @ECHO_C@ 166 161 ECHO_N = @ECHO_N@ … … 253 248 top_srcdir = @top_srcdir@ 254 249 AM_CFLAGS = \ 250 -XCFA \ 251 -t \ 252 -B${abs_top_builddir}/src/driver \ 255 253 -g \ 256 254 -O2 \ … … 259 257 -quiet \ 260 258 -I$(srcdir) \ 261 @BUILD_IN_TREE_FLAGS@ 259 -L${abs_top_builddir}/src/libcfa \ 260 -I${abs_top_srcdir}/src/libcfa \ 261 -I${abs_top_srcdir}/src/libcfa/containers \ 262 -I${abs_top_srcdir}/src/libcfa/concurrency \ 263 -I${abs_top_srcdir}/src/libcfa/stdhdr 262 264 263 265 TOOLSDIR = ${abs_top_srcdir}/tools/ -
src/driver/Makefile.am
r4084928e r364d70c 11 11 ## Created On : Sun May 31 08:49:31 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Thu Aug 2 12:18:25201814 ## Update Count : 1 413 ## Last Modified On : Mon Apr 30 17:44:17 2018 14 ## Update Count : 11 15 15 ############################################################################### 16 16 … … 48 48 cc1_SOURCES = cc1.cc 49 49 50 aslibdir = ${CFA_LIBDIR}51 aslib_PROGRAMS = as52 as_SOURCES = as.cc53 54 50 MAINTAINERCLEANFILES = $(CFA_BINDIR)/$(CFA_NAME) @CFA_PREFIX@/lib/${cc1lib_PROGRAMS} -
src/driver/Makefile.in
r4084928e r364d70c 97 97 noinst_PROGRAMS = cfa$(EXEEXT) 98 98 cc1lib_PROGRAMS = cc1$(EXEEXT) 99 aslib_PROGRAMS = as$(EXEEXT)100 99 subdir = src/driver 101 100 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 … … 108 107 CONFIG_CLEAN_FILES = 109 108 CONFIG_CLEAN_VPATH_FILES = 110 am__installdirs = "$(DESTDIR)$(aslibdir)" "$(DESTDIR)$(cc1libdir)" 111 PROGRAMS = $(aslib_PROGRAMS) $(cc1lib_PROGRAMS) $(noinst_PROGRAMS) 112 am_as_OBJECTS = as.$(OBJEXT) 113 as_OBJECTS = $(am_as_OBJECTS) 114 as_LDADD = $(LDADD) 109 am__installdirs = "$(DESTDIR)$(cc1libdir)" 110 PROGRAMS = $(cc1lib_PROGRAMS) $(noinst_PROGRAMS) 115 111 am_cc1_OBJECTS = cc1.$(OBJEXT) 116 112 cc1_OBJECTS = $(am_cc1_OBJECTS) … … 148 144 am__v_CXXLD_0 = @echo " CXXLD " $@; 149 145 am__v_CXXLD_1 = 150 SOURCES = $( as_SOURCES) $(cc1_SOURCES) $(cfa_SOURCES)151 DIST_SOURCES = $( as_SOURCES) $(cc1_SOURCES) $(cfa_SOURCES)146 SOURCES = $(cc1_SOURCES) $(cfa_SOURCES) 147 DIST_SOURCES = $(cc1_SOURCES) $(cfa_SOURCES) 152 148 am__can_run_installinfo = \ 153 149 case $$AM_UPDATE_INFO_DIR in \ … … 185 181 AWK = @AWK@ 186 182 BACKEND_CC = @BACKEND_CC@ 187 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@188 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@189 183 CC = @CC@ 190 184 CCAS = @CCAS@ … … 192 186 CCASFLAGS = @CCASFLAGS@ 193 187 CCDEPMODE = @CCDEPMODE@ 194 CFACC = @CFACC@195 CFACPP = @CFACPP@196 188 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 197 189 CFA_BINDIR = @CFA_BINDIR@ … … 210 202 DEFS = @DEFS@ 211 203 DEPDIR = @DEPDIR@ 212 DRIVER_DIR = @DRIVER_DIR@213 204 ECHO_C = @ECHO_C@ 214 205 ECHO_N = @ECHO_N@ … … 309 300 cc1libdir = ${CFA_LIBDIR} 310 301 cc1_SOURCES = cc1.cc 311 aslibdir = ${CFA_LIBDIR}312 as_SOURCES = as.cc313 302 MAINTAINERCLEANFILES = $(CFA_BINDIR)/$(CFA_NAME) @CFA_PREFIX@/lib/${cc1lib_PROGRAMS} 314 303 all: all-am … … 345 334 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 346 335 $(am__aclocal_m4_deps): 347 install-aslibPROGRAMS: $(aslib_PROGRAMS)348 @$(NORMAL_INSTALL)349 @list='$(aslib_PROGRAMS)'; test -n "$(aslibdir)" || list=; \350 if test -n "$$list"; then \351 echo " $(MKDIR_P) '$(DESTDIR)$(aslibdir)'"; \352 $(MKDIR_P) "$(DESTDIR)$(aslibdir)" || exit 1; \353 fi; \354 for p in $$list; do echo "$$p $$p"; done | \355 sed 's/$(EXEEXT)$$//' | \356 while read p p1; do if test -f $$p \357 ; then echo "$$p"; echo "$$p"; else :; fi; \358 done | \359 sed -e 'p;s,.*/,,;n;h' \360 -e 's|.*|.|' \361 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \362 sed 'N;N;N;s,\n, ,g' | \363 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \364 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \365 if ($$2 == $$4) files[d] = files[d] " " $$1; \366 else { print "f", $$3 "/" $$4, $$1; } } \367 END { for (d in files) print "f", d, files[d] }' | \368 while read type dir files; do \369 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \370 test -z "$$files" || { \371 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(aslibdir)$$dir'"; \372 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(aslibdir)$$dir" || exit $$?; \373 } \374 ; done375 376 uninstall-aslibPROGRAMS:377 @$(NORMAL_UNINSTALL)378 @list='$(aslib_PROGRAMS)'; test -n "$(aslibdir)" || list=; \379 files=`for p in $$list; do echo "$$p"; done | \380 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \381 -e 's/$$/$(EXEEXT)/' \382 `; \383 test -n "$$list" || exit 0; \384 echo " ( cd '$(DESTDIR)$(aslibdir)' && rm -f" $$files ")"; \385 cd "$(DESTDIR)$(aslibdir)" && rm -f $$files386 387 clean-aslibPROGRAMS:388 -test -z "$(aslib_PROGRAMS)" || rm -f $(aslib_PROGRAMS)389 336 install-cc1libPROGRAMS: $(cc1lib_PROGRAMS) 390 337 @$(NORMAL_INSTALL) … … 433 380 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) 434 381 435 as$(EXEEXT): $(as_OBJECTS) $(as_DEPENDENCIES) $(EXTRA_as_DEPENDENCIES)436 @rm -f as$(EXEEXT)437 $(AM_V_CXXLD)$(CXXLINK) $(as_OBJECTS) $(as_LDADD) $(LIBS)438 439 382 cc1$(EXEEXT): $(cc1_OBJECTS) $(cc1_DEPENDENCIES) $(EXTRA_cc1_DEPENDENCIES) 440 383 @rm -f cc1$(EXEEXT) … … 451 394 -rm -f *.tab.c 452 395 453 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/as.Po@am__quote@454 396 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cc1.Po@am__quote@ 455 397 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cfa.Po@am__quote@ … … 557 499 all-am: Makefile $(PROGRAMS) 558 500 installdirs: 559 for dir in "$(DESTDIR)$( aslibdir)" "$(DESTDIR)$(cc1libdir)"; do \501 for dir in "$(DESTDIR)$(cc1libdir)"; do \ 560 502 test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 561 503 done … … 593 535 clean: clean-am 594 536 595 clean-am: clean- aslibPROGRAMS clean-cc1libPROGRAMS clean-generic\596 clean-noinstPROGRAMSmostlyclean-am537 clean-am: clean-cc1libPROGRAMS clean-generic clean-noinstPROGRAMS \ 538 mostlyclean-am 597 539 598 540 distclean: distclean-am … … 614 556 info-am: 615 557 616 install-data-am: install- aslibPROGRAMS install-cc1libPROGRAMS558 install-data-am: install-cc1libPROGRAMS 617 559 618 560 install-dvi: install-dvi-am … … 660 602 ps-am: 661 603 662 uninstall-am: uninstall- aslibPROGRAMS uninstall-cc1libPROGRAMS604 uninstall-am: uninstall-cc1libPROGRAMS 663 605 @$(NORMAL_INSTALL) 664 606 $(MAKE) $(AM_MAKEFLAGS) uninstall-hook … … 666 608 667 609 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 668 clean-aslibPROGRAMS clean-cc1libPROGRAMS clean-generic \ 669 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ 670 distclean-compile distclean-generic distclean-tags distdir dvi \ 671 dvi-am html html-am info info-am install install-am \ 672 install-aslibPROGRAMS install-cc1libPROGRAMS install-data \ 673 install-data-am install-dvi install-dvi-am install-exec \ 674 install-exec-am install-exec-hook install-html install-html-am \ 675 install-info install-info-am install-man install-pdf \ 676 install-pdf-am install-ps install-ps-am install-strip \ 677 installcheck installcheck-am installdirs maintainer-clean \ 678 maintainer-clean-generic mostlyclean mostlyclean-compile \ 679 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ 680 uninstall-am uninstall-aslibPROGRAMS uninstall-cc1libPROGRAMS \ 610 clean-cc1libPROGRAMS clean-generic clean-noinstPROGRAMS \ 611 cscopelist-am ctags ctags-am distclean distclean-compile \ 612 distclean-generic distclean-tags distdir dvi dvi-am html \ 613 html-am info info-am install install-am install-cc1libPROGRAMS \ 614 install-data install-data-am install-dvi install-dvi-am \ 615 install-exec install-exec-am install-exec-hook install-html \ 616 install-html-am install-info install-info-am install-man \ 617 install-pdf install-pdf-am install-ps install-ps-am \ 618 install-strip installcheck installcheck-am installdirs \ 619 maintainer-clean maintainer-clean-generic mostlyclean \ 620 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 621 tags tags-am uninstall uninstall-am uninstall-cc1libPROGRAMS \ 681 622 uninstall-hook 682 623 -
src/examples/Makefile.am
r4084928e r364d70c 25 25 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c 26 26 27 Bench $(EXEEXT): Bench.c27 Bench : Bench.c 28 28 @for ccflags in "-debug" "-nodebug"; do \ 29 29 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\ -
src/examples/Makefile.in
r4084928e r364d70c 189 189 AWK = @AWK@ 190 190 BACKEND_CC = @BACKEND_CC@ 191 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@192 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@193 191 CC = @CFA_BINDIR@/@CFA_NAME@ 194 192 CCAS = @CCAS@ … … 196 194 CCASFLAGS = @CCASFLAGS@ 197 195 CCDEPMODE = @CCDEPMODE@ 198 CFACC = @CFACC@199 CFACPP = @CFACPP@200 196 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 201 197 CFA_BINDIR = @CFA_BINDIR@ … … 216 212 DEFS = @DEFS@ 217 213 DEPDIR = @DEPDIR@ 218 DRIVER_DIR = @DRIVER_DIR@219 214 ECHO_C = @ECHO_C@ 220 215 ECHO_N = @ECHO_N@ … … 620 615 621 616 622 Bench $(EXEEXT): Bench.c617 Bench : Bench.c 623 618 @for ccflags in "-debug" "-nodebug"; do \ 624 619 echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt Bench.c;\ -
src/libcfa/Makefile.am
r4084928e r364d70c 43 43 #use -no-include-stdhdr to prevent rebuild cycles 44 44 #The built sources must not depend on the installed headers 45 CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@${EXTRA_FLAGS}46 CC = @CFACC@45 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} 46 CC = ${abs_top_builddir}/src/driver/cfa 47 47 48 48 headers = fstream iostream iterator limits rational time stdlib common \ … … 92 92 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 93 93 94 ${libobjs} : @CFACPP@${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator94 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 95 95 96 96 libcfa_a_SOURCES = ${libsrc} -
src/libcfa/Makefile.in
r4084928e r364d70c 303 303 AWK = @AWK@ 304 304 BACKEND_CC = @BACKEND_CC@ 305 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 306 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 307 CC = @CFACC@ 305 CC = ${abs_top_builddir}/src/driver/cfa 308 306 CCAS = @CCAS@ 309 307 CCASDEPMODE = @CCASDEPMODE@ 310 308 CCASFLAGS = @CCASFLAGS@ 311 309 CCDEPMODE = @CCDEPMODE@ 312 CFACC = @CFACC@313 CFACPP = @CFACPP@314 310 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 315 311 CFA_BINDIR = @CFA_BINDIR@ … … 323 319 #use -no-include-stdhdr to prevent rebuild cycles 324 320 #The built sources must not depend on the installed headers 325 CFLAGS = -quiet -no-include-stdhdr @BUILD_IN_TREE_FLAGS@${EXTRA_FLAGS}321 CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_builddir}/src/driver ${EXTRA_FLAGS} 326 322 CPP = @CPP@ 327 323 CPPFLAGS = @CPPFLAGS@ … … 332 328 DEFS = @DEFS@ 333 329 DEPDIR = @DEPDIR@ 334 DRIVER_DIR = @DRIVER_DIR@335 330 ECHO_C = @ECHO_C@ 336 331 ECHO_N = @ECHO_N@ … … 1709 1704 ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -D__CFA_DEBUG__ -O0 ${EXTRA_FLAGS} -c -o $@ $< 1710 1705 1711 ${libobjs} : @CFACPP@${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator1706 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp ${cfalib_DATA} # add dependency to cfa-cpp so all libraries are rebuilt with new translator 1712 1707 1713 1708 maintainer-clean-local: -
src/libcfa/heap.c
r4084928e r364d70c 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 31 18:08:50201813 // Update Count : 4 7012 // Last Modified On : Thu Jul 26 22:28:23 2018 13 // Update Count : 449 14 14 // 15 15 … … 94 94 95 95 96 static _Bool checkFree = false; 97 98 inline _Bool checkFree() { 99 return checkFree; 100 } // checkFree 101 102 _Bool checkFreeOn() { 103 _Bool temp = checkFree; 104 checkFree = true; 105 return temp; 106 } // checkFreeOn 107 108 _Bool checkFreeOff() { 109 _Bool temp = checkFree; 110 checkFree = false; 111 return temp; 112 } // checkFreeOff 113 114 115 // static _Bool traceHeapTerm = false; 116 117 // inline _Bool traceHeapTerm() { 118 // return traceHeapTerm; 119 // } // traceHeapTerm 120 121 // _Bool traceHeapTermOn() { 122 // _Bool temp = traceHeapTerm; 123 // traceHeapTerm = true; 96 // static _Bool prtHeapTerm = false; 97 98 // inline _Bool prtHeapTerm() { 99 // return prtHeapTerm; 100 // } // prtHeapTerm 101 102 // _Bool prtHeapTermOn() { 103 // _Bool temp = traceHeap; 104 // traceHeap = true; 124 105 // return temp; 125 // } // traceHeapTermOn126 127 // _Bool traceHeapTermOff() {128 // _Bool temp = traceHeap Term;129 // traceHeap Term= false;106 // } // prtHeapTermOn 107 108 // _Bool prtHeapTermOff() { 109 // _Bool temp = traceHeap; 110 // traceHeap = false; 130 111 // return temp; 131 // } // traceHeapTermOff112 // } // prtHeapTermOff 132 113 133 114 … … 158 139 } // extern "C" 159 140 #endif // __CFA_DEBUG__ 141 142 143 // statically allocated variables => zero filled. 144 145 static size_t pageSize; // architecture pagesize 146 static size_t heapExpand; // sbrk advance 147 static size_t mmapStart; // cross over point for mmap 148 static unsigned int maxBucketsUsed; // maximum number of buckets in use 149 static unsigned int bucketSizes[NoBucketSizes] = { // different bucket sizes 150 16, 32, 48, 64, 151 80, 96, 112, 128, 144, 160, 192, 224, 152 256, 320, 384, 448, 512, 640, 768, 896, 153 1024, 1536, 2048, 2560, 3072, 3584, 4096, 6144, 154 8192, 9216, 10240, 11264, 12288, 13312, 14336, 15360, 155 16384, 18432, 20480, 22528, 24576, 26624, 28672, 30720, 156 32768, 36864, 40960, 45056, 49152, 53248, 57344, 61440, 157 65536, 73728, 81920, 90112, 98304, 106496, 114688, 122880, 158 131072, 147456, 163840, 180224, 196608, 212992, 229376, 245760, 159 262144, 294912, 327680, 360448, 393216, 425984, 458752, 491520, 160 524288, 655360, 786432, 917504, 1048576, 1179648, 1310720, 1441792, 161 1572864, 1703936, 1835008, 1966080, 2097152, 2621440, 3145728, 3670016, 162 4194304 163 }; 164 #ifdef FASTLOOKUP 165 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes 166 #endif // FASTLOOKUP 167 static int mmapFd = -1; // fake or actual fd for anonymous file 160 168 161 169 … … 232 240 }; // HeapManager 233 241 234 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; }235 // statically allocated variables => zero filled.236 237 238 static size_t pageSize; // architecture pagesize239 static size_t heapExpand; // sbrk advance240 static size_t mmapStart; // cross over point for mmap241 static unsigned int maxBucketsUsed; // maximum number of buckets in use242 243 // Powers of 2 are common allocation sizes, so make powers of 2 generate the minimum required size.244 static unsigned int bucketSizes[NoBucketSizes] @= { // different bucket sizes245 16, 32, 48, 64,246 64 + sizeof(HeapManager.Storage), 96, 112, 128, 128 + sizeof(HeapManager.Storage), 160, 192, 224,247 256 + sizeof(HeapManager.Storage), 320, 384, 448, 512 + sizeof(HeapManager.Storage), 640, 768, 896,248 1_024 + sizeof(HeapManager.Storage), 1_536, 2_048 + sizeof(HeapManager.Storage), 2_560, 3_072, 3_584, 4_096 + sizeof(HeapManager.Storage), 6_144,249 8_192 + sizeof(HeapManager.Storage), 9_216, 10_240, 11_264, 12_288, 13_312, 14_336, 15_360,250 16_384 + sizeof(HeapManager.Storage), 18_432, 20_480, 22_528, 24_576, 26_624, 28_672, 30_720,251 32_768 + sizeof(HeapManager.Storage), 36_864, 40_960, 45_056, 49_152, 53_248, 57_344, 61_440,252 65_536 + sizeof(HeapManager.Storage), 73_728, 81_920, 90_112, 98_304, 106_496, 114_688, 122_880,253 131_072 + sizeof(HeapManager.Storage), 147_456, 163_840, 180_224, 196_608, 212_992, 229_376, 245_760,254 262_144 + sizeof(HeapManager.Storage), 294_912, 327_680, 360_448, 393_216, 425_984, 458_752, 491_520,255 524_288 + sizeof(HeapManager.Storage), 655_360, 786_432, 917_504, 1_048_576 + sizeof(HeapManager.Storage), 1_179_648, 1_310_720, 1_441_792,256 1_572_864, 1_703_936, 1_835_008, 1_966_080, 2_097_152 + sizeof(HeapManager.Storage), 2_621_440, 3_145_728, 3_670_016,257 4_194_304 + sizeof(HeapManager.Storage)258 };259 #ifdef FASTLOOKUP260 static unsigned char lookup[LookupSizes]; // O(1) lookup for small sizes261 #endif // FASTLOOKUP262 static int mmapFd = -1; // fake or actual fd for anonymous file263 264 265 #ifdef __CFA_DEBUG__266 static _Bool heapBoot = 0; // detect recursion during boot267 #endif // __CFA_DEBUG__268 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing269 270 242 271 243 static inline _Bool setMmapStart( size_t value ) { … … 309 281 static void ^?{}( HeapManager & ) { 310 282 #ifdef __STATISTICS__ 311 // if ( traceHeapTerm() ) {283 // if ( prtHeapTerm() ) { 312 284 // printStats(); 313 // if ( checkfree() )checkFree( heapManager, true );285 // checkFree( heapManager, true ); 314 286 // } // if 315 287 #endif // __STATISTICS__ 316 288 } // ~HeapManager 317 289 290 291 #ifdef __CFA_DEBUG__ 292 static _Bool heapBoot = 0; // detect recursion during boot 293 #endif // __CFA_DEBUG__ 294 static HeapManager heapManager __attribute__(( aligned (128) )) @= {}; // size of cache line to prevent false sharing 318 295 319 296 static void memory_startup( void ) __attribute__(( constructor( STARTUP_PRIORITY_MEMORY ) )); … … 335 312 ^heapManager{}; 336 313 } // memory_shutdown 314 315 static inline size_t getKey( const HeapManager.FreeHeader & freeheader ) { return freeheader.blockSize; } 337 316 338 317 … … 363 342 static void printStats() { 364 343 char helpText[512]; 365 __cfaabi_dbg_bits_print_buffer( helpText, 512,366 "\nHeap statistics:\n"367 " malloc: calls %u / storage %llu\n"368 " calloc: calls %u / storage %llu\n"369 " memalign: calls %u / storage %llu\n"370 " cmemalign: calls %u / storage %llu\n"371 " realloc: calls %u / storage %llu\n"372 " free: calls %u / storage %llu\n"373 " mmap: calls %u / storage %llu\n"374 " munmap: calls %u / storage %llu\n"375 " sbrk: calls %u / storage %llu\n",376 malloc_calls, malloc_storage,377 calloc_calls, calloc_storage,378 memalign_calls, memalign_storage,379 cmemalign_calls, cmemalign_storage,380 realloc_calls, realloc_storage,381 free_calls, free_storage,382 mmap_calls, mmap_storage,383 munmap_calls, munmap_storage,384 sbrk_calls, sbrk_storage344 int len = snprintf( helpText, 512, 345 "\nHeap statistics:\n" 346 " malloc: calls %u / storage %llu\n" 347 " calloc: calls %u / storage %llu\n" 348 " memalign: calls %u / storage %llu\n" 349 " cmemalign: calls %u / storage %llu\n" 350 " realloc: calls %u / storage %llu\n" 351 " free: calls %u / storage %llu\n" 352 " mmap: calls %u / storage %llu\n" 353 " munmap: calls %u / storage %llu\n" 354 " sbrk: calls %u / storage %llu\n", 355 malloc_calls, malloc_storage, 356 calloc_calls, calloc_storage, 357 memalign_calls, memalign_storage, 358 cmemalign_calls, cmemalign_storage, 359 realloc_calls, realloc_storage, 360 free_calls, free_storage, 361 mmap_calls, mmap_storage, 362 munmap_calls, munmap_storage, 363 sbrk_calls, sbrk_storage 385 364 ); 365 write( statfd, helpText, len ); 386 366 } // printStats 387 367 … … 657 637 658 638 659 size_t checkFree( HeapManager & manager ) with ( manager ) {639 size_t checkFree( HeapManager & manager, _Bool prt ) with ( manager ) { 660 640 size_t total = 0; 661 641 #ifdef __STATISTICS__ 662 642 __cfaabi_dbg_bits_acquire(); 663 __cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" );643 if ( prt ) __cfaabi_dbg_bits_print_nolock( "\nBin lists (bin size : free blocks on list)\n" ); 664 644 #endif // __STATISTICS__ 665 645 for ( unsigned int i = 0; i < maxBucketsUsed; i += 1 ) { … … 679 659 } // for 680 660 #ifdef __STATISTICS__ 681 __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N );661 if ( prt ) __cfaabi_dbg_bits_print_nolock( "%7zu, %-7u ", size, N ); 682 662 if ( (i + 1) % 8 == 0 ) __cfaabi_dbg_bits_print_nolock( "\n" ); 683 663 #endif // __STATISTICS__ 684 664 } // for 685 665 #ifdef __STATISTICS__ 686 __cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total );666 if ( prt ) __cfaabi_dbg_bits_print_nolock( "\ntotal free blocks:%zu\n", total ); 687 667 __cfaabi_dbg_bits_release(); 688 668 #endif // __STATISTICS__ … … 942 922 #ifdef __STATISTICS__ 943 923 printStats(); 944 if ( checkFree() ) checkFree( heapManager);924 checkFree( heapManager, true ); 945 925 #endif // __STATISTICS__ 946 926 } // malloc_stats -
src/libcfa/stdhdr/malloc.h
r4084928e r364d70c 10 10 // Created On : Thu Jul 20 15:58:16 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 31 10:01:10201813 // Update Count : 912 // Last Modified On : Mon Jul 23 18:20:32 2018 13 // Update Count : 8 14 14 // 15 15 … … 17 17 size_t default_mmap_start(); // CFA extras 18 18 size_t default_heap_expansion(); 19 20 _Bool traceHeap();21 _Bool traceHeapOn();22 _Bool traceHeapOff();23 24 _Bool traceHeapTerm();25 _Bool traceHeapTermOn();26 _Bool traceHeapTermOff();27 28 _Bool checkFree();29 _Bool checkFreeOn();30 _Bool checkFreeOff();31 32 19 extern "C" { 33 20 size_t malloc_alignment( void * ); -
src/prelude/Makefile.am
r4084928e r364d70c 23 23 noinst_DATA = ../libcfa/libcfa-prelude.c 24 24 25 CC = @CFACC@25 CC = ${abs_top_builddir}/src/driver/cfa 26 26 27 27 $(DEPDIR) : … … 58 58 include $(DEPDIR)/builtins.Po 59 59 60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@61 ${AM_V_GEN} @CFACPP@-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install60 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 61 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 62 62 63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@64 ${AM_V_GEN} @CFACPP@-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install63 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 64 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 65 65 66 66 maintainer-clean-local : -
src/prelude/Makefile.in
r4084928e r364d70c 162 162 AWK = @AWK@ 163 163 BACKEND_CC = @BACKEND_CC@ 164 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 165 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 166 CC = @CFACC@ 164 CC = ${abs_top_builddir}/src/driver/cfa 167 165 CCAS = @CCAS@ 168 166 CCASDEPMODE = @CCASDEPMODE@ 169 167 CCASFLAGS = @CCASFLAGS@ 170 168 CCDEPMODE = @CCDEPMODE@ 171 CFACC = @CFACC@172 CFACPP = @CFACPP@173 169 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 174 170 CFA_BINDIR = @CFA_BINDIR@ … … 187 183 DEFS = @DEFS@ 188 184 DEPDIR = @DEPDIR@ 189 DRIVER_DIR = @DRIVER_DIR@190 185 ECHO_C = @ECHO_C@ 191 186 ECHO_N = @ECHO_N@ … … 531 526 include $(DEPDIR)/builtins.Po 532 527 533 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@534 ${AM_V_GEN} @CFACPP@-l prelude.cf $@ # use src/cfa-cpp as not in lib until after install535 536 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf @CFACPP@537 ${AM_V_GEN} @CFACPP@-tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install528 ../libcfa/libcfa-prelude.c : prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 529 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -l prelude.cf $@ # use src/cfa-cpp as not in lib until after install 530 531 bootloader.c : ${srcdir}/bootloader.cf prelude.cf extras.cf gcc-builtins.cf builtins.cf ${abs_top_builddir}/src/driver/cfa-cpp 532 ${AM_V_GEN}${abs_top_builddir}/src/driver/cfa-cpp -tpm ${srcdir}/bootloader.cf $@ # use src/cfa-cpp as not in lib until after install 538 533 539 534 maintainer-clean-local : -
src/tests/Makefile.am
r4084928e r364d70c 30 30 # applies to both programs 31 31 AM_CFLAGS = $(if $(test), 2> $(test), ) \ 32 -XCFA \ 33 -t \ 34 -B${abs_top_builddir}/src/driver \ 32 35 -g \ 33 36 -Wall \ 34 37 -Wno-unused-function \ 35 38 -quiet @CFA_FLAGS@ \ 39 -I. \ 36 40 -DIN_DIR="${srcdir}/.in/" \ 37 @BUILD_IN_TREE_FLAGS@ 41 -L${abs_top_builddir}/src/libcfa \ 42 -I${abs_top_srcdir}/src/libcfa \ 43 -I${abs_top_srcdir}/src/libcfa/containers \ 44 -I${abs_top_srcdir}/src/libcfa/concurrency \ 45 -I${abs_top_srcdir}/src/libcfa/stdhdr 38 46 39 47 if !BUILD_DEBUG … … 47 55 endif 48 56 49 CC = @CFACC@57 CC = ${abs_top_builddir}/src/driver/cfa 50 58 51 59 .PHONY : list … … 85 93 # implicit rule so not all test require a rule 86 94 % : %.c $(CC) 95 echo $(headers_deps) 87 96 $(COMPILE) $(abspath ${<}) -o ${@} 88 97 -
src/tests/Makefile.in
r4084928e r364d70c 181 181 AWK = @AWK@ 182 182 BACKEND_CC = @BACKEND_CC@ 183 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 184 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 185 CC = @CFACC@ 183 CC = ${abs_top_builddir}/src/driver/cfa 186 184 CCAS = @CCAS@ 187 185 CCASDEPMODE = @CCASDEPMODE@ 188 186 CCASFLAGS = @CCASFLAGS@ 189 187 CCDEPMODE = @CCDEPMODE@ 190 CFACC = @CFACC@191 CFACPP = @CFACPP@192 188 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 193 189 CFA_BINDIR = @CFA_BINDIR@ … … 206 202 DEFS = @DEFS@ 207 203 DEPDIR = @DEPDIR@ 208 DRIVER_DIR = @DRIVER_DIR@209 204 ECHO_C = @ECHO_C@ 210 205 ECHO_N = @ECHO_N@ … … 303 298 304 299 # applies to both programs 305 AM_CFLAGS = $(if $(test), 2> $(test), ) -g -Wall -Wno-unused-function \ 306 -quiet @CFA_FLAGS@ -DIN_DIR="${srcdir}/.in/" \ 307 @BUILD_IN_TREE_FLAGS@ $(am__append_1) $(am__append_2) \ 308 $(am__append_3) 300 AM_CFLAGS = $(if $(test), 2> $(test), ) -XCFA -t \ 301 -B${abs_top_builddir}/src/driver -g -Wall -Wno-unused-function \ 302 -quiet @CFA_FLAGS@ -I. -DIN_DIR="${srcdir}/.in/" \ 303 -L${abs_top_builddir}/src/libcfa \ 304 -I${abs_top_srcdir}/src/libcfa \ 305 -I${abs_top_srcdir}/src/libcfa/containers \ 306 -I${abs_top_srcdir}/src/libcfa/concurrency \ 307 -I${abs_top_srcdir}/src/libcfa/stdhdr $(am__append_1) \ 308 $(am__append_2) $(am__append_3) 309 309 fstream_test_SOURCES = fstream_test.c 310 310 avl_test_SOURCES = avltree/avl_test.c avltree/avl0.c avltree/avl1.c avltree/avl2.c avltree/avl3.c avltree/avl4.c avltree/avl-private.c … … 641 641 # implicit rule so not all test require a rule 642 642 % : %.c $(CC) 643 echo $(headers_deps) 643 644 $(COMPILE) $(abspath ${<}) -o ${@} 644 645 -
src/tests/preempt_longrun/Makefile.am
r4084928e r364d70c 32 32 BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z) 33 33 CFLAGS = ${BUILD_FLAGS} 34 CC = @CFACC@34 CC = ${top_builddir}/src/driver/cfa 35 35 36 36 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield -
src/tests/preempt_longrun/Makefile.in
r4084928e r364d70c 337 337 AWK = @AWK@ 338 338 BACKEND_CC = @BACKEND_CC@ 339 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@ 340 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@ 341 CC = @CFACC@ 339 CC = ${top_builddir}/src/driver/cfa 342 340 CCAS = @CCAS@ 343 341 CCASDEPMODE = @CCASDEPMODE@ 344 342 CCASFLAGS = @CCASFLAGS@ 345 343 CCDEPMODE = @CCDEPMODE@ 346 CFACC = @CFACC@347 CFACPP = @CFACPP@348 344 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 349 345 CFA_BINDIR = @CFA_BINDIR@ … … 362 358 DEFS = @DEFS@ 363 359 DEPDIR = @DEPDIR@ 364 DRIVER_DIR = @DRIVER_DIR@365 360 ECHO_C = @ECHO_C@ 366 361 ECHO_N = @ECHO_N@ -
src/tests/pybin/tools.py
r4084928e r364d70c 48 48 return False 49 49 50 return match.group(1) .startswith("ASCII text")50 return match.group(1) == "ASCII text" 51 51 52 52 # Remove 1 or more files silently -
tools/Makefile.in
r4084928e r364d70c 186 186 AWK = @AWK@ 187 187 BACKEND_CC = @BACKEND_CC@ 188 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@189 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@190 188 CC = @BACKEND_CC@ 191 189 CCAS = @CCAS@ … … 193 191 CCASFLAGS = @CCASFLAGS@ 194 192 CCDEPMODE = @CCDEPMODE@ 195 CFACC = @CFACC@196 CFACPP = @CFACPP@197 193 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 198 194 CFA_BINDIR = @CFA_BINDIR@ … … 211 207 DEFS = @DEFS@ 212 208 DEPDIR = @DEPDIR@ 213 DRIVER_DIR = @DRIVER_DIR@214 209 ECHO_C = @ECHO_C@ 215 210 ECHO_N = @ECHO_N@ -
tools/prettyprinter/Makefile.in
r4084928e r364d70c 210 210 AWK = @AWK@ 211 211 BACKEND_CC = @BACKEND_CC@ 212 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@213 BUILD_IN_TREE_FLAGS_NOLIB = @BUILD_IN_TREE_FLAGS_NOLIB@214 212 CC = @CC@ 215 213 CCAS = @CCAS@ … … 217 215 CCASFLAGS = @CCASFLAGS@ 218 216 CCDEPMODE = @CCDEPMODE@ 219 CFACC = @CFACC@220 CFACPP = @CFACPP@221 217 CFA_BACKEND_CC = @CFA_BACKEND_CC@ 222 218 CFA_BINDIR = @CFA_BINDIR@ … … 235 231 DEFS = @DEFS@ 236 232 DEPDIR = @DEPDIR@ 237 DRIVER_DIR = @DRIVER_DIR@238 233 ECHO_C = @ECHO_C@ 239 234 ECHO_N = @ECHO_N@
Note:
See TracChangeset
for help on using the changeset viewer.