Changes in / [970141d:19858f6]
- Files:
-
- 2 deleted
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.in
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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/cfa.cc
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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 … … 3004 3000 case $CONFIGURATION in 3005 3001 "debug" ) 3006 CONFIG_CFLAGS="-O g-g"3002 CONFIG_CFLAGS="-O0 -g" 3007 3003 CONFIG_CFAFLAGS="-debug" 3008 3004 CONFIG_BUILDLIB="yes" -
libcfa/configure.ac
r970141d r19858f6 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 #============================================================================== … … 71 68 case $CONFIGURATION in 72 69 "debug" ) 73 CONFIG_CFLAGS="-O g-g"70 CONFIG_CFLAGS="-O0 -g" 74 71 CONFIG_CFAFLAGS="-debug" 75 72 CONFIG_BUILDLIB="yes" -
libcfa/prelude/Makefile.in
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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/stdlib.hfa
r970141d r19858f6 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 : Fri Sep 27 12:09:18 2019 13 // Update Count : 381 14 14 // 15 15 … … 81 81 } // alloc 82 82 83 T * alloc( T & fill ) { 84 return (T *)memcpy( (T *)alloc(), &fill, sizeof(T) ); // initialize with fill value 85 } // alloc 86 83 87 T * alloc( size_t dim ) { 84 88 if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc … … 88 92 T * alloc( size_t dim, char fill ) { 89 93 return (T *)memset( (T *)alloc( dim ), (int)fill, dim * sizeof(T) ); // initialize with fill value 94 } // alloc 95 96 T * alloc( 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( size_t dim, T fill[] ) { 103 return (T *)memcpy( (T *)alloc( dim ), fill, dim * sizeof(T) ); // initialize with fill value 90 104 } // alloc 91 105 -
longrun_tests/Makefile.am
r970141d r19858f6 43 43 -I$(srcdir) \ 44 44 -DTEST_$(shell cat .type | tr a-z A-Z) \ 45 -in-tree46 45 47 46 TESTS = block coroutine create disjoint enter enter3 processor stack wait yield -
longrun_tests/Makefile.in
r970141d r19858f6 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@ -
src/CodeGen/GenType.cc
r970141d r19858f6 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/GenPoly/Box.cc
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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/Makefile.am
r970141d r19858f6 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
r970141d r19858f6 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/pybin/settings.py
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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
r970141d r19858f6 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.