mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Add dontthrow
attribute to most libc functions
This will help C++ code that uses exceptions to be tinier. For example, this change shaves away 1000 lines of assembly code from LLVM's libcxx, which is 0.7% of all assembly instructions in the entire library.
This commit is contained in:
parent
cb19e172da
commit
eeb20775d2
103 changed files with 1455 additions and 1456 deletions
|
@ -3,12 +3,11 @@
|
|||
COSMOPOLITAN_C_START_
|
||||
|
||||
void *bsearch(const void *, const void *, size_t, size_t,
|
||||
int (*)(const void *, const void *))
|
||||
paramsnonnull() dontthrow nosideeffect;
|
||||
int (*)(const void *, const void *)) paramsnonnull() nosideeffect;
|
||||
void *bsearch_r(const void *, const void *, size_t, size_t,
|
||||
int (*)(const void *, const void *, void *), void *)
|
||||
paramsnonnull((1, 2, 5)) dontthrow nosideeffect;
|
||||
void djbsort(int32_t *, size_t);
|
||||
paramsnonnull((1, 2, 5)) nosideeffect;
|
||||
void djbsort(int32_t *, size_t) libcesque;
|
||||
void qsort3(void *, size_t, size_t, int (*)(const void *, const void *))
|
||||
paramsnonnull();
|
||||
void qsort(void *, size_t, size_t, int (*)(const void *, const void *))
|
||||
|
@ -26,10 +25,8 @@ int mergesort(void *, size_t, size_t, int (*)(const void *, const void *));
|
|||
int mergesort_r(void *, size_t, size_t,
|
||||
int (*)(const void *, const void *, void *), void *);
|
||||
|
||||
#define __algalloc returnspointerwithnoaliases dontthrow nocallback __wur
|
||||
|
||||
int radix_sort_int32(int32_t *, size_t);
|
||||
int radix_sort_int64(int64_t *, size_t);
|
||||
int radix_sort_int32(int32_t *, size_t) libcesque;
|
||||
int radix_sort_int64(int64_t *, size_t) libcesque;
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* COSMOPOLITAN_LIBC_ALG_ALG_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue