deps/v8/src/regexp.js
// called with indices from 1 to 9.
called with indices from 1 to 9.
called with indices from 1 to 9 .
function RegExpMakeCaptureGetter(n) {
  return function() {
    if (lastMatchInfoOverride) {
      if (n < lastMatchInfoOverride.length - 2) return lastMatchInfoOverride[n];
      return '';
    }
    var index = n * 2;
    if (index >= NUMBER_OF_CAPTURES(lastMatchInfo)) return '';
    var matchStart = lastMatchInfo[CAPTURE(index)];
    var matchEnd = lastMatchInfo[CAPTURE(index + 1)];
    if (matchStart == -1 || matchEnd == -1) return '';
    return SubString(LAST_SUBJECT(lastMatchInfo), matchStart, matchEnd);
  };
}
function RegExpMakeCaptureGetter ( n ) { return function ( ) { if ( lastMatchInfoOverride ) { if ( n < lastMatchInfoOverride . length - 2 ) return lastMatchInfoOverride [ n ] ; return '' ; } var index = n * 2 ; if ( index >= NUMBER_OF_CAPTURES ( lastMatchInfo ) ) return '' ; var matchStart = lastMatchInfo [ CAPTURE ( index ) ] ; var matchEnd = lastMatchInfo [ CAPTURE ( index + 1 ) ] ; if ( matchStart == - 1 || matchEnd == - 1 ) return '' ; return SubString ( LAST_SUBJECT ( lastMatchInfo ) , matchStart , matchEnd ) ; } ; }
called with indices from 1 to 9.
called with indices from 1 to 9 .