summaryrefslogtreecommitdiffstats
path: root/libcxxabi
Commit message (Collapse)AuthorAgeFilesLines
...
* Minor header fixups for test.Howard Hinnant2012-01-281-1/+2
| | | | llvm-svn: 149156
* Silence a warning.Howard Hinnant2012-01-281-1/+1
| | | | llvm-svn: 149155
* Sometimes it takes all day to write a decent comment. This is one of those ↵Howard Hinnant2012-01-281-36/+144
| | | | | | times, and I'm still not quite sure I have them correct. llvm-svn: 149154
* These commits are intended to be temporary in nature and are to facilitate ↵Howard Hinnant2012-01-254-4/+54
| | | | | | the testing of libc++abi.dylib at this point in time. llvm-svn: 148967
* Add comment documenting extension behavior of __cxa_get_globals_fast().Howard Hinnant2012-01-251-0/+4
| | | | llvm-svn: 148966
* cxa_guard.cpp didn't quite make it on the last commit: Restricted headers ↵Howard Hinnant2012-01-251-3/+10
| | | | | | to cxa_guard.cpp and abort_messsage.h, and added a comment regarding reentrancy brought up by John McCall. Thanks John. llvm-svn: 148965
* Restricted headers to cxa_guard.cpp and abort_messsage.h, and added a ↵Howard Hinnant2012-01-251-1/+1
| | | | | | comment regarding reentrancy brought up by John McCall. Thanks John. llvm-svn: 148963
* By changing all of the throw() specs to noexcept I've been able to compile ↵Howard Hinnant2012-01-246-50/+140
| | | | | | and link all of the source files into a dylib. Prior to this substitution the changed functions were calling __cxa_call_unexpected which isn't implemented yet. However in none of these cases do we actaully want __cxa_call_unexpected to be called. Primative buildit script added. llvm-svn: 148880
* Add some needed symbols in exception.cpp and eliminate dependence upon ↵Howard Hinnant2012-01-242-1/+42
| | | | | | uncaught_exception() from cxa_vector.cpp. libc++abi is very nearly a self-contained (though not complete) library now. llvm-svn: 148866
* Marshall Clow reminded me that fallback_malloc.cpp was broken out for ↵Howard Hinnant2012-01-243-162/+176
| | | | | | testing purposes. We've agreed to simply rename fallback_malloc.cpp to fallback_malloc.ipp. Thanks Marshall. llvm-svn: 148863
* Add some needed symbols to cxa_new_delete.cpp and put the display() stuff ↵Howard Hinnant2012-01-243-50/+113
| | | | | | under #DEBUG (again). llvm-svn: 148860
* Got fooled by fallback_malloc.cpp source file: it is really a private ↵Howard Hinnant2012-01-242-178/+161
| | | | | | header. I've manually included it into the only place it is used: cxa_exception.cpp. llvm-svn: 148854
* Add new file for public type_info-related signaturesHoward Hinnant2012-01-242-13/+57
| | | | llvm-svn: 148853
* CrashReporterClient.h is back, but this time protected with __has_include. ↵Howard Hinnant2012-01-243-53/+32
| | | | | | Thanks for the suggestion Doug. The use is consistent with how the same header is used in llvm/lib/Support/PrettyStackTrace.cpp (though there autoconfig is used instead of __has_include). llvm-svn: 148851
* Remove dependence upon std::exception_ptr from the ↵Howard Hinnant2012-01-242-23/+38
| | | | | | default_terminate_handler. Recovered the equivalent functionality at a lower level. llvm-svn: 148830
* Forgot to include this file in the last commit: Move kOurExceptionClass and ↵Howard Hinnant2012-01-241-2/+0
| | | | | | kOurDependentExceptionClass from source to header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed. llvm-svn: 148829
* Move kOurExceptionClass and kOurDependentExceptionClass from source to ↵Howard Hinnant2012-01-242-3/+4
| | | | | | header so that they can be used in multiple sources. This is a private header, these constants are not publicly exposed. llvm-svn: 148827
* Removed reference to internal headerHoward Hinnant2012-01-241-37/+8
| | | | llvm-svn: 148763
* Changed my mind about __cxa_uncaught_exception and added it.Howard Hinnant2012-01-242-2/+12
| | | | llvm-svn: 148754
* I renamed abort_message to be a C++ file to simplify my simplistic build ↵Howard Hinnant2012-01-231-0/+58
| | | | | | script which I'm still working on. I also added a struct for the crash reporter on __APPLE__. llvm-svn: 148752
* A lot of the code in cxa_exception.cpp depends on __cxa_get_globals_fast() ↵Howard Hinnant2012-01-231-5/+4
| | | | | | returning null if __cxa_get_globals() hasn't been called yet. However it doesn't reliably do that, at least on OS X if __cxa_get_globals_fast() is called prior to pthread_key_create() running. Our choice is to either limit our use of __cxa_get_globals_fast() more than we have, or to have __cxa_get_globals_fast() initialize with pthread_key_create() if necessary. I chose the latter, and replaced pthread_once with a C++11 local static (which should do the same thing). llvm-svn: 148750
* Added missing #includeHoward Hinnant2012-01-231-0/+2
| | | | llvm-svn: 148749
* I'm beginning to be able to throw/catch a wide variety of objects.Howard Hinnant2012-01-232-10/+224
| | | | llvm-svn: 148713
* Getting started on matching a thrown exception to a catch clause, and ↵Howard Hinnant2012-01-223-8/+53
| | | | | | setting the adjusted pointer to the caught object appearing in the catch clause. llvm-svn: 148666
* I kept getting confused among the __cxa_exception*, the _Unwind_Exception* ↵Howard Hinnant2012-01-222-158/+216
| | | | | | and the void* to the thrown object. So I've gone through these two files and attempted to institute a consistent variable naming scheme, and in a few instances, turned void* into a concrete* to have the type system help me out. No change in functionality for this commit is intended. llvm-svn: 148663
* Add __shim_type_info which fits below std::type_info and above all of the ↵Howard Hinnant2012-01-222-30/+217
| | | | | | other type_info-derived classes. This is where all of the virtual functions that serve as details of the inner-workings of type_info will live (safely hidden from public view). All type_info objects will be safely down-castable to __shim_type_info, so as to access implementation detail virtual functions. Also temporarily add some print/display statements to each type_info-derived class. This is in support of the continuing development on the personality function. llvm-svn: 148647
* Change header to generic, instead of implementation specificHoward Hinnant2012-01-221-1/+1
| | | | llvm-svn: 148646
* One more small optimization: Where possible, for loops that do a search and ↵Howard Hinnant2012-01-163-82/+91
| | | | | | then try to break out of the loop early, eliminate the attempt to break out of the loop after the last search. And with that, I'm declaring __dynamic_cast done. Though if anyone sees any problems, has suggestions for improvements, or wants to contribute some test cases, that is certainly welcome feedback. llvm-svn: 148246
* Comment smithing. Changed some casts from C-style to C++. And added ↵Howard Hinnant2012-01-165-27/+116
| | | | | | timings to all of the tests. llvm-svn: 148241
* I think this is getting close on __dynamic_cast. There's been quite a bit ↵Howard Hinnant2012-01-165-565/+3735
| | | | | | of code rearrangement, renaming, and better commenting. This exercise has exposed and fixed a few more bugs. I've also added several more tests (there's definitely a need for more tests here). llvm-svn: 148227
* Two bug fixes, several clarifications, and a few comment updates.Howard Hinnant2012-01-141-36/+33
| | | | llvm-svn: 148180
* A bug fix involving the updating of path_dst_ptr_to_static_ptr. Some minor ↵Howard Hinnant2012-01-131-39/+172
| | | | | | code rearrangement optimizations (putting most likely 'if' first in an if-else series. And some major optimizations which involve stopping the search prior to an exhaustive walk over the entire tree. Some of these stops are because an ambiguity is detected earlier. And some of the short circuiting is due to the information from the bits __diamond_shaped_mask and __non_diamond_repeat_mask. The stress test checked in last night is now about 28% faster for the B<Width/2, Depth> -O3 case. I'm still playing with some more optimization possibilities but I'm not sure they will play out. llvm-svn: 148153
* Enclosed is a stress test for dynamic_cast. It stresses both libc++abi, and ↵Howard Hinnant2012-01-131-0/+81
| | | | | | clang itself. It creates a ridiculously large class hierarchy using variadic templates. You can specify both the width and depth of the class hierarchy. And you can specify whether the cast is to the actual run time type, or to an intermediate layer in the class. About 1/3 of the time I compile this, it crashes the compiler. There seems to be an uninitialized area of memory, and I'm probably blowing past an assumption on class hierarchy size within clang (and understandably so). I can get it work most of the time with a class hierarchy width of 20 and a depth of 7. I'm making timings with both -O3 and -Os, using both cast to root and cast to intermediate, on both libc++abi, and gcc's dynamic_cast. I've put the results in a comment/table at the bottom of the test. llvm-svn: 148083
* Oops, forgot to svn add the new test.Howard Hinnant2012-01-121-0/+304
| | | | llvm-svn: 148047
* Put debug print statments under a flag so that I can get a first glimpse at ↵Howard Hinnant2012-01-123-126/+145
| | | | | | performance. So far I haven't noticed any performance difference between this new __dynamic_cast and gcc's implementation. But I've barely started looking. Also adding a couple of tests which come straight out of the standard. llvm-svn: 148046
* Fixed a couple of bugs, updated many comments, and am including a ↵Howard Hinnant2012-01-122-47/+2565
| | | | | | comprehensive test for when there are only 3 types in place. I need to do something similar for 4 and maybe more types, but I'm not sure how comprehensive I can make the test at 4 and above types. llvm-svn: 148038
* Initial implementaiton of __dynamic_cast. There is still lots of debugging ↵Howard Hinnant2012-01-112-7/+376
| | | | | | code in here that needs to be stripped out. And many, many unit tests need to be written. And comments and probably code cleanliness needs to be improved. But I *think* the basic algorithm is sound. There also may still be some oportunities for algorithm optimization, I'm not positive. llvm-svn: 147981
* This is a transitory commit for __dynamic_cast. It contains debugging ↵Howard Hinnant2012-01-112-3/+122
| | | | | | statements that are not intended to be in the finished product. However some of the dubbing statements themselves contain important documentation such as how to navigate a __class_type_info hierarchy, documenting object offset and inheritance access. The intention is that this debugging code will migrate into both actual code and comments. And capturing it here so that there is no chance this stuff will be lost. llvm-svn: 147898
* Getting a start on the typeinfo infrastructure.Howard Hinnant2012-01-092-0/+205
| | | | llvm-svn: 147776
* First brush with testing __gxx_personality_v0 reveals there is still a long ↵Howard Hinnant2012-01-081-22/+72
| | | | | | way to go. But my understanding of what it is supposed to do continues to improve. I am currently contemplating whether I need to implement typeinfo before completing __gxx_personality_v0 in order to get matching catch handlers correct. llvm-svn: 147761
* Add a few TODO's and FIXME's. Making notes as I go along, but not slowing ↵Howard Hinnant2012-01-081-1/+4
| | | | | | down to fix these yet. Just don't want anything to fall through the cracks. llvm-svn: 147760
* Correct comment regarding members of __cxa_dependent_exception. Actually it ↵Howard Hinnant2012-01-081-2/+0
| | | | | | is useful to disguise a __cxa_dependent_exception as a __cxa_exception by filling in most (not all) of these members at __cxa_dependent_exception construction time. That way most routines don't have to care which kind of exception they have. llvm-svn: 147759
* __gxx_personality_v0 update. This is completely untested code. But my ↵Howard Hinnant2012-01-061-8/+283
| | | | | | brain is scrambled and I wanted to get it checked in. Code review from anyone who knows anything at all about personality functions would be much appreciated. What is in here is borrowed heavily from llvm/examples/ExceptionDemo/ExceptionDemo.cpp. There are some calls to abort() that should probably be changed to return an error code instead. There may be encodings under readEncodedPointer that need to be implemented. And my handling of type_info is almost a complete guess. llvm-svn: 147680
* Improved comment to explain why we can use __cxa_get_globals_fast hereMarshall Clow2012-01-041-0/+4
| | | | llvm-svn: 147554
* Just getting started on the personality routine. This is just a skeleton. ↵Howard Hinnant2012-01-042-6/+107
| | | | | | Still learning how to fill it in... llvm-svn: 147547
* Better commentMarshall Clow2012-01-041-1/+1
| | | | llvm-svn: 147532
* Don't allocate TLS storage when checking to see if an exception has been ↵Marshall Clow2012-01-031-1/+1
| | | | | | thrown - really llvm-svn: 147497
* Don't allocate TLS storage when checking to see if an exception has been thrownMarshall Clow2012-01-031-0/+2
| | | | llvm-svn: 147492
* credits adjustmentHoward Hinnant2011-12-222-2/+8
| | | | llvm-svn: 147148
* Updated __cxa_current_exception_type to call __cxa_get_globals_fast - will ↵Marshall Clow2011-12-222-2/+4
| | | | | | not allocate globals llvm-svn: 147147
OpenPOWER on IntegriCloud