ruby-changes:28470
From: nobu <ko1@a...>
Date: Mon, 29 Apr 2013 17:44:27 +0900 (JST)
Subject: [ruby-changes:28470] nobu:r40522 (trunk): * vm.c (VM_EP_LEP): simplify infinite loop.
nobu 2013-04-29 17:44:16 +0900 (Mon, 29 Apr 2013) New Revision: 40522 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40522 Log: * vm.c (VM_EP_LEP): simplify infinite loop. Modified files: trunk/vm.c Index: vm.c =================================================================== --- vm.c (revision 40521) +++ vm.c (revision 40522) @@ -24,12 +24,10 @@ https://github.com/ruby/ruby/blob/trunk/vm.c#L24 static inline VALUE * VM_EP_LEP(VALUE *ep) { - while (1) { - if (VM_EP_LEP_P(ep)) { - return ep; - } + while (!VM_EP_LEP_P(ep)) { ep = VM_EP_PREV_EP(ep); } + return ep; } VALUE * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/