Commit graph

219 commits

Author SHA1 Message Date
rfm
cc87536fda experiment with slower but better hashes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36344 72102866-910b-0410-8b05-ffd578937521
2013-03-12 16:11:10 +00:00
rfm
47ed749c4c avoid a couple of warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36280 72102866-910b-0410-8b05-ffd578937521
2013-03-05 16:20:10 +00:00
rfm
60c04b53e6 fix for overrun when searching backwards (spotted by Fred using valgrind)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36204 72102866-910b-0410-8b05-ffd578937521
2013-02-28 12:51:27 +00:00
theraven
ea5a936ae1 Add missing retainCount methods for small objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36034 72102866-910b-0410-8b05-ffd578937521
2013-01-29 18:42:23 +00:00
rfm
fd9e1db26c fix range error in last substring creation change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35940 72102866-910b-0410-8b05-ffd578937521
2013-01-08 21:59:38 +00:00
rfm
6d9d73c0b4 tiny optimisation to allow intermeidate substrings to be released earlier
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35939 72102866-910b-0410-8b05-ffd578937521
2013-01-08 08:25:18 +00:00
rfm
4f4ab32e92 tidy indentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35938 72102866-910b-0410-8b05-ffd578937521
2013-01-07 21:39:35 +00:00
rfm
cd97eb99b3 poatches by Marcus and Stefan
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35906 72102866-910b-0410-8b05-ffd578937521
2012-12-18 09:00:40 +00:00
rfm
0623c0c0c2 simplification, including use of strtoull() everywhere
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35503 72102866-910b-0410-8b05-ffd578937521
2012-09-03 13:36:45 +00:00
theraven
785044ffb2 Conditionally compile profiling / debugging code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35448 72102866-910b-0410-8b05-ffd578937521
2012-08-25 14:01:56 +00:00
theraven
dceedfb915 Fix the build on platforms without tiny string support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35447 72102866-910b-0410-8b05-ffd578937521
2012-08-25 12:31:41 +00:00
theraven
ccaefa05e8 Use tiny strings in a few more places.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35446 72102866-910b-0410-8b05-ffd578937521
2012-08-25 12:15:11 +00:00
rfm
e0c4edf62b simplify case conversion options
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35364 72102866-910b-0410-8b05-ffd578937521
2012-08-08 16:54:08 +00:00
rfm
cbc74f3800 fix bad return inside exception block.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35363 72102866-910b-0410-8b05-ffd578937521
2012-08-08 15:10:13 +00:00
rfm
c767e8a8d3 literal string handling improvments.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35359 72102866-910b-0410-8b05-ffd578937521
2012-08-08 09:46:08 +00:00
rmottola
f857c2928f Do not include malloc on OpenBSD to avoid warning
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35104 72102866-910b-0410-8b05-ffd578937521
2012-04-22 19:00:27 +00:00
rfm
a1748ffc60 compatibiulity fix for 35699
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34865 72102866-910b-0410-8b05-ffd578937521
2012-03-02 19:01:30 +00:00
rfm
ad0ba98491 avoid a few warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34665 72102866-910b-0410-8b05-ffd578937521
2012-01-30 11:31:40 +00:00
rmottola
dddfc5fa7b Fix blocking compiler warning (ggc 4.5.3)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34327 72102866-910b-0410-8b05-ffd578937521
2011-12-19 23:04:04 +00:00
rfm
fc8d1c8260 get base to compile again, and improve readability/consistency
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34184 72102866-910b-0410-8b05-ffd578937521
2011-11-17 06:11:36 +00:00
theraven
6a299cb671 Store tiny strings (up to 8 ASCII characters) inside the pointer. Strings of
this length are fairly common, and this makes them very cheap to store / copy /
compare (pointer comparisons test for equality).  8 characters seems to be
enough for quite a lot of common uses, such as path components and tokens.
There are possibly still some things constructing tiny strings and not using
these.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34181 72102866-910b-0410-8b05-ffd578937521
2011-11-16 20:48:50 +00:00
rfm
0575536e78 Literal string equality tests ... implement another optimisation, plus one
spotted by Fred, plus a fix for another bug spotted by Fred!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34102 72102866-910b-0410-8b05-ffd578937521
2011-11-01 11:43:40 +00:00
rfm
27807e706c improve literal string optimisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34101 72102866-910b-0410-8b05-ffd578937521
2011-11-01 09:43:25 +00:00
rfm
84d3190d31 fix bug spotted by fred
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34094 72102866-910b-0410-8b05-ffd578937521
2011-10-31 10:00:29 +00:00
rfm
84a297282f Implement optimisations suggested by Fred's vcachegrind profiling.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34093 72102866-910b-0410-8b05-ffd578937521
2011-10-31 08:12:26 +00:00
rfm
22289342b4 tweak for more efficient string handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34084 72102866-910b-0410-8b05-ffd578937521
2011-10-28 15:02:46 +00:00
rfm
a220e9bdf0 clean up comments a little
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34083 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:31:46 +00:00
rfm
b374bdb3c9 tweak last optimisation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34082 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:30:47 +00:00
rfm
a4c7e88a11 fix error replacing strings in a string, and optimise literal strings a bit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34081 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:25:17 +00:00
rfm
d14298591a tweak for fast conversion of literals to ascii or latin1
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33988 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:45:52 +00:00
rfm
400f0b9e4d implement -hash for constant strings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33979 72102866-910b-0410-8b05-ffd578937521
2011-10-14 07:07:39 +00:00
rfm
48fa5991ab Tweaks to support UTF-8 literal string encoding supported by more recent
compilers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33972 72102866-910b-0410-8b05-ffd578937521
2011-10-12 14:28:44 +00:00
theraven
f77f9b1f35 Cleanup:
- (void)release;
to
- (oneway void)release;
so everything implementing -release actually implements the one declared in the NSObject protocol.

Start marking things that are unavailable in ARC mode as unavailable in ARC mode.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33660 72102866-910b-0410-8b05-ffd578937521
2011-07-31 15:31:39 +00:00
theraven
b45d78dfa7 Added NSRegularExpressionSearch (10.7) support to NSString.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33600 72102866-910b-0410-8b05-ffd578937521
2011-07-21 13:17:27 +00:00
theraven
ba6f3867a8 More GC fixes. Most notably, mark the thread object as not collectable, since it's hidden away in TLS where the GC can't find it.
GC now works well enough for LanguageKit to run.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33123 72102866-910b-0410-8b05-ffd578937521
2011-05-26 13:24:13 +00:00
theraven
485d23c7c7 More tweaks for garbage collection mode, including making NSNotificationCenter use weak pointers (things are never removed if it uses strong pointers because they remove themselves in the -dealloc method, which is never called, and can't remove themselves in the -finalize method because the -finalize method would not be called until after they have been removed - this is consistent with Apple behaviour).
Gorm now works correctly when built with GC enabled.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33109 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:15:08 +00:00
rfm
3b9be31642 add last night's changes based on static analyser results.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32507 72102866-910b-0410-8b05-ffd578937521
2011-03-09 10:24:18 +00:00
rfm
96b3bdf4b2 fix for constant string case changes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32309 72102866-910b-0410-8b05-ffd578937521
2011-02-23 07:25:12 +00:00
rfm
313cf13c67 Cleanup ... avoid accessing the 'isa' variable directly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32247 72102866-910b-0410-8b05-ffd578937521
2011-02-20 16:21:43 +00:00
theraven
f31000e770 Add some explicit casts-through-void* to silence warnings about casts that increase the alignment requirements of the pointee (mostly caused by using char* for arithmetic).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32219 72102866-910b-0410-8b05-ffd578937521
2011-02-19 15:34:21 +00:00
nicola
5dd72905c8 Explicitly use 'int' to read/write NSStringEncoding so that
it works for all versions of GCC


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31784 72102866-910b-0410-8b05-ffd578937521
2010-12-27 11:28:01 +00:00
rfm
c8a722de47 fix type cast
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31458 72102866-910b-0410-8b05-ffd578937521
2010-10-01 11:24:19 +00:00
rfm
9bdebfcb9b minor optimisations
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31433 72102866-910b-0410-8b05-ffd578937521
2010-09-28 13:23:53 +00:00
rfm
e9bcdfd548 fix some return type errors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31338 72102866-910b-0410-8b05-ffd578937521
2010-09-12 17:05:30 +00:00
theraven
e3e8fb8dea Added a hack to allow the stuff GSString caches to be re-cached. Ideally we wouldn't be caching any of this stuff (or, with libobjc2, we'd be using the slot mechanism to invalidate the cache when required).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31005 72102866-910b-0410-8b05-ffd578937521
2010-07-19 17:10:46 +00:00
rfm
9cf3ffc49f include malloc.h for alloc() on platforms where it isn't in alloca.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29971 72102866-910b-0410-8b05-ffd578937521
2010-03-16 06:11:00 +00:00
rfm
b0f01d5cb6 fix position of assert
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29878 72102866-910b-0410-8b05-ffd578937521
2010-03-08 12:11:03 +00:00
rfm
5ca5ff96ef further cleanup ... always use -zone method to get an object's zone ...
so people can safely write subclasses using different allocation schemes.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29847 72102866-910b-0410-8b05-ffd578937521
2010-03-05 09:30:18 +00:00
rfm
2570ac3c91 include alloca.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29755 72102866-910b-0410-8b05-ffd578937521
2010-02-25 19:05:21 +00:00
rfm
7ff4d4c9c7 fixups for libobjc2
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29753 72102866-910b-0410-8b05-ffd578937521
2010-02-25 18:49:31 +00:00