diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 00:15:00 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-05-21 00:15:00 +0000 |
commit | 4b0987a6297235f65e686420ea2d17bafccf0939 (patch) | |
tree | 415e7b3ffff84d936272a2c8314ba370ff2704aa /doc/ChangeLog-2.1.0 | |
parent | ca61b4c4e007346d2a4bee51c998050b26c25991 (diff) | |
download | ruby-4b0987a6297235f65e686420ea2d17bafccf0939.tar.gz |
variable.c: generic_iv_tbl is unavoidable
Even miniruby creates one generic ivar (plain "ruby" creates 9),
so there's no point in lazily allocating the table.
I dumped generic ivar counts with the following trivial patch:
--- a/variable.c
+++ b/variable.c
@@ -24,6 +24,10 @@ static void check_before_mod_set(VALUE, ID, VALUE, const char *);
static void setup_const_entry(rb_const_entry_t *, VALUE, VALUE, rb_const_flag_t);
static int const_update(st_data_t *, st_data_t *, st_data_t, int);
static st_table *generic_iv_tbl;
+__attribute__((destructor)) static void count_genivar(void)
+{
+ fprintf(stderr, "genivars: %zu\n", (size_t)generic_iv_tbl->num_entries);
+}
void
Init_var_tables(void)
* variable.c (Init_var_tables): init generic_iv_tbl
(rb_generic_ivar_table, generic_ivar_get, generic_ivar_set,
generic_ivar_defined, generic_ivar_remove,
rb_mark_generic_ivar, givar_i, rb_mark_generic_ivar_tbl,
rb_free_generic_ivar, rb_copy_generic_ivar, rb_ivar_foreach,
rb_ivar_count): remove checks for uninitialize generic_iv_tbl
[ruby-core:69155] [Feature #11146]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/ChangeLog-2.1.0')
0 files changed, 0 insertions, 0 deletions