libraries/v8/runtime.cc
// This is only called for StringReplaceGlobalRegExpWithFunction.  This sets
// lastMatchInfoOverride to maintain the last match info, so we don't need to
// set any other last match array info.
This is only called for StringReplaceGlobalRegExpWithFunction.  This sets
lastMatchInfoOverride to maintain the last match info, so we don't need to
set any other last match array info.
This is only called for StringReplaceGlobalRegExpWithFunction . This sets lastMatchInfoOverride to maintain the last match info so we don ' t need to set any other last match array info .
RUNTIME_FUNCTION(MaybeObject*, Runtime_RegExpExecMultiple) {
  HandleScope handles(isolate);
  ASSERT(args.length() == 4);
  CONVERT_ARG_HANDLE_CHECKED(String, subject, 1);
  if (!subject->IsFlat()) FlattenString(subject);
  CONVERT_ARG_HANDLE_CHECKED(JSRegExp, regexp, 0);
  CONVERT_ARG_HANDLE_CHECKED(JSArray, last_match_info, 2);
  CONVERT_ARG_HANDLE_CHECKED(JSArray, result_array, 3);
  ASSERT(regexp->GetFlags().is_global());
  if (regexp->CaptureCount() == 0) {
    return SearchRegExpMultiple<false>(
        isolate, subject, regexp, last_match_info, result_array);
  } else {
    return SearchRegExpMultiple<true>(
        isolate, subject, regexp, last_match_info, result_array);
  }
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_RegExpExecMultiple ) { HandleScope handles ( isolate ) ; ASSERT ( args . length ( ) == 4 ) ; CONVERT_ARG_HANDLE_CHECKED ( String , subject , 1 ) ; if ( ! subject -> IsFlat ( ) ) FlattenString ( subject ) ; CONVERT_ARG_HANDLE_CHECKED ( JSRegExp , regexp , 0 ) ; CONVERT_ARG_HANDLE_CHECKED ( JSArray , last_match_info , 2 ) ; CONVERT_ARG_HANDLE_CHECKED ( JSArray , result_array , 3 ) ; ASSERT ( regexp -> GetFlags ( ) . is_global ( ) ) ; if ( regexp -> CaptureCount ( ) == 0 ) { return SearchRegExpMultiple < false > ( isolate , subject , regexp , last_match_info , result_array ) ; } else { return SearchRegExpMultiple < true > ( isolate , subject , regexp , last_match_info , result_array ) ; } }
This is only called for StringReplaceGlobalRegExpWithFunction.
This is only called for StringReplaceGlobalRegExpWithFunction .