Граф коммитов

7 Коммитов

Автор SHA1 Сообщение Дата
nobu f92ed1943c id_table.c: constify
* 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-26 00:46:34 +00:00
nobu 341c84ed22 id_table.c: fix for C89 compilers
* 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-26 00:26:02 +00:00
nobu 235e7738d6 id_table.c: TOKEN_PASTE
* 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-13 04:41:54 +00:00
nobu 2c3b813bd3 id_table.c: prefix first
* 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 13:20:21 +00:00
ko1 1761312577 * id_table.c: IMPL() macro accept op as _opname instead of opname
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 12:59:29 +00:00
ko1 e514914919 * id_table.c (mix_id_table_insert): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12 12:51:56 +00:00
ko1 c35ff11ae5 * id_table.h: introduce ID key table.
[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
2015-08-12 08:43:55 +00:00