Commit Graph

56 Commits

Author SHA1 Message Date
mirichi d3efe18143 do not reuse deleted entry. fixed 2014-04-20 23:10:24 +09:00
Yukihiro "Matz" Matsumoto ac5091e211 use quadratic probing in khash.h 2014-04-13 18:30:22 +09:00
Yukihiro "Matz" Matsumoto 6d6ae570cb add kh_push2() to check if entry is added 2014-04-13 18:20:37 +09:00
Yukihiro "Matz" Matsumoto 45eccd1333 khash.h: use first found k_del 2014-04-13 00:32:23 +09:00
ksss 91f68f77a8 kh_put return value should be found index 2014-04-11 21:13:43 +09:00
ksss b6cfe0e001 Fix bug kh_put after kh_del report by @mirichi 2014-04-11 19:32:32 +09:00
ksss 93904fee21 Refactoring for kh_put 2014-04-10 08:48:34 +09:00
Yukihiro "Matz" Matsumoto aecdafb9ce kh_put in khash.h should work when direct bucket is deleted one 2014-04-10 00:53:32 +09:00
Yukihiro "Matz" Matsumoto 8389066272 Merge pull request #2036 from ksss/assert-kh_del
add assert before write khash del flags
2014-04-10 00:16:32 +09:00
Yukihiro "Matz" Matsumoto 020116fa6b revert 40eaf705 for performance reason; ref #2022 2014-04-10 00:14:57 +09:00
ksss cf5aabeba1 add assert before write khash del flags 2014-04-09 23:11:37 +09:00
Yukihiro "Matz" Matsumoto 0d9cc9ccc6 Merge pull request #2023 from ksss/khash-readable
Use kh_end instead to n_buckets
2014-04-06 23:19:40 +09:00
ksss f946465fe4 Use kh_end instead to n_buckets 2014-04-06 13:45:32 +00:00
ksss 40eaf7058c Delete khash_mask macro.
And fix expression to more simple and readable.
2014-04-06 13:26:10 +00:00
Yukihiro "Matz" Matsumoto fc2b37f0ee space adjustment in khash.h 2014-04-03 20:35:27 +09:00
ksss 169cf75b1e delete khash member upper_bound 2014-04-03 11:26:37 +00:00
ksss 84ccc82ef9 Delete khash member mask and inc
because there can be substituted by n_buckets
2014-04-02 15:42:31 +00:00
ksss 0f1a984a4f use size_t instead of int 2014-04-02 13:24:50 +00:00
ksss c816558b01 delete unused indexes __m_* masks 2014-04-02 12:44:11 +00:00
Yukihiro "Matz" Matsumoto 3e24e06b29 add a space after C reserved words 2014-03-18 23:57:29 +09:00
take_cheeze 23ef20624c fix compile error 2014-03-01 20:05:29 +09:00
take_cheeze 78915f9601 support c++ exception 2014-03-01 20:05:29 +09:00
cubicdaiya 67de10bfcb use C style comments instead of C++ style comments
According to CONTRIBUTING.md,

Don't use C++ style comments

 /* This is the prefered comment style */

Use C++ style comments only for temporary comment e.g. commenting out some code lines.
2014-03-01 03:31:45 +09:00
crimsonwoods 370ad6fade Remove 'mrb_state' field from 'kh_xxx_t' structure.
'kh_xxx_t' requires 'mrb_state' to allocate, free, and compute hash value.
But 'mrb_state' should not be held by 'kh_xxx_t' and 'mrb_state' should be
supplied from outside.
2013-12-23 00:33:07 -08:00
h2so5 88758e3630 Uniquify the results of Object#methods 2013-10-27 04:04:06 +09:00
Yukihiro "Matz" Matsumoto b8a46227ee put pointer tables before bitmap to avoid alignment issues; ref #1353 2013-07-10 13:14:40 +09:00
mirichi cdb23edf31 It optimizes more. 2013-07-07 22:17:44 +09:00
mirichi 550905000c kh_resize_##name bug fixed. 2013-07-07 09:23:50 +09:00
mirichi 00353a3c42 khash optimize 2013-07-06 09:10:42 +09:00
Yukihiro Matz Matsumoto 8ae0c58bb0 resolve conflict from #1017 2013-03-17 00:28:49 +09:00
Masaki Muranaka 6ba298ed54 Remove unnecessory stdint.h. 2013-03-16 21:06:32 +09:00
Masaki Muranaka 715270bec5 Include mruby.h. As KHASH_DEFAULT_SIZE might be defined in mrbconf.h. 2013-03-16 21:06:03 +09:00
Masaki Muranaka 7de2deab1e Remove string.h in khash.h 2013-03-16 17:48:30 +09:00
Masaki Muranaka 1bb447a7d3 Avoid to call memset(). Use the new function kh_fill_flags() instead. This is for compatibility. 2013-03-16 17:00:44 +09:00
Masaki Muranaka 591dbbf13f Change the place of the close parenthesis. Even though it probably cause no bugs for current code. 2013-03-16 16:58:14 +09:00
Masamitsu MURASE 54eb08e2fc Remove ";" suffix from function-type macros. 2013-02-02 00:24:30 +09:00
takkaw 06dac3fba0 fix typos 2013-01-13 15:28:03 +09:00
Yukihiro Matsumoto 7d02df3016 NaN boxing 2012-08-14 13:16:34 +09:00
Yukihiro Matsumoto 515862cc01 khash refactoring; no more MRB_KHASH_INITIAL_SIZE 2012-07-30 23:55:35 +09:00
Yukihiro Matsumoto e75c76ecee iv khash initial size to 8 2012-07-30 17:16:05 +09:00
Yukihiro Matsumoto c808f647aa allow specifying khash initial size 2012-07-30 16:41:05 +09:00
Masaki Muranaka b1cc715b36 MRB_INITIAL_HASH_SIZE : Make the initial hash size configurable. 2012-07-30 15:31:49 +09:00
Junji Sawada 96366117ea Remove unnecessary header inclusion 2012-07-14 11:39:25 +09:00
Masamitsu MURASE 2a2ffe7f7d Modify Kernel#clone and Kernel#dup.
Kernel#clone, Kernel#dup:
 - 'iv' should not be shared with the original object,
   but it should be copied.

Kernel#clone:
 - 'mt' of singleton_class should be copied.
2012-06-24 16:39:08 +09:00
Yukihiro Matsumoto 396397bce1 move KHASH_DECLARE to header files 2012-06-21 11:04:36 +09:00
crimsonwoods cd68190480 split declaration and definition for 'khash_xxx'. 2012-06-19 23:00:29 +09:00
Yukihiro Matsumoto 21304086cd remove khash#kh_debug 2012-06-12 01:41:20 +09:00
SatoshiOdawara 9ecc209ca0 memory leak in kh_resize_##name() 2012-06-07 16:03:53 +09:00
Yukihiro Matsumoto 364e6b5a50 symbol table key should be mrb_sym, not int32_t 2012-06-01 09:44:19 +09:00
Yukihiro Matsumoto a4d3579e31 add extern "C" guards; close #126 2012-05-18 02:02:49 +09:00