[ruby-cvs:61190] naruse:r54029 (trunk): * intern.h (rb_divmod): assume compilers `/` and `%` comply C99

naruse at ruby-lang.org naruse at ruby-lang.org
Tue Mar 8 18:15:18 JST 2016


naruse	2016-03-08 18:15:18 +0900 (Tue, 08 Mar 2016)

  New Revision: 54029

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54029

  Log:
    * intern.h (rb_divmod): assume compilers `/` and `%` comply C99
      and reduce branching. If a compiler doesn't comply, add #ifdefs.
    
    * intern.h (rb_div): added for Ruby's behavior.
    
    * intern.h (rb_mod): added for Ruby's behavior.
    
    * insns.def (opt_div): use rb_div.
    
    * insns.def (opt_mod): use rb_mod.
    
    * numeric.c (fixdivmod): removed.
    
    * numeric.c (fix_divide): use rb_div.
    
    * numeric.c (fix_mod): use rb_mod.
    
    * numeric.c (fix_divmod): use rb_divmod.

  Modified files:
    trunk/ChangeLog
    trunk/insns.def
    trunk/internal.h
    trunk/numeric.c


More information about the ruby-cvs mailing list