Project

General

Profile

« Previous | Next » 

Revision a356fe1c

Added by nobu (Nobuyoshi Nakada) over 8 years ago

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]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e