ruby-changes:35771
From: normal <ko1@a...>
Date: Thu, 9 Oct 2014 12:39:13 +0900 (JST)
Subject: [ruby-changes:35771] normal:r47853 (trunk): hash.c (rb_any_hash): remove unnecessary dsym check
normal 2014-10-09 12:39:02 +0900 (Thu, 09 Oct 2014) New Revision: 47853 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47853 Log: hash.c (rb_any_hash): remove unnecessary dsym check gcc (Debian 4.7.2-5) 4.7.2 on x86 generates smaller code this way, as it does not seem to be able to reuse the result of SPECIAL_CONST_P. Modified files: trunk/ChangeLog trunk/hash.c Index: ChangeLog =================================================================== --- ChangeLog (revision 47852) +++ ChangeLog (revision 47853) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 9 12:38:28 2014 Eric Wong <e@8...> + + * hash.c (rb_any_hash): remove unnecessary dsym check + Thu Oct 9 07:20:30 2014 Rei Odaira <Rei.Odaira@g...> * missing/setproctitle.c: Avoid invalidating argv[1], argv[2], Index: hash.c =================================================================== --- hash.c (revision 47852) +++ hash.c (revision 47853) @@ -139,7 +139,7 @@ rb_any_hash(VALUE a) https://github.com/ruby/ruby/blob/trunk/hash.c#L139 if (SPECIAL_CONST_P(a)) { if (a == Qundef) return 0; - if (SYMBOL_P(a)) a >>= (RUBY_SPECIAL_SHIFT + ID_SCOPE_SHIFT); + if (STATIC_SYM_P(a)) a >>= (RUBY_SPECIAL_SHIFT + ID_SCOPE_SHIFT); hnum = rb_objid_hash((st_index_t)a); } else if (BUILTIN_TYPE(a) == T_STRING) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/