<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RegExp.exec returns wrong value with a long integer quantifier"
   href="https://bugs.webkit.org/show_bug.cgi?id=187042#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RegExp.exec returns wrong value with a long integer quantifier"
   href="https://bugs.webkit.org/show_bug.cgi?id=187042">bug 187042</a>
              from <span class="vcard"><a class="email" href="mailto:mark.lam@apple.com" title="Mark Lam <mark.lam@apple.com>"> <span class="fn">Mark Lam</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=344052&action=diff" name="attach_344052" title="Forgot to update ChangeLog">attachment 344052</a> <a href="attachment.cgi?id=344052&action=edit" title="Forgot to update ChangeLog">[details]</a></span>
Forgot to update ChangeLog

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=344052&action=review">https://bugs.webkit.org/attachment.cgi?id=344052&action=review</a>

<span class="quote">>>> Source/JavaScriptCore/yarr/YarrParser.h:985
>>> +            }
>> 
>> This extra overflow check is not needed because in the overflow case: 1. we still need to interate all digits anyway, and the cost of the computation of n is not that expensive, and 2. overflows rarely happen.  We should favor the normal (non-overflow) case by not adding extra overflow checks to it.

> So this loop should just be this:

>     while (peekIsDigit())
>         n = n * 10 + consumeDigit();

> Then the whole function will just be four lines long, just like the original version. And more straightforward than the original, too.</span >

Oh, that's even better.  I didn't think to use consumeDigit() but that is totally the way to go.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>