summaryrefslogtreecommitdiff
path: root/st.c
AgeCommit message (Collapse)Author
2013-11-28* st.c: add st_values() and st_values_check().glass
* include/ruby/st.h: add prototypes for above. * hash.c (rb_hash_values): use st_values_check() for performance improvement if VALUE and st_data_t are compatible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28* st.c (st_keys): fix not to use Qundef in st.c.glass
* include/ruby/st.h: define modified prototype. * hash.c (rb_hash_keys): use modified st_keys(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* st.c (st_keys): define st_keys(). it writes each key to buffer.glass
* hash.c (rb_hash_keys): use st_keys() for performance improvement if st_data_t and VALUE are compatible. * st.h: define macro ST_DATA_COMPATIBLE_P() to predicate whether st_data_t and passed type are compatible. * configure.in: check existence of builtin function to use in ST_DATA_COMPATIBLE_P(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-14hash.c, st.c: fix for ST_CHECKnobu
* hash.c (foreach_safe_i, hash_foreach_iter): deal with error detected by ST_CHECK. * st.c (st_foreach_check): call with non-error argument in normal case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10st.c: revert st_keysnobu
* st.c: revert st_keys() at r43238. VALUE cannot be in st.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-10* st.c (st_keys): define st_keys() for performance improvement ofglass
Hash#keys and Array#uniq. * st.h: ditto. * hash.c (rb_hash_keys): use st_keys(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* st.c (st_locale_insensitive_strcasecmp): Renamed from st_strcasecmp.akr
(st_locale_insensitive_strncasecmp): Renamed from st_strncasecmp. * include/ruby/st.h: Follow above changes. * include/ruby/ruby.h: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* configure.in: revert r42008. strcasecmp() uses the current locale.glass
* include/ruby/ruby.h: ditto. * st.c (st_strcasecmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* configure.in: check strcasecmp().glass
* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it exists. * st.c (st_strcasecmp): define the function only if strcasecmp() doesn't exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25* st.c (st_shift): remove unused variable.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25* benchmark/bm_hash_shift.rb: add benchmark for Hash#shiftcharliesome
* hash.c (rb_hash_shift): use st_shift if hash is not being iterated to delete element without iterating the whole hash. * hash.c (shift_i): remove function * include/ruby/st.h (st_shift): add st_shift function * st.c (st_shift): ditto [Bug #8312] [ruby-core:54524] Patch by funny-falcon git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-19Fixed comment typo, found by @ThePablickzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-10* regint.h: fix typo: _M_AMD86 -> _M_AMD64.naruse
* siphash.c: ditto. * st.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-17st_update passes the key in st_tableshirosaki
* st.c (st_update): pass the key in st_table so that we can free memory of the key in st_table when deleting. [ruby-core:49220] [Bug #7330] * test/-ext-/st/test_update.rb (Bug::StTable#test_pass_objects_in_st_table): add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31* st.c (st_foreach_check, st_foreach): remove ancient check. Thisnobu
check are from initial ordered hash commit when first entry were created with entry->fore = entry->back = entry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-31* st.c (st_delete): use real_entries in st_delete for packed tablesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-30* st.c (st_foreach_check): remove the entry by replacing with nevernobu
when ST_DELETE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29* st.c (st_update): pass pointer to key to the callback function.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-29* st.c (st_update): add existing parameter to the callback function.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-10* st.c: pack tables also generic keys. patched by Sokolov Yura atnobu
https://github.com/ruby/ruby/pull/84 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-10* st.c: add st_foreach_check for fixing iteration over packed tablenobu
and st_delete_safe. patched by Sokolov Yura at https://github.com/ruby/ruby/pull/84 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-10* st.c: fix packed num_entries on delete_safe. patched by Sokolovnobu
Yura at https://github.com/ruby/ruby/pull/84 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* st.c (unpack_entries): chain entries directly. based on a patchnobu
by Sokolov Yura <funny.falcon AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* st.c (unpack_entries): use union instead of casted pointer.nobu
patched by Sokolov Yura <funny.falcon AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* st.c: use PACKED_ENT and FIND_ENTRY. patched by Sokolovnobu
Yura <funny.falcon AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05* st.c (unpack_entries): reallocate bins if packed array sizenobu
is not same as initial bins size. based on a patch by Sokolov Yura <funny.falcon AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07* st.c: refactor packed entries using structs.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07* st.c (st_update): table can be unpacked in the callback.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-07* st.c (st_foreach): should not yield same pair when checkingnobu
after unpacking. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-17* st.c (add_packed_direct): ditto.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-17* st.c (do_hash): it's the time to remove cast to unsigned int.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-16* st.c (unpack_entries): Fix r34310: on unpacking, the position ofnaruse
a hash must be do_hash-ed value. * st.c (add_packed_direct): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15st optimize st_insertshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15st refactor add_packed_direct a bitshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15st macroses for allocationshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15st macroses for packed tableshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-15st use function instead of macroshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-27* st.c (st_update): new function to lookup the given key andnobu
update the value. [ruby-dev:44998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-18* hash.c (identhash): share with type_numhash.nobu
* st.c (st_hashtype_num): rename from type_numhash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-14* regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does notnobu
allow unaligned word access. * st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word access as well as i386. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27* st.c (st_foreach): check if unpacked.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-31* st.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12* st.c (MurmurMagic): get rid of literal overflow.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-15* st.c (st_foreach): don't access ptr->hash after func call.akr
It may access freed area. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-04* include/ruby/st.h (SIZEOF_ST_INDEX_T): moved from st.c fornobu
Init_RandomSeed(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-31* st.c (unpack_entries): fixed type.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16* st.c (unpack_entries): save table->bins and never change the tablewanabe
during unpacking. Because st_insert() may cause GC and refer the table, i.e. st_foreach(). [Bug #2196] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26* st.c: moved murmur hash from string.c. [ruby-dev:39376]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-26* st.c (COLLISION): improved collision log feature.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22* st.c (st_table_entry, st_get_key): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e