[ruby-cvs:73274] tenderlove:r66174 (trunk): Collapse putobject, putobject, newarray

tenderlove at ruby-lang.org tenderlove at ruby-lang.org
Tue Dec 4 08:53:12 JST 2018


tenderlove	2018-12-04 08:53:11 +0900 (Tue, 04 Dec 2018)

  New Revision: 66174

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

  Log:
    Collapse putobject, putobject, newarray
    
    This collapses:
    
    ```
    == disasm: #<ISeq:bar at bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
    0000 putobject                    "a"                                 (   4)[LiCa]
    0002 putobject                    "b"
    0004 putobject                    "c"
    0006 putobject                    "d"
    0008 putobject                    "e"
    0010 putobject                    "f"
    0012 putobject                    "g"
    0014 putobject                    "h"
    0016 putobject                    "i"
    0018 putobject                    "j"
    0020 putobject                    "k"
    0022 newarray                     11
    0024 leave                                                            (   5)[Re]
    ```
    
    In to this:
    
    ```
    == disasm: #<ISeq:bar at bench.rb:3 (3,0)-(5,3)> (catch: FALSE)
    0000 duparray                     ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"](   4)[LiCa]
    0002 leave                                                            (   5)[Re]
    ```

  Modified files:
    trunk/compile.c
    trunk/test/ruby/test_literal.rb


More information about the ruby-cvs mailing list