Changes in / [800bae1:89faa82]
- Files:
-
- 7 edited
-
configure (modified) (6 diffs)
-
configure.ac (modified) (3 diffs)
-
src/AST/Convert.cpp (modified) (3 diffs)
-
src/Common/Stats/Heap.cc (modified) (1 diff)
-
src/ResolvExpr/ResolveAssertions.cc (modified) (1 diff)
-
src/SynTree/ApplicationExpr.cc (modified) (2 diffs)
-
src/SynTree/Expression.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
configure
r800bae1 r89faa82 796 796 with_cfa_name 797 797 with_target_hosts 798 enable_gprofiler799 798 enable_dependency_tracking 800 799 enable_shared … … 1456 1455 --enable-silent-rules less verbose build output (undo: "make V=1") 1457 1456 --disable-silent-rules verbose build output (undo: "make V=0") 1458 --enable-gprofiler whether or not to enable gprofiler tools (if available)1459 1457 --enable-dependency-tracking 1460 1458 do not reject slow dependency extractors … … 3285 3283 \'--with-target-hosts=*) ;; 3286 3284 3287 # skip gprofiler for libcfa3288 \'--enable-gprofiler=*) ;;3289 \'--disable-gprofiler) ;;3290 3291 3285 # append all other arguments to the sub configure arguments 3292 3286 *) LIBCFA_GENERAL_ARGS="${LIBCFA_GENERAL_ARGS} $var";; … … 3390 3384 else 3391 3385 target_hosts=${default_target} 3392 fi3393 3394 3395 # Check whether --enable-gprofiler was given.3396 if test "${enable_gprofiler+set}" = set; then :3397 enableval=$enable_gprofiler; enable_gprofiler=$enableval3398 else3399 enable_gprofiler=yes3400 3386 fi 3401 3387 … … 16718 16704 fi 16719 16705 16720 if test " x$enable_gprofiler" = "xyes" -a "$HAVE_LIBPROFILER" -eq 1; then16706 if test "$HAVE_LIBPROFILER" -eq 1; then 16721 16707 WITH_LIBPROFILER_TRUE= 16722 16708 WITH_LIBPROFILER_FALSE='#' … … 16769 16755 fi 16770 16756 16771 if test " x$enable_gprofiler" = "xyes" -a "$HAVE_LIBTCMALLOC" -eq 1; then16757 if test "$HAVE_LIBTCMALLOC" -eq 1; then 16772 16758 WITH_LIBTCMALLOC_TRUE= 16773 16759 WITH_LIBTCMALLOC_FALSE='#' -
configure.ac
r800bae1 r89faa82 94 94 # skip the target hosts 95 95 \'--with-target-hosts=*) ;; 96 97 # skip gprofiler for libcfa98 \'--enable-gprofiler=*) ;;99 \'--disable-gprofiler) ;;100 96 101 97 # append all other arguments to the sub configure arguments … … 129 125 target_hosts=$withval, target_hosts=${default_target}) 130 126 131 AC_ARG_ENABLE(gprofiler,132 [ --enable-gprofiler whether or not to enable gprofiler tools (if available)],133 enable_gprofiler=$enableval, enable_gprofiler=yes)134 135 127 AC_SUBST(TARGET_HOSTS, ${target_hosts}) 136 128 … … 200 192 201 193 AC_CHECK_LIB([profiler], [ProfilingIsEnabledForAllThreads], [HAVE_LIBPROFILER=1], [HAVE_LIBPROFILER=0]) 202 AM_CONDITIONAL([WITH_LIBPROFILER], [test " x$enable_gprofiler" = "xyes" -a "$HAVE_LIBPROFILER" -eq 1])194 AM_CONDITIONAL([WITH_LIBPROFILER], [test "$HAVE_LIBPROFILER" -eq 1]) 203 195 204 196 AC_CHECK_LIB([tcmalloc], [malloc], [HAVE_LIBTCMALLOC=1], [HAVE_LIBTCMALLOC=0]) 205 AM_CONDITIONAL([WITH_LIBTCMALLOC], [test " x$enable_gprofiler" = "xyes" -a "$HAVE_LIBTCMALLOC" -eq 1])197 AM_CONDITIONAL([WITH_LIBTCMALLOC], [test "$HAVE_LIBTCMALLOC" -eq 1]) 206 198 207 199 # Checks for header files. -
src/AST/Convert.cpp
r800bae1 r89faa82 576 576 if ( srcInferred.mode == ast::Expr::InferUnion::Params ) { 577 577 const ast::InferredParams &srcParams = srcInferred.inferParams(); 578 for (auto &srcParam : srcParams) {579 auto res = tgtInferParams.emplace(srcParam.first,ParamEntry(578 for (auto srcParam : srcParams) { 579 tgtInferParams[srcParam.first] = ParamEntry( 580 580 srcParam.second.decl, 581 581 get<Declaration>().accept1(srcParam.second.declptr), … … 583 583 get<Type>().accept1(srcParam.second.formalType), 584 584 get<Expression>().accept1(srcParam.second.expr) 585 )); 586 assert(res.second); 585 ); 587 586 } 588 587 } else if ( srcInferred.mode == ast::Expr::InferUnion::Slots ) { … … 1983 1982 if ( !oldInferParams.empty() ) { 1984 1983 ast::InferredParams &tgt = newInferred.inferParams(); 1985 for (auto &old : oldInferParams) {1984 for (auto old : oldInferParams) { 1986 1985 tgt[old.first] = ast::ParamEntry( 1987 1986 old.second.decl, -
src/Common/Stats/Heap.cc
r800bae1 r89faa82 21 21 #include <iostream> 22 22 23 #if defined(__has_feature) 24 #if __has_feature(address_sanitizer) 25 #define NO_HEAP_STATISTICS 26 # endif 27 #endif 28 29 #if defined( NO_STATISTICS ) || defined( TCMALLOC ) || defined(__SANITIZE_ADDRESS__) 30 #if !defined(NO_HEAP_STATISTICS) 31 #define NO_HEAP_STATISTICS 32 #endif 23 #if defined( NO_STATISTICS ) || defined( TCMALLOC ) 24 #define NO_HEAP_STATISTICS 33 25 #endif 34 26 -
src/ResolvExpr/ResolveAssertions.cc
r800bae1 r89faa82 325 325 entry.second.expr = postmutate( entry.second.expr ); 326 326 // xxx - look at entry.second.inferParams? 327 auto res = expr->inferParams.emplace( entry.first, entry.second ); 328 assert(res.second); 327 expr->inferParams[ entry.first ] = entry.second; 329 328 } 330 329 } -
src/SynTree/ApplicationExpr.cc
r800bae1 r89faa82 28 28 #include "Type.h" // for Type, PointerType, FunctionType 29 29 30 ParamEntry::ParamEntry( UniqueId decl, Declaration * declptr, Type * actualType, Type * formalType, Expression* expr )31 : decl( decl ), declptr( declptr ), actualType( actualType ), formalType( formalType ), expr( expr ){32 }30 ParamEntry::ParamEntry( const ParamEntry &other ) : 31 decl( other.decl ), declptr( maybeClone( other.declptr ) ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) )/*, inferParams( new InferredParams( *other.inferParams ) )*/ { 32 } 33 33 34 ParamEntry::ParamEntry( const ParamEntry &other ) : 35 decl( other.decl ), declptr( maybeClone( other.declptr ) ), actualType( maybeClone( other.actualType ) ), formalType( maybeClone( other.formalType ) ), expr( maybeClone( other.expr ) ) { 34 ParamEntry &ParamEntry::operator=( const ParamEntry &other ) { 35 if ( &other == this ) return *this; 36 const_cast<UniqueId &>(decl) = other.decl; 37 const_cast<Declaration * &>(declptr) = maybeClone( other.declptr ); 38 // xxx - this looks like a memory leak 39 const_cast<Type * &>(actualType) = maybeClone( other.actualType ); 40 const_cast<Type * &>(formalType) = maybeClone( other.formalType ); 41 expr = maybeClone( other.expr ); 42 // *inferParams = *other.inferParams; 43 return *this; 36 44 } 37 45 … … 44 52 45 53 ParamEntry::ParamEntry( ParamEntry && other ) : 46 decl( other.decl ), declptr( other.declptr ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr ) { 47 new (&other) ParamEntry(); 54 decl( other.decl ), declptr( other.declptr ), actualType( other.actualType ), formalType( other.formalType ), expr( other.expr )/*, inferParams( std::move( other.inferParams ) )*/ { 55 const_cast<Declaration * &>(other.declptr) = nullptr; 56 const_cast<Type * &>(other.actualType) = nullptr; 57 const_cast<Type * &>(other.formalType) = nullptr; 58 other.expr = nullptr; 48 59 } 49 60 50 61 ParamEntry & ParamEntry::operator=( ParamEntry && other ) { 51 62 if ( &other == this ) return *this; 52 this->~ParamEntry(); 53 new (this) ParamEntry(other.decl, other.declptr, other.actualType, other.formalType, other.expr); 54 new (&other) ParamEntry(); 55 63 delete declptr; 64 delete actualType; 65 delete formalType; 66 delete expr; 67 const_cast<UniqueId &>(decl) = other.decl; 68 const_cast<Declaration * &>(declptr) = other.declptr; 69 const_cast<Type * &>(actualType) = other.actualType; 70 const_cast<Type * &>(formalType) = other.formalType; 71 expr = other.expr; 72 const_cast<Declaration * &>(other.declptr) = nullptr; 73 const_cast<Type * &>(other.actualType) = nullptr; 74 const_cast<Type * &>(other.formalType) = nullptr; 75 other.expr = nullptr; 76 // inferParams = std::move( other.inferParams ); 56 77 return *this; 57 78 } -
src/SynTree/Expression.h
r800bae1 r89faa82 39 39 /// but subject to decay-to-pointer and type parameter renaming 40 40 struct ParamEntry { 41 ParamEntry(): decl( 0 ), declptr( nullptr ), actualType( nullptr ), formalType( nullptr ), expr( nullptr ) {} 42 ParamEntry( UniqueId decl, Declaration * declptr, Type * actualType, Type * formalType, Expression* expr ); 41 ParamEntry(): decl( 0 ), declptr(nullptr), actualType( 0 ), formalType( 0 ), expr( 0 )/*, inferParams( new InferredParams )*/ {} 42 ParamEntry( UniqueId decl, Declaration * declptr, Type * actualType, Type * formalType, Expression* expr ) 43 : decl( decl ), declptr( declptr ), actualType( actualType ), formalType( formalType ), expr( expr )/*, inferParams( new InferredParams )*/ { 44 } 43 45 ParamEntry( const ParamEntry & other ); 44 46 ParamEntry( ParamEntry && other ); 45 47 ~ParamEntry(); 48 ParamEntry & operator=( const ParamEntry & other ); 46 49 ParamEntry & operator=( ParamEntry && other ); 47 50 … … 51 54 Type * const formalType; 52 55 Expression * expr; 56 // std::unique_ptr< InferredParams > inferParams; 53 57 }; 54 58
Note:
See TracChangeset
for help on using the changeset viewer.