[ruby-cvs:59365] nobu:r52214 (trunk): Safe navigation operator

nobu at ruby-lang.org nobu at ruby-lang.org
Thu Oct 22 15:30:13 JST 2015


nobu	2015-10-22 15:30:12 +0900 (Thu, 22 Oct 2015)

  New Revision: 52214

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

  Log:
    Safe navigation operator
    
    * compile.c (iseq_peephole_optimize): peephole optimization for
      branchnil jumps.
    * compile.c (iseq_compile_each): generate save navigation operator
      code.
    * insns.def (branchnil): new opcode to pop the tos and branch if
      it is nil.
    * parse.y (NEW_QCALL, call_op, parser_yylex): parse token '.?'.
      [Feature #11537]

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/compile.c
    trunk/doc/syntax/calling_methods.rdoc
    trunk/insns.def
    trunk/node.c
    trunk/node.h
    trunk/parse.y
    trunk/template/id.h.tmpl
    trunk/test/ruby/test_call.rb


More information about the ruby-cvs mailing list