Skip to content
  • Takashi Kokubun's avatar
    f5090e2f
    iseq.c: dump type of branchiftype on disasm · f5090e2f
    Takashi Kokubun authored
    This makes easier to debug scripts related to r59950.
    
    * before
    
    $ ./ruby --dump=insns -e '"#{a}"'
    == disasm: #<ISeq:<main>@-e>============================================
    0000 putobject        ""                                              (   1)[Li]
    0002 putself
    0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
    0006 dup
    0007 branchiftype     5, 15
    0010 dup
    0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
    0014 tostring
    0015 concatstrings    2
    0017 leave
    
    * after
    
    $ ./ruby --dump=insns -e '"#{a}"'
    == disasm: #<ISeq:<main>@-e>============================================
    0000 putobject        ""                                              (   1)[Li]
    0002 putself
    0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
    0006 dup
    0007 branchiftype     T_STRING, 15
    0010 dup
    0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
    0014 tostring
    0015 concatstrings    2
    0017 leave
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    f5090e2f
    iseq.c: dump type of branchiftype on disasm
    Takashi Kokubun authored
    This makes easier to debug scripts related to r59950.
    
    * before
    
    $ ./ruby --dump=insns -e '"#{a}"'
    == disasm: #<ISeq:<main>@-e>============================================
    0000 putobject        ""                                              (   1)[Li]
    0002 putself
    0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
    0006 dup
    0007 branchiftype     5, 15
    0010 dup
    0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
    0014 tostring
    0015 concatstrings    2
    0017 leave
    
    * after
    
    $ ./ruby --dump=insns -e '"#{a}"'
    == disasm: #<ISeq:<main>@-e>============================================
    0000 putobject        ""                                              (   1)[Li]
    0002 putself
    0003 opt_send_without_block <callinfo!mid:a, argc:0, FCALL|VCALL|ARGS_SIMPLE>, <callcache>
    0006 dup
    0007 branchiftype     T_STRING, 15
    0010 dup
    0011 opt_send_without_block <callinfo!mid:to_s, argc:0, FCALL|ARGS_SIMPLE>, <callcache>
    0014 tostring
    0015 concatstrings    2
    0017 leave
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Loading