mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f3754f57cb
commit
3cb3966838
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Oct 9 12:38:28 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* hash.c (rb_any_hash): remove unnecessary dsym check
|
||||
|
||||
Thu Oct 9 07:20:30 2014 Rei Odaira <Rei.Odaira@gmail.com>
|
||||
|
||||
* missing/setproctitle.c: Avoid invalidating argv[1], argv[2],
|
||||
|
|
2
hash.c
2
hash.c
|
@ -139,7 +139,7 @@ rb_any_hash(VALUE a)
|
|||
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue