| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 163120
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functions to protect against duration and time_point overflow. Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking. I purposefully did not treat the timed try_locks with
overflow checking. This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721 . I'm unsure if the standard
needs clarification in this area, or if this is simply QOI. The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.
llvm-svn: 162925
|
|
|
|
|
|
| |
throw an exception. Fixes http://llvm.org/bugs/show_bug.cgi?id=13082.
llvm-svn: 162613
|
|
|
|
| |
llvm-svn: 162188
|
|
|
|
|
|
| |
bits for 64 bit targets. This is controls the data layout of all exceptions defined in <stdexcept>. This aligns the ABI with that of gcc-4.2.
llvm-svn: 161497
|
|
|
|
|
|
|
|
|
|
| |
tm' in
__time_get_storage<char> to match the initialization behavior in
__time_get_storage<wchar>. Without the initialization, valgrind
reports errors in the subsequent calls to strftime_l.
llvm-svn: 161196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux are
localization/locale.categories/category.collate/category.ctype/locale.ctype.byname/is_1.pass.cpp
and scan_is.pass.cpp. The tests fail when the character class being
tested is compound, like ctype_base::alnum or ctype_base::graph,
because the existing series of conditionals in do_is an do_scan_is
will abort too early. For instance, if the character class being
tested is alnum, and the character is numeric, do_is will return false
because iswalpha_l will return false, 'result' becomes false, and the
'true' result from the later call to iswdigit_l ends up being ignored
. A similar problem exists in do_scan_is.
llvm-svn: 161192
|
|
|
|
|
|
|
| |
std::thread::hardware_concurrency for platforms that don't offer
sysctl, but do provide a POSIX sysconf and _SC_NPROCESSORS_ONLN.
llvm-svn: 161190
|
|
|
|
|
|
| |
I've put a small spin in __sp_mut::lock() on std::mutex::try_lock(), which is testing quite well. In my experience, putting in a yield for every failed iteration is also a major performance booster. This change makes one of the performance tests I was using (a highly contended one) run about 20 times faster.
llvm-svn: 160967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
section in libc++. This requires a recompiled dylib. Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.
The implementation is not lock free. After considerable thought, I know of no
way to make the implementation lock free. Ideas welcome along that front. But
changing the ABI of shared_ptr is not on the table at this point.
The mutex used to lock these function is encapsulated by std::__sp_mut. The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members. Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex. That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.
I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks. Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait). In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).
The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr. The constant 16 is a ball-park reasonable space/time
tradeoff.
std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function. I had thought we had already done this, but I was mistaken.
All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).
llvm-svn: 160940
|
|
|
|
|
|
|
|
|
|
|
|
| |
typeinfo.cpp. Both new.cpp and typeinfo.cpp have code that is conditionally compiled
based on the LIBCXXRT and _LIBCPPABI_VERSION defines, but those files
do not currently include <cxxabi.h> in the non __APPLE__ case. The
attached patch updates those files so that for non __APPLE__ builds
<cxxabi.h> is included if available or if LIBCXXRT is set. I'm
modeling this on the recent updates to exception.cpp.
llvm-svn: 160790
|
|
|
|
|
|
| |
platform-provided macro on some systems) to _LIBCPP_NORETURN.
llvm-svn: 160773
|
|
|
|
| |
llvm-svn: 160607
|
|
|
|
| |
llvm-svn: 160606
|
|
|
|
| |
llvm-svn: 160605
|
|
|
|
| |
llvm-svn: 160604
|
|
|
|
| |
llvm-svn: 160593
|
|
|
|
| |
llvm-svn: 160579
|
|
|
|
| |
llvm-svn: 160038
|
|
|
|
| |
llvm-svn: 159902
|
|
|
|
| |
llvm-svn: 157764
|
|
|
|
|
|
|
|
| |
out of the box on Linux systems. If you're building against libc++abi, you
still need to make sure it can find <cxxabi.h> so it knows not to export
symbols which libc++abi provides.
llvm-svn: 155091
|
|
|
|
|
|
| |
clients are in C++11/constexpr mode this will be safely ignored because piecewise_construct is then declared with internal linkage.
llvm-svn: 153981
|
|
|
|
| |
llvm-svn: 153968
|
|
|
|
|
|
| |
chain, and thus never get destructed.
llvm-svn: 152926
|
|
|
|
| |
llvm-svn: 152718
|
|
|
|
| |
llvm-svn: 152501
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=12185.
llvm-svn: 152240
|
|
|
|
| |
llvm-svn: 151728
|
|
|
|
|
|
| |
unsure what the change was trying to do, but it didn't do the right thing for __APPLE__. So instead of trying to guess what was intended, I'm just putting it back the way it was.
llvm-svn: 151727
|
|
|
|
| |
llvm-svn: 151721
|
|
|
|
|
|
|
|
|
|
| |
Solaris not providing some of the locales that the test suite uses.
Note: This depends on an xlocale (partial) implementation for Solaris and a
couple of fixed standard headers. These will be committed to a branch later
today.
llvm-svn: 151720
|
|
|
|
| |
llvm-svn: 151717
|
|
|
|
|
|
| |
I'm having trouble reexporting it as a weak symbol.
llvm-svn: 151459
|
|
|
|
| |
llvm-svn: 150964
|
|
|
|
|
|
| |
the uninitialized fields, probably the pointer field tm_zone, was causing a segfault on linux. Patch contributed by Jeffrey Yasskin.
llvm-svn: 150929
|
|
|
|
| |
llvm-svn: 150835
|
|
|
|
| |
llvm-svn: 150082
|
|
|
|
| |
llvm-svn: 149701
|
|
|
|
| |
llvm-svn: 149634
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=11428
llvm-svn: 149630
|
|
|
|
| |
llvm-svn: 147298
|
|
|
|
| |
llvm-svn: 145624
|
|
|
|
| |
llvm-svn: 142732
|
|
|
|
| |
llvm-svn: 142237
|
|
|
|
| |
llvm-svn: 140805
|
|
|
|
| |
llvm-svn: 140781
|
|
|
|
|
|
| |
defined if one has all of the xxx_l() functions. I've defined this for apple, freebsd and win32. _LIBCPP_HAS_DEFAULTRUNELOCALE should be defined if there is a _DefaultRuneLocale. I've defined this for apple and freebsd. The block of code we're trying to migrate away from is now under #ifdef __linux__. I've tested only on OS X. I hope I haven't broken things too badly elsewhere. Please let me know.
llvm-svn: 140734
|
|
|
|
| |
llvm-svn: 140728
|
|
|
|
|
|
| |
should be considered a temporary state. The API of the debug database and how vector and list use it, is unsatisfactory at the moment. It is both inefficient and overly verbose. I wanted to get this functionality checked in though. In the next day or so I'll refactor what is there in an attempt to streamline things.
llvm-svn: 140660
|