[ruby-cvs:70959] mame:r63868 (trunk): Fix a bug of peephole optimization

mame at ruby-lang.org mame at ruby-lang.org
Fri Jul 6 13:52:34 JST 2018


mame	2018-07-06 13:52:33 +0900 (Fri, 06 Jul 2018)

  New Revision: 63868

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

  Log:
    Fix a bug of peephole optimization
    
    ```
      if   L1
    L0:
      jump L2
    L1:
      ...
    L2:
    ```
    
    was wrongly optimized to:
    
    ```
      unless L2
    L0:
    L1:
      ...
    L2:
    ```
    
    To make it conservative, this optimization is now disabled when there is
    any label between `if` and `jump` instructions.
    Fixes [Bug #14897].

  Modified files:
    trunk/bootstraptest/test_flow.rb
    trunk/compile.c


More information about the ruby-cvs mailing list