Changes in / [19858f6:970141d]


Ignore:
Files:
2 added
45 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r19858f6 r970141d  
    264264CCDEPMODE = @CCDEPMODE@
    265265CFACC = @CFACC@
    266 CFACC_INSTALL = @CFACC_INSTALL@
    267266CFACPP = @CFACPP@
    268267CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • benchmark/Makefile.am

    r19858f6 r970141d  
    2222
    2323AM_CFLAGS = -O2 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror
    24 AM_CFAFLAGS = -quiet -nodebug
     24AM_CFAFLAGS = -quiet -nodebug -in-tree
    2525AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14
    2626
  • benchmark/Makefile.in

    r19858f6 r970141d  
    214214CCDEPMODE = @CCDEPMODE@
    215215CFACC = @CFACC@
    216 CFACC_INSTALL = @CFACC_INSTALL@
    217216CFACPP = @CFACPP@
    218217CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    376375# applies to both programs
    377376AM_CFLAGS = -O2 -Wall -Wextra -I$(srcdir) -lrt -pthread # -Werror
    378 AM_CFAFLAGS = -quiet -nodebug
     377AM_CFAFLAGS = -quiet -nodebug -in-tree
    379378AM_UPPFLAGS = -quiet -nodebug -multi -std=c++14
    380379BENCH_V_CC = $(__bench_v_CC_$(__quiet))
  • configure

    r19858f6 r970141d  
    715715BUILD_IN_TREE_FLAGS
    716716CFACPP
    717 CFACC_INSTALL
    718717CFACC
    719718DRIVER_DIR
     
    33043303DRIVER_DIR=${TOP_BUILDDIR}driver/
    33053304CFACC=${DRIVER_DIR}cfa
    3306 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME}
    33073305CFACPP=${DRIVER_DIR}cfa-cpp
    3308 
    33093306
    33103307
  • configure.ac

    r19858f6 r970141d  
    9393DRIVER_DIR=${TOP_BUILDDIR}driver/
    9494CFACC=${DRIVER_DIR}cfa
    95 CFACC_INSTALL=${CFA_BINDIR}${CFA_NAME}
    9695CFACPP=${DRIVER_DIR}cfa-cpp
    9796AC_SUBST(DRIVER_DIR)
    9897AC_SUBST(CFACC)
    99 AC_SUBST(CFACC_INSTALL)
    10098AC_SUBST(CFACPP)
    10199
  • driver/Makefile.in

    r19858f6 r970141d  
    201201CCDEPMODE = @CCDEPMODE@
    202202CFACC = @CFACC@
    203 CFACC_INSTALL = @CFACC_INSTALL@
    204203CFACPP = @CFACPP@
    205204CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • driver/cfa.cc

    r19858f6 r970141d  
    1515
    1616#include <iostream>
    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
     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
    2423
    2524#include <sys/types.h>
     
    3635// #define __DEBUG_H__
    3736
    38 // "N__=" suffix
    39 static string __CFA_FLAGPREFIX__( "__CFA_FLAG" );
     37static string __CFA_FLAGPREFIX__( "__CFA_FLAG" );               // "N__=" suffix
    4038
    4139void Putenv( char * argv[], string arg ) {
     
    5957}
    6058
    61 // check if string has suffix
    62 bool suffix( const string & arg ) {
     59bool suffix( const string & arg ) {                                             // check if string has suffix
    6360        enum { NumSuffixes = 3 };
    6461        static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" };
     
    7976static inline string dir(const string & path) {
    8077        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);
    11878}
    11979
     
    153113        bool m32 = false;                                                                       // -m32 flag
    154114        bool m64 = false;                                                                       // -m64 flag
     115        bool intree = false;                                                            // build in tree
    155116        bool compiling_libs = false;
     117        bool disttree = false;
    156118        int o_file = 0;                                                                         // -o filename position
    157 
    158         PathMode path = FromProc();
    159119
    160120        const char *args[argc + 100];                                           // cfa command line values, plus some space for additional flags
     
    211171                        } else if ( arg == "-no-include-stdhdr" ) {
    212172                                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;
    213177                        } else if ( arg == "-cfalib") {
    214178                                compiling_libs = true;
     
    319283
    320284        // add the CFA include-library paths, which allow direct access to header files without directory qualification
    321         string libbase;
    322         switch(path) {
    323         case Installed:
     285        if ( ! intree ) {
    324286                args[nargs++] = "-I" CFA_INCDIR;
    325                 // do not use during build
    326                 if ( ! noincstd_flag ) {
     287                if ( ! noincstd_flag ) {                                                // do not use during build
    327288                        args[nargs++] = "-I" CFA_INCDIR "stdhdr";
    328289                } // if
    329290                args[nargs++] = "-I" CFA_INCDIR "concurrency";
    330291                args[nargs++] = "-I" CFA_INCDIR "containers";
    331                 libbase = CFA_LIBDIR;
    332                 break;
    333         case BuildTree:
    334         case Distributed:
     292        } else {
    335293                args[nargs++] = "-I" TOP_SRCDIR "libcfa/src";
    336                 // do not use during build
    337                 if ( ! noincstd_flag ) {
     294                if ( ! noincstd_flag ) {                                                // do not use during build
    338295                        args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr";
    339296                } // if
    340297                args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency";
    341298                args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/containers";
    342 
    343                 libbase = TOP_BUILDDIR "libcfa/";
    344 
    345                 break;
    346299        } // if
    347300
     
    349302        args[nargs++] = "-imacros";
    350303        args[nargs++] = "stdbool.h";
     304
     305        string libbase;
     306        if ( ! intree ) {
     307                libbase = CFA_LIBDIR;
     308        } else {
     309                libbase = TOP_BUILDDIR "libcfa/";
     310        } // if
    351311
    352312        if( compiling_libs ) {
     
    366326        string libdir = libbase + arch + "-" + config;
    367327
    368         if (path != Distributed) {
     328        if (!disttree) {
    369329                if ( ! nolib && ! dirExists( libdir ) ) {
    370330                        cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
     
    384344        } // if
    385345
    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;
     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 );
    390352        }
    391353
     
    403365
    404366                // include the cfa library in case it is needed
    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();
     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();
    407369                args[nargs++] = "-Wl,--push-state,--as-needed";
    408370                args[nargs++] = "-lcfathread";
     
    448410
    449411        if ( bprefix.length() == 0 ) {
    450                 switch(path) {
    451                 case Installed   : bprefix = installlibdir; break;
    452                 case BuildTree   : bprefix = srcdriverdir ; break;
    453                 case Distributed : bprefix = dir(argv[0]) ; break;
     412                if(disttree) {
     413                        bprefix = dir(argv[0]);
     414                } else if(intree) {
     415                        bprefix = srcdriverdir;
     416                } else {
     417                        bprefix = installlibdir;
    454418                }
    455419                if ( bprefix[bprefix.length() - 1] != '/' ) bprefix += '/';
  • libcfa/Makefile.in

    r19858f6 r970141d  
    296296PACKAGE_VERSION = @PACKAGE_VERSION@
    297297PATH_SEPARATOR = @PATH_SEPARATOR@
     298PRELUDEFLAG = @PRELUDEFLAG@
    298299RANLIB = @RANLIB@
    299300SED = @SED@
  • libcfa/configure

    r19858f6 r970141d  
    707707CONFIG_CFLAGS
    708708ARCH_FLAGS
     709PRELUDEFLAG
    709710CFADIR_HASH
    710711LOCAL_CC1
     
    29592960if test x$enable_distcc = xno; then
    29602961        CFACC=${DRIVER_DIR}cfa
     2962        PRELUDEFLAG='-in-tree'
    29612963        echo "no"
    29622964else
     
    29662968        CFADIR_HASH=$($tools/distcc_hash $config)
    29672969        CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa"
     2970        PRELUDEFLAG='-dist-tree'
    29682971        echo "yes (hash=${CFADIR_HASH})"
    29692972fi
     
    29792982  ENABLE_DISTCC_FALSE=
    29802983fi
     2984
    29812985
    29822986
     
    30003004case $CONFIGURATION in
    30013005        "debug"   )
    3002                 CONFIG_CFLAGS="-O0 -g"
     3006                CONFIG_CFLAGS="-Og -g"
    30033007                CONFIG_CFAFLAGS="-debug"
    30043008                CONFIG_BUILDLIB="yes"
  • libcfa/configure.ac

    r19858f6 r970141d  
    3434if test x$enable_distcc = xno; then
    3535        CFACC=${DRIVER_DIR}cfa
     36        PRELUDEFLAG='-in-tree'
    3637        echo "no"
    3738else
     
    4142        CFADIR_HASH=$($tools/distcc_hash $config)
    4243        CFACC="distcc ~/.cfadistcc/${CFADIR_HASH}/cfa"
     44        PRELUDEFLAG='-dist-tree'
    4345        echo "yes (hash=${CFADIR_HASH})"
    4446fi
     
    5557AC_SUBST(CFADIR_HASH)
    5658AC_SUBST(CFA_VERSION)
     59AC_SUBST(PRELUDEFLAG)
    5760
    5861#==============================================================================
     
    6871case $CONFIGURATION in
    6972        "debug"   )
    70                 CONFIG_CFLAGS="-O0 -g"
     73                CONFIG_CFLAGS="-Og -g"
    7174                CONFIG_CFAFLAGS="-debug"
    7275                CONFIG_BUILDLIB="yes"
  • libcfa/prelude/Makefile.in

    r19858f6 r970141d  
    239239PACKAGE_VERSION = @PACKAGE_VERSION@
    240240PATH_SEPARATOR = @PATH_SEPARATOR@
     241PRELUDEFLAG = @PRELUDEFLAG@
    241242RANLIB = @RANLIB@
    242243SED = @SED@
  • libcfa/prelude/extras.regx

    r19858f6 r970141d  
    1919typedef.* uint32_t;
    2020typedef.* uint64_t;
    21 typedef.* __uint_least16_t;
    22 typedef.* __uint_least32_t;
    2321typedef.* char16_t;
    2422typedef.* char32_t;
  • libcfa/src/Makefile.am

    r19858f6 r970141d  
    3232# use -no-include-stdhdr to prevent rebuild cycles
    3333# The built sources must not depend on the installed headers
    34 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     34AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    3535AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    3636AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     
    9696
    9797prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    98         ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
     98        ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
    9999
    100100prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    101101        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
    102         $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
     102        $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
    103103
    104104#----------------------------------------------------------------------------------------------------------------
  • libcfa/src/Makefile.in

    r19858f6 r970141d  
    349349PACKAGE_VERSION = @PACKAGE_VERSION@
    350350PATH_SEPARATOR = @PATH_SEPARATOR@
     351PRELUDEFLAG = @PRELUDEFLAG@
    351352RANLIB = @RANLIB@
    352353SED = @SED@
     
    444445# use -no-include-stdhdr to prevent rebuild cycles
    445446# The built sources must not depend on the installed headers
    446 AM_CFAFLAGS = -quiet -cfalib -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
     447AM_CFAFLAGS = -quiet -cfalib @PRELUDEFLAG@ -I$(srcdir)/stdhdr $(if $(findstring ${gdbwaittarget}, ${@}), -XCFA --gdb) @CONFIG_CFAFLAGS@
    447448AM_CFLAGS = -g -Wall -Wno-unused-function -fPIC @ARCH_FLAGS@ @CONFIG_CFLAGS@
    448449AM_CCASFLAGS = -g -Wall -Wno-unused-function @ARCH_FLAGS@ @CONFIG_CFLAGS@
     
    953954
    954955prelude.o : prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    955         ${AM_V_GEN}$(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
     956        ${AM_V_GEN}$(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
    956957
    957958prelude.lo: prelude.cfa extras.cf gcc-builtins.cf builtins.cf @LOCAL_CFACC@ @CFACPP@
    958959        ${AM_V_GEN}$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile \
    959         $(CFACOMPILE) -quiet -XCFA -l ${<} -c -o ${@}
     960        $(CFACOMPILE) -quiet @PRELUDEFLAG@ -XCFA -l ${<} -c -o ${@}
    960961
    961962#----------------------------------------------------------------------------------------------------------------
  • libcfa/src/concurrency/kernel_private.hfa

    r19858f6 r970141d  
    3434static inline void WakeThread( thread_desc * thrd ) {
    3535        if( !thrd ) return;
    36 
    37         verify(thrd->state == Inactive);
    3836
    3937        disable_interrupts();
  • libcfa/src/stdlib.hfa

    r19858f6 r970141d  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 27 12:09:18 2019
    13 // Update Count     : 381
     12// Last Modified On : Tue Jul 23 14:14:59 2019
     13// Update Count     : 373
    1414//
    1515
     
    8181        } // alloc
    8282
    83         T * alloc( T & fill ) {
    84                 return (T *)memcpy( (T *)alloc(), &fill, sizeof(T) ); // initialize with fill value
    85         } // alloc
    86 
    8783        T * alloc( size_t dim ) {
    8884                if ( _Alignof(T) <= libAlign() ) return (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc
     
    9288        T * alloc( size_t dim, char fill ) {
    9389                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
    10490        } // alloc
    10591
  • longrun_tests/Makefile.am

    r19858f6 r970141d  
    4343        -I$(srcdir) \
    4444        -DTEST_$(shell cat .type | tr a-z A-Z) \
     45        -in-tree
    4546
    4647TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
  • longrun_tests/Makefile.in

    r19858f6 r970141d  
    348348CCDEPMODE = @CCDEPMODE@
    349349CFACC = @CFACC@
    350 CFACC_INSTALL = @CFACC_INSTALL@
    351350CFACPP = @CFACPP@
    352351CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • src/CodeGen/GenType.cc

    r19858f6 r970141d  
    335335                        typeString = "_Atomic " + typeString;
    336336                } // if
     337                if ( type->get_lvalue() && ! options.genC ) {
     338                        // when not generating C code, print lvalue for debugging.
     339                        typeString = "lvalue " + typeString;
     340                }
    337341        }
    338342} // namespace CodeGen
  • src/GenPoly/Box.cc

    r19858f6 r970141d  
    837837                                        deref->args.push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) );
    838838                                        deref->result = arg->get_type()->clone();
     839                                        deref->result->set_lvalue( true );
    839840                                        return deref;
    840841                                } // if
  • src/GenPoly/Lvalue.cc

    r19858f6 r970141d  
    5454                                delete ret->result;
    5555                                ret->result = base->clone();
     56                                ret->result->set_lvalue( true );
    5657                                return ret;
    5758                        } else {
     
    166167                                ReferenceType * result = strict_dynamic_cast< ReferenceType * >( appExpr->result );
    167168                                appExpr->result = result->base->clone();
     169                                appExpr->result->set_lvalue( true );
    168170                                if ( ! inIntrinsic ) {
    169171                                        // when not in an intrinsic function, add a cast to
     
    434436                                delete ret->result;
    435437                                ret->result = castExpr->result;
    436                                 assert( ret->get_lvalue() ); // ensure result is lvalue
     438                                ret->result->set_lvalue( true ); // ensure result is lvalue
    437439                                castExpr->env = nullptr;
    438440                                castExpr->arg = nullptr;
  • src/Makefile.in

    r19858f6 r970141d  
    231231        SynTree/Initializer.$(OBJEXT) \
    232232        SynTree/TypeSubstitution.$(OBJEXT) SynTree/Attribute.$(OBJEXT) \
    233         SynTree/DeclReplacer.$(OBJEXT)
     233        SynTree/DeclReplacer.$(OBJEXT) SynTree/TopLvalue.$(OBJEXT)
    234234am__objects_8 = CompilationState.$(OBJEXT) $(am__objects_1) \
    235235        $(am__objects_2) Concurrency/Keywords.$(OBJEXT) \
     
    411411CCDEPMODE = @CCDEPMODE@
    412412CFACC = @CFACC@
    413 CFACC_INSTALL = @CFACC_INSTALL@
    414413CFACPP = @CFACPP@
    415414CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    696695      SynTree/TypeSubstitution.cc \
    697696      SynTree/Attribute.cc \
    698       SynTree/DeclReplacer.cc
     697      SynTree/DeclReplacer.cc \
     698      SynTree/TopLvalue.cc
    699699
    700700
     
    10251025SynTree/DeclReplacer.$(OBJEXT): SynTree/$(am__dirstamp) \
    10261026        SynTree/$(DEPDIR)/$(am__dirstamp)
     1027SynTree/TopLvalue.$(OBJEXT): SynTree/$(am__dirstamp) \
     1028        SynTree/$(DEPDIR)/$(am__dirstamp)
    10271029Tuples/$(am__dirstamp):
    10281030        @$(MKDIR_P) Tuples
     
    13351337@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/ReferenceType.Po@am__quote@
    13361338@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@
    13371340@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/TupleExpr.Po@am__quote@
    13381341@AMDEP_TRUE@@am__include@ @am__quote@SynTree/$(DEPDIR)/TupleType.Po@am__quote@
  • src/ResolvExpr/ConversionCost.cc

    r19858f6 r970141d  
    157157                        if ( typesCompatibleIgnoreQualifiers( src, destAsRef->base, indexer, env ) ) {
    158158                                PRINT( std::cerr << "converting compatible base type" << std::endl; )
     159                                assert( src->get_lvalue() == srcIsLvalue );
    159160                                if ( srcIsLvalue ) {
    160161                                        PRINT(
  • src/ResolvExpr/ResolveAssertions.cc

    r19858f6 r970141d  
    156156                        for ( const auto& assn : x.assns ) {
    157157                                // compute conversion cost from satisfying decl to assertion
     158                                assert( !assn.match.adjType->get_lvalue() );
    158159                                k += computeConversionCost(
    159160                                        assn.match.adjType, assn.decl->get_type(), false, indexer, x.env );
  • src/SymTab/Autogen.h

    r19858f6 r970141d  
    9797                        //   type->get_qualifiers() = Type::Qualifiers();
    9898                        Type * castType = addCast->clone();
    99                         castType->get_qualifiers() -= Type::Qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
     99                        castType->get_qualifiers() -= Type::Qualifiers( Type::Lvalue | Type::Const | Type::Volatile | Type::Restrict | Type::Atomic );
    100100                        // castType->set_lvalue( true ); // xxx - might not need this
    101101                        dstParam = new CastExpr( dstParam, new ReferenceType( Type::Qualifiers(), castType ) );
  • src/SymTab/ManglerCommon.cc

    r19858f6 r970141d  
    8888                                { Type::Atomic, "DA" }, // A is array, so need something unique for atmoic. For now, go with multiletter DA
    8989                                { Type::Mutex, "X" },
     90                                { Type::Lvalue, "L" },
    9091                        };
    9192
  • src/SymTab/Validate.cc

    r19858f6 r970141d  
    8181#include "SynTree/Label.h"             // for operator==, Label
    8282#include "SynTree/Mutator.h"           // for Mutator
     83#include "SynTree/TopLvalue.h"         // for assertTopLvalue, clearInnerLvalue
    8384#include "SynTree/Type.h"              // for Type, TypeInstType, EnumInstType
    8485#include "SynTree/TypeSubstitution.h"  // for TypeSubstitution
     
    308309                PassVisitor<FixQualifiedTypes> fixQual;
    309310
     311                assertTopLvalue( translationUnit );
    310312                {
    311313                        Stats::Heap::newPass("validate-A");
     
    316318                        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
    317319                }
     320                assertTopLvalue( translationUnit );
    318321                {
    319322                        Stats::Heap::newPass("validate-B");
    320323                        Stats::Time::BlockGuard guard("validate-B");
     324                        assertTopLvalue( translationUnit );
    321325                        Stats::Time::TimeBlock("Link Reference To Types", [&]() {
    322326                                acceptAll( translationUnit, lrt ); // must happen before autogen, because sized flag needs to propagate to generated functions
    323327                        });
     328                        clearInnerLvalue( translationUnit );
     329                        assertTopLvalue( translationUnit );
    324330                        Stats::Time::TimeBlock("Fix Qualified Types", [&]() {
    325331                                mutateAll( translationUnit, fixQual ); // must happen after LinkReferenceToTypes_old, because aggregate members are accessed
    326332                        });
     333                        assertTopLvalue( translationUnit );
    327334                        Stats::Time::TimeBlock("Hoist Structs", [&]() {
    328335                                HoistStruct::hoistStruct( translationUnit ); // must happen after EliminateTypedef, so that aggregate typedefs occur in the correct order
    329336                        });
     337                        assertTopLvalue( translationUnit );
    330338                        Stats::Time::TimeBlock("Eliminate Typedefs", [&]() {
    331339                                EliminateTypedef::eliminateTypedef( translationUnit ); //
    332340                        });
    333341                }
     342                assertTopLvalue( translationUnit );
    334343                {
    335344                        Stats::Heap::newPass("validate-C");
     
    340349                        InitTweak::fixReturnStatements( translationUnit ); // must happen before autogen
    341350                }
     351                assertTopLvalue( translationUnit );
    342352                {
    343353                        Stats::Heap::newPass("validate-D");
    344354                        Stats::Time::BlockGuard guard("validate-D");
     355                        assertTopLvalue( translationUnit );
    345356                        Stats::Time::TimeBlock("Apply Concurrent Keywords", [&]() {
    346357                                Concurrency::applyKeywords( translationUnit );
    347358                        });
     359                        clearInnerLvalue( translationUnit );
     360                        assertTopLvalue( translationUnit );
    348361                        Stats::Time::TimeBlock("Forall Pointer Decay", [&]() {
    349362                                acceptAll( translationUnit, fpd ); // must happen before autogenerateRoutines, after Concurrency::applyKeywords because uniqueIds must be set on declaration before resolution
    350363                        });
     364                        assertTopLvalue( translationUnit );
    351365                        Stats::Time::TimeBlock("Hoist Control Declarations", [&]() {
    352366                                ControlStruct::hoistControlDecls( translationUnit );  // hoist initialization out of for statements; must happen before autogenerateRoutines
    353367                        });
     368                        assertTopLvalue( translationUnit );
    354369                        Stats::Time::TimeBlock("Generate Autogen routines", [&]() {
    355370                                autogenerateRoutines( translationUnit ); // moved up, used to be below compoundLiteral - currently needs EnumAndPointerDecay_old
    356371                        });
    357                 }
     372                        clearInnerLvalue( translationUnit );
     373                }
     374                assertTopLvalue( translationUnit );
    358375                {
    359376                        Stats::Heap::newPass("validate-E");
    360377                        Stats::Time::BlockGuard guard("validate-E");
     378                        assertTopLvalue( translationUnit );
    361379                        Stats::Time::TimeBlock("Implement Mutex Func", [&]() {
    362380                                Concurrency::implementMutexFuncs( translationUnit );
    363381                        });
     382                        clearInnerLvalue( translationUnit );
     383                        assertTopLvalue( translationUnit );
    364384                        Stats::Time::TimeBlock("Implement Thread Start", [&]() {
    365385                                Concurrency::implementThreadStarter( translationUnit );
    366386                        });
     387                        assertTopLvalue( translationUnit );
    367388                        Stats::Time::TimeBlock("Compound Literal", [&]() {
    368389                                mutateAll( translationUnit, compoundliteral );
    369390                        });
     391                        assertTopLvalue( translationUnit );
    370392                        Stats::Time::TimeBlock("Resolve With Expressions", [&]() {
    371393                                ResolvExpr::resolveWithExprs( translationUnit ); // must happen before FixObjectType because user-code is resolved and may contain with variables
    372394                        });
    373                 }
     395                        clearInnerLvalue( translationUnit );
     396                }
     397                assertTopLvalue( translationUnit );
    374398                {
    375399                        Stats::Heap::newPass("validate-F");
    376400                        Stats::Time::BlockGuard guard("validate-F");
     401                        assertTopLvalue( translationUnit );
    377402                        Stats::Time::TimeBlock("Fix Object Type", [&]() {
    378403                                FixObjectType::fix( translationUnit );
    379404                        });
     405                        assertTopLvalue( translationUnit );
    380406                        Stats::Time::TimeBlock("Array Length", [&]() {
    381407                                ArrayLength::computeLength( translationUnit );
    382408                        });
     409                        clearInnerLvalue( translationUnit );
     410                        assertTopLvalue( translationUnit );
    383411                        Stats::Time::TimeBlock("Find Special Declarations", [&]() {
    384412                                Validate::findSpecialDecls( translationUnit );
    385413                        });
     414                        assertTopLvalue( translationUnit );
    386415                        Stats::Time::TimeBlock("Fix Label Address", [&]() {
    387416                                mutateAll( translationUnit, labelAddrFixer );
    388417                        });
     418                        assertTopLvalue( translationUnit );
    389419                        Stats::Time::TimeBlock("Handle Attributes", [&]() {
    390420                                Validate::handleAttributes( translationUnit );
    391421                        });
    392422                }
     423                assertTopLvalue( translationUnit );
    393424        }
    394425
     
    13031334        void FixObjectType::previsit( ObjectDecl * objDecl ) {
    13041335                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 type
    13051337                objDecl->set_type( new_type );
    13061338        }
     
    13081340        void FixObjectType::previsit( FunctionDecl * funcDecl ) {
    13091341                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 type
    13101343                funcDecl->set_type( new_type );
    13111344        }
     
    13141347                if ( typeDecl->get_base() ) {
    13151348                        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 type
    13161350                        typeDecl->set_base( new_type );
    13171351                } // if
  • src/SynTree/AddressExpr.cc

    r19858f6 r970141d  
    5353                        } // if
    5454                }
     55                // result of & is never an lvalue
     56                get_result()->set_lvalue( false );
    5557        }
    5658}
  • src/SynTree/ApplicationExpr.cc

    r19858f6 r970141d  
    2525#include "Declaration.h"         // for Declaration
    2626#include "Expression.h"          // for ParamEntry, ApplicationExpr, Expression
    27 #include "InitTweak/InitTweak.h" // for getFunction
    2827#include "ResolvExpr/typeops.h"  // for extractResultType
    2928#include "Type.h"                // for Type, PointerType, FunctionType
     
    7877
    7978bool ApplicationExpr::get_lvalue() const {
    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;
     79        return result->get_lvalue();
    8680}
    8781
  • src/SynTree/ArrayType.cc

    r19858f6 r970141d  
    2626ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes )
    2727        : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) {
     28        base->set_lvalue( false );
    2829}
    2930
  • src/SynTree/CommaExpr.cc

    r19858f6 r970141d  
    2323CommaExpr::CommaExpr( Expression *arg1, Expression *arg2 )
    2424                : Expression(), arg1( arg1 ), arg2( arg2 ) {
     25        // xxx - result of a comma expression is never an lvalue, so should set lvalue
     26        // to false on all result types. Actually doing this causes some strange things
     27        // to happen in later passes (particularly, Specialize, Lvalue, and Box). This needs to be looked into.
    2528        set_result( maybeClone( arg2->get_result() ) );
     29        // get_type->set_isLvalue( false );
    2630}
    2731
     
    3640
    3741bool CommaExpr::get_lvalue() const {
    38         // This is wrong by C, but the current implementation uses it.
    39         // (ex: Specialize, Lvalue and Box)
    40         return arg2->get_lvalue();
     42        // xxx - as above, shouldn't be an lvalue but that information is used anyways.
     43        return result->get_lvalue();
    4144}
    4245
  • src/SynTree/Expression.cc

    r19858f6 r970141d  
    1919#include <iostream>                  // for ostream, operator<<, basic_ostream
    2020#include <list>                      // for list, _List_iterator, list<>::co...
    21 #include <set>                       // for set
    2221
    2322#include "Common/utility.h"          // for maybeClone, cloneAll, deleteAll
     
    6564
    6665bool Expression::get_lvalue() const {
     66        assert( !result->get_lvalue() );
    6767        return false;
    6868}
     
    115115        assert( var->get_type() );
    116116        Type * type = var->get_type()->clone();
     117        type->set_lvalue( true );
    117118
    118119        // xxx - doesn't quite work yet - get different alternatives with the same cost
     
    124125        //      long long int value;
    125126        //      if ( decl->valueOf( var, value ) ) {
    126         //              type->set_lvalue( false ); // Would have to move to get_lvalue.
     127        //              type->set_lvalue( false );
    127128        //      }
    128129        // }
     
    139140
    140141bool VariableExpr::get_lvalue() const {
    141         // It isn't always an lvalue, but it is never an rvalue.
    142         return true;
     142        return result->get_lvalue();
    143143}
    144144
     
    277277
    278278bool CastExpr::get_lvalue() const {
    279         // This is actually wrong by C, but it works with our current set-up.
    280         return arg->get_lvalue();
     279        return result->get_lvalue();
    281280}
    282281
     
    361360}
    362361
    363 bool UntypedMemberExpr::get_lvalue() const {
    364         return aggregate->get_lvalue();
    365 }
    366 
    367362void UntypedMemberExpr::print( std::ostream & os, Indenter indent ) const {
    368363        os << "Untyped Member Expression, with field: " << std::endl << indent+1;
     
    383378        sub.apply( res );
    384379        result = res;
     380        result->set_lvalue( true );
    385381        result->get_qualifiers() |= aggregate->result->get_qualifiers();
    386382}
     
    396392
    397393bool MemberExpr::get_lvalue() const {
    398         // This is actually wrong by C, but it works with our current set-up.
     394        assert( result->get_lvalue() );
    399395        return true;
    400396}
     
    431427                        // if references are still allowed in the AST, dereference returns a reference
    432428                        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 );
    433432                }
    434433        }
     
    448447
    449448bool UntypedExpr::get_lvalue() const {
    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);
     449        return result->get_lvalue();
    454450}
    455451
     
    514510
    515511bool ConditionalExpr::get_lvalue() const {
    516         return false;
     512        return result->get_lvalue();
    517513}
    518514
     
    574570
    575571bool ConstructorExpr::get_lvalue() const {
    576         return false;
     572        return result->get_lvalue();
    577573}
    578574
     
    586582CompoundLiteralExpr::CompoundLiteralExpr( Type * type, Initializer * initializer ) : initializer( initializer ) {
    587583        assert( type && initializer );
     584        type->set_lvalue( true );
    588585        set_result( type );
    589586}
     
    596593
    597594bool CompoundLiteralExpr::get_lvalue() const {
     595        assert( result->get_lvalue() );
    598596        return true;
    599597}
     
    650648}
    651649bool StmtExpr::get_lvalue() const {
    652         return false;
     650        return result->get_lvalue();
    653651}
    654652void StmtExpr::print( std::ostream & os, Indenter indent ) const {
  • src/SynTree/Expression.h

    r19858f6 r970141d  
    275275        virtual ~UntypedMemberExpr();
    276276
    277         bool get_lvalue() const final;
    278 
    279277        Expression * get_member() const { return member; }
    280278        void set_member( Expression * newValue ) { member = newValue; }
  • src/SynTree/TupleExpr.cc

    r19858f6 r970141d  
    5858
    5959bool TupleExpr::get_lvalue() const {
    60         return false;
     60        return result->get_lvalue();
    6161}
    6262
     
    7171        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() );
    7272        set_result( (*std::next( type->get_types().begin(), index ))->clone() );
     73        // like MemberExpr, TupleIndexExpr is always an lvalue
     74        get_result()->set_lvalue( true );
    7375}
    7476
     
    8183
    8284bool TupleIndexExpr::get_lvalue() const {
    83         return tuple->get_lvalue();
     85        assert( result->get_lvalue() );
     86        return true;
    8487}
    8588
  • src/SynTree/Type.cc

    r19858f6 r970141d  
    8585const char * Type::FuncSpecifiersNames[] = { "inline", "_Noreturn", "fortran" };
    8686const char * Type::StorageClassesNames[] = { "extern", "static", "auto", "register", "_Thread_local" };
    87 const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "mutex", "_Atomic" };
     87const char * Type::QualifiersNames[] = { "const", "restrict", "volatile", "lvalue", "mutex", "_Atomic" };
    8888
    8989Type * Type::stripDeclarator() {
  • src/SynTree/Type.h

    r19858f6 r970141d  
    102102        }; // StorageClasses
    103103
    104         enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Mutex = 1 << 3, Atomic = 1 << 4, NumTypeQualifier = 5 };
     104        enum { Const = 1 << 0, Restrict = 1 << 1, Volatile = 1 << 2, Lvalue = 1 << 3, Mutex = 1 << 4, Atomic = 1 << 5, NumTypeQualifier = 6 };
    105105        static const char * QualifiersNames[];
    106106        union Qualifiers {
    107                 enum { Mask = ~Restrict };
     107                enum { Mask = ~(Restrict | Lvalue) };
    108108                unsigned int val;
    109109                struct {
     
    111111                        bool is_restrict : 1;
    112112                        bool is_volatile : 1;
     113                        bool is_lvalue : 1;
    113114                        bool is_mutex : 1;
    114115                        bool is_atomic : 1;
     
    152153        bool get_volatile() const { return tq.is_volatile; }
    153154        bool get_restrict() const { return tq.is_restrict; }
     155        bool get_lvalue() const { return tq.is_lvalue; }
    154156        bool get_mutex() const { return tq.is_mutex; }
    155157        bool get_atomic() const { return tq.is_atomic; }
     
    157159        void set_volatile( bool newValue ) { tq.is_volatile = newValue; }
    158160        void set_restrict( bool newValue ) { tq.is_restrict = newValue; }
     161        void set_lvalue( bool newValue ) { tq.is_lvalue = newValue; }
    159162        void set_mutex( bool newValue ) { tq.is_mutex = newValue; }
    160163        void set_atomic( bool newValue ) { tq.is_atomic = newValue; }
  • src/SynTree/module.mk

    r19858f6 r970141d  
    4949      SynTree/TypeSubstitution.cc \
    5050      SynTree/Attribute.cc \
    51       SynTree/DeclReplacer.cc
     51      SynTree/DeclReplacer.cc \
     52      SynTree/TopLvalue.cc
    5253
    5354SRC += $(SRC_SYNTREE)
  • src/Tuples/TupleExpansion.cc

    r19858f6 r970141d  
    304304                // produce the TupleType which aggregates the types of the exprs
    305305                std::list< Type * > types;
    306                 Type::Qualifiers qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Atomic | Type::Mutex );
     306                Type::Qualifiers qualifiers( Type::Const | Type::Volatile | Type::Restrict | Type::Lvalue | Type::Atomic | Type::Mutex );
    307307                for ( Expression * expr : exprs ) {
    308308                        assert( expr->get_result() );
  • src/main.cc

    r19858f6 r970141d  
    5959#include "ResolvExpr/Resolver.h"            // for resolve
    6060#include "SymTab/Validate.h"                // for validate
     61#include "SynTree/TopLvalue.h"              // for assertTopLvalue, clearInn...
    6162#include "SynTree/Declaration.h"            // for Declaration
    6263#include "SynTree/Visitor.h"                // for acceptAll
     
    258259                Stats::Time::StopBlock();
    259260
     261                //std::cerr << "Post-Parse Check" << std::endl;
     262                clearInnerLvalue( translationUnit );
     263                assertTopLvalue( translationUnit );
     264
    260265                // add the assignment statement after the initialization of a type parameter
    261266                PASS( "Validate", SymTab::validate( translationUnit, symtabp ) );
     
    276281                } // if
    277282
     283                assertTopLvalue( translationUnit );
    278284                PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) );
     285                assertTopLvalue( translationUnit );
    279286                PASS( "Fix Names", CodeGen::fixNames( translationUnit ) );
     287                assertTopLvalue( translationUnit );
    280288                PASS( "Gen Init", InitTweak::genInit( translationUnit ) );
     289                assertTopLvalue( translationUnit );
    281290                PASS( "Expand Member Tuples" , Tuples::expandMemberTuples( translationUnit ) );
     291                assertTopLvalue( translationUnit );
    282292                if ( libcfap ) {
    283293                        // generate the bodies of cfa library functions
     
    303313                } // if
    304314
     315                assertTopLvalue( translationUnit );
     316
    305317                PASS( "Resolve", ResolvExpr::resolve( translationUnit ) );
    306318                if ( exprp ) {
     
    309321                } // if
    310322
     323                clearInnerLvalue( translationUnit );
     324                assertTopLvalue( translationUnit );
     325
    311326                // fix ObjectDecl - replaces ConstructorInit nodes
    312327                PASS( "Fix Init", InitTweak::fix( translationUnit, buildingLibrary() ) );
     328                clearInnerLvalue( translationUnit );
     329                assertTopLvalue( translationUnit );
    313330                if ( ctorinitp ) {
    314331                        dump ( translationUnit );
     
    317334
    318335                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 );
    319337
    320338                PASS( "Translate EHM" , ControlStruct::translateEHM( translationUnit ) );
     339                assertTopLvalue( translationUnit );
    321340
    322341                PASS( "Gen Waitfor" , Concurrency::generateWaitFor( translationUnit ) );
     342                clearInnerLvalue( translationUnit );
     343                assertTopLvalue( translationUnit );
    323344
    324345                PASS( "Convert Specializations",  GenPoly::convertSpecializations( translationUnit ) ); // needs to happen before tuple types are expanded
     346                clearInnerLvalue( translationUnit );
     347                assertTopLvalue( translationUnit );
    325348
    326349                PASS( "Expand Tuples", Tuples::expandTuples( translationUnit ) ); // xxx - is this the right place for this?
     350                assertTopLvalue( translationUnit );
    327351
    328352                if ( tuplep ) {
     
    332356
    333357                PASS( "Virtual Expand Casts", Virtual::expandCasts( translationUnit ) ); // Must come after translateEHM
     358                assertTopLvalue( translationUnit );
    334359
    335360                PASS( "Instantiate Generics", GenPoly::instantiateGeneric( translationUnit ) );
     
    338363                        return EXIT_SUCCESS;
    339364                } // if
    340 
     365                clearInnerLvalue( translationUnit );
     366                assertTopLvalue( translationUnit );
    341367                PASS( "Convert L-Value", GenPoly::convertLvalue( translationUnit ) );
     368                clearInnerLvalue( translationUnit );
     369                assertTopLvalue( translationUnit );
    342370
    343371                if ( bboxp ) {
     
    346374                } // if
    347375                PASS( "Box", GenPoly::box( translationUnit ) );
     376                clearInnerLvalue( translationUnit );
     377                assertTopLvalue( translationUnit );
    348378
    349379                if ( bcodegenp ) {
     
    357387
    358388                CodeTools::fillLocations( translationUnit );
     389                assertTopLvalue( translationUnit );
    359390                PASS( "Code Gen", CodeGen::generate( translationUnit, *output, ! genproto, prettycodegenp, true, linemarks ) );
    360391
  • tests/Makefile.am

    r19858f6 r970141d  
    2424archiveerrors=
    2525
     26INSTALL_FLAGS=-in-tree
    2627DEBUG_FLAGS=-debug -O0
    2728
     
    4243        -DIN_DIR="${abs_srcdir}/.in/"
    4344
    44 # get the desired cfa to test
    45 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
    46 
    4745# adjust CC to current flags
    48 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     46CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    4947CFACC = $(CC)
    5048
     
    5351
    5452# adjusted CC but without the actual distcc call
    55 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     53CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    5654
    5755PRETTY_PATH=mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
  • tests/Makefile.in

    r19858f6 r970141d  
    214214
    215215# adjust CC to current flags
    216 CC = $(if $(ifeq $(DISTCC_CFA_PATH),yes),distcc $(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     216CC = $(if $(DISTCC_CFA_PATH),distcc $(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    217217CCAS = @CCAS@
    218218CCASDEPMODE = @CCASDEPMODE@
     
    220220CCDEPMODE = @CCDEPMODE@
    221221CFACC = $(CC)
    222 CFACC_INSTALL = @CFACC_INSTALL@
    223222CFACPP = @CFACPP@
    224223CFA_BACKEND_CC = @CFA_BACKEND_CC@
     
    382381installed = no
    383382archiveerrors =
     383INSTALL_FLAGS = -in-tree
    384384DEBUG_FLAGS = -debug -O0
    385385quick_test = avl_test operators numericConstants expression enum array typeof cast raii/dtor-early-exit raii/init_once attributes
     
    398398
    399399
    400 # get the desired cfa to test
    401 TARGET_CFA = $(if $(filter $(installed),yes), @CFACC_INSTALL@, @CFACC@)
    402 
    403400# get local binary for depedencies
    404401CFACCBIN = @CFACC@
    405402
    406403# adjusted CC but without the actual distcc call
    407 CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH),$(TARGET_CFA) ${DEBUG_FLAGS} ${ARCH_FLAGS})
     404CFACCLOCAL = $(if $(DISTCC_CFA_PATH),$(DISTCC_CFA_PATH) -dist-tree -in-tree,@CFACC@ ${DEBUG_FLAGS} ${INSTALL_FLAGS} ${ARCH_FLAGS})
    408405PRETTY_PATH = mkdir -p $(dir $(abspath ${@})) && cd ${srcdir} &&
    409406avl_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

    r19858f6 r970141d  
    9696                        distribute = False
    9797
    98                 self.string = "installed" if value else "in tree"
    99                 self.flags  = """installed=%s""" % ("yes" if value else "no")
     98                self.string = "installed" if value else "in-tree"
     99                self.flags  = """INSTALL_FLAGS=%s""" % ("" if value else "-in-tree")
    100100
    101101class Timeouts:
  • tests/pybin/tools.py

    r19858f6 r970141d  
    343343        # make a directory for this test
    344344        # mkdir makes the parent directory only so add a dummy
    345         mkdir(os.path.join(dst, name ))
     345        mkdir(os.path.join(dst, "dir"))
    346346
    347347        # moves the files
  • tools/Makefile.in

    r19858f6 r970141d  
    208208CCDEPMODE = @CCDEPMODE@
    209209CFACC = @CFACC@
    210 CFACC_INSTALL = @CFACC_INSTALL@
    211210CFACPP = @CFACPP@
    212211CFA_BACKEND_CC = @CFA_BACKEND_CC@
  • tools/prettyprinter/Makefile.in

    r19858f6 r970141d  
    237237CCDEPMODE = @CCDEPMODE@
    238238CFACC = @CFACC@
    239 CFACC_INSTALL = @CFACC_INSTALL@
    240239CFACPP = @CFACPP@
    241240CFA_BACKEND_CC = @CFA_BACKEND_CC@
Note: See TracChangeset for help on using the changeset viewer.