summaryrefslogtreecommitdiff
path: root/id_table.c
AgeCommit message (Collapse)Author
2015-11-02id_table: const correctness for _size and _memsizenormal
This allows us to swap in rb_id_table_memsize for st_memsize (which takes a "const st_table *") more easily. It also makes sense to do the same for rb_id_table_size, too; as the table cannot be altered when accessing size. * id_table.h (rb_id_table_size): const arg (rb_id_table_memsize): ditto * id_table.c (st_id_table_size): ditto (st_id_table_memsize): ditto (list_id_table_size): ditto (list_id_table_memsize): ditto (hash_id_table_size): ditto (hash_id_table_memsize): ditto (mix_id_table_size): ditto (mix_id_table_memsize): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-01* id_table.c (mix_id_table_insert): do not touch list duringko1
list->hash transition because GC can run during transition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27id_table.c: fix prototype namesnobu
* id_table.c: fix prototype names, missing underscore prefixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27id_table.c: fix prototype namesnobu
* id_table.c: fix prototype names, missing underscore prefixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-27id_table.c: suppress warningsnobu
* id_table.c (UNUSED): mark implementation functions maybe-unused to suppress warnings by old gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-25* id_table.c: fix typo. [ci skip][fix GH-1031] Patch @davydovantonhsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-09-17id_table.c: fix typesnobu
* id_table.c (insert_into_chain, insert_into_main): fix argument types in prototype declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26id_table.c: aliasesnobu
* id_table.c (IMPL_TYPE, IMPL_VOID): make aliases if supported on the platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26id_table.h: callback function typesnobu
* id_table.h (rb_id_table_foreach_func_t): define callback function type for rb_id_table_foreach(). * id_table.h (rb_id_table_foreach_values_func_t): ditto for rb_id_table_foreach_values(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26id_table.c: adjust indentnobu
* id_table.c (list_table_extend, fix_empty): adjust indent. (hash_id_table_foreach_values): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26id_table.c: constifynobu
* id_table.c (find_empty): constify static data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-26id_table.c: fix for C89 compilersnobu
* id_table.c (list_table_extend, hash_table_extend): remove C99 features. [ruby-dev:49239] [Bug #11487] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-13id_table.c: TOKEN_PASTEnobu
* id_table.c (IMPL1): use TOKEN_PASTE, and prevent `op' from expansion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12id_table.c: prefix firstnobu
* id_table.c (IMPL): prepend id_table to the argument before its expansion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12* id_table.c: IMPL() macro accept op as _opname instead of opnameko1
because jemalloc seems to replace the word `free' to `je_free'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12* id_table.c (mix_id_table_insert): fix memory leak.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12* id_table.h: introduce ID key table.ko1
[Feature #11420] This table only manage ID->VALUE table to reduce overhead of st. Some functions prefixed rb_id_table_* are provided. * id_table.c: implement rb_id_table_*. There are several algorithms to implement it. Now, there are roughly 4 types: * st * array * hash (implemented by Yura Sokolov) * mix of array and hash The macro ID_TABLE_IMPL can choose implementation. You can see detailes about them at the head of id_table.c. At the default, I choose 34 (mix of list and hash). This is not final decision. Please report your suitable parameters or your data structure. * symbol.c: introduce rb_id_serial_t and rb_id_to_serial() to represent ID by serial number. * internal.h: use id_table for method tables. * class.c, gc.c, marshal.c, vm.c, vm_method.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e