ruby-changes:34604
From: ko1 <ko1@a...>
Date: Fri, 4 Jul 2014 11:56:40 +0900 (JST)
Subject: [ruby-changes:34604] ko1:r46685 (trunk): * parse.y: remove unused code
ko1 2014-07-04 11:56:34 +0900 (Fri, 04 Jul 2014) New Revision: 46685 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46685 Log: * parse.y: remove unused code srounded by `#if ENABLE_SELECTOR_NAMESPACE' Modified files: trunk/ChangeLog trunk/parse.y Index: ChangeLog =================================================================== --- ChangeLog (revision 46684) +++ ChangeLog (revision 46685) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jul 4 11:53:56 2014 Koichi Sasada <ko1@a...> + + * parse.y: remove unused code + srounded by `#if ENABLE_SELECTOR_NAMESPACE' + Fri Jul 4 10:08:24 2014 SHIBATA Hiroshi <shibata.hiroshi@g...> * test/rubygems/test_gem_package.rb: avoid tempfile leaks using Tempfile#close! Index: parse.y =================================================================== --- parse.y (revision 46684) +++ parse.y (revision 46685) @@ -10145,19 +10145,11 @@ static const struct { https://github.com/ruby/ruby/blob/trunk/parse.y#L10145 #define op_tbl_count numberof(op_tbl) -#ifndef ENABLE_SELECTOR_NAMESPACE -#define ENABLE_SELECTOR_NAMESPACE 0 -#endif - static struct symbols { ID last_id; st_table *sym_id; st_table *id_str; st_table *pinned_dsym; -#if ENABLE_SELECTOR_NAMESPACE - st_table *ivar2_id; - st_table *id_ivar2; -#endif VALUE op_sym[tLAST_OP_ID]; int minor_marked; int pinned_dsym_minor_marked; @@ -10168,43 +10160,12 @@ static const struct st_hash_type symhash https://github.com/ruby/ruby/blob/trunk/parse.y#L10160 rb_str_hash, }; -#if ENABLE_SELECTOR_NAMESPACE -struct ivar2_key { - ID id; - VALUE klass; -}; - -static int -ivar2_cmp(struct ivar2_key *key1, struct ivar2_key *key2) -{ - if (key1->id == key2->id && key1->klass == key2->klass) { - return 0; - } - return 1; -} - -static int -ivar2_hash(struct ivar2_key *key) -{ - return (key->id << 8) ^ (key->klass >> 2); -} - -static const struct st_hash_type ivar2_hash_type = { - ivar2_cmp, - ivar2_hash, -}; -#endif - void Init_sym(void) { global_symbols.sym_id = st_init_table_with_size(&symhash, 1000); global_symbols.id_str = st_init_numtable_with_size(1000); global_symbols.pinned_dsym = st_init_numtable_with_size(1000); -#if ENABLE_SELECTOR_NAMESPACE - global_symbols.ivar2_id = st_init_table_with_size(&ivar2_hash_type, 1000); - global_symbols.id_ivar2 = st_init_numtable_with_size(1000); -#endif (void)nodetype; (void)nodeline; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/