Home
last modified time | relevance | path

Searched refs:match_info (Results 1 – 25 of 30) sorted by relevance

12

/third_party/glib/patch/
Dbackport-gregex-Avoid-re-allocating-if-we-have-no-size-change.patch16 @@ -832,6 +832,7 @@ recalc_match_offsets (GMatchInfo *match_info,
23 if (pcre2_get_ovector_count (match_info->match_data) > G_MAXUINT32 / 2)
24 @@ -842,11 +843,17 @@ recalc_match_offsets (GMatchInfo *match_info,
28 + pre_n_offset = match_info->n_offsets;
29 match_info->n_offsets = pcre2_get_ovector_count (match_info->match_data) * 2;
30 ovector = pcre2_get_ovector_pointer (match_info->match_data);
31 - match_info->offsets = g_realloc_n (match_info->offsets,
32 - match_info->n_offsets,
35 + if (match_info->n_offsets != pre_n_offset)
37 + match_info->offsets = g_realloc_n (match_info->offsets,
[all …]
Dbackport-gregex-set-default-max-stack-size-for-PCRE2-JIT-compiler-to-512KiB.patch66 @@ -896,22 +897,22 @@ recalc_match_offsets (GMatchInfo *match_info,
71 +enable_jit_with_match_options (GMatchInfo *match_info,
78 + if (!(match_info->regex->orig_compile_opts & G_REGEX_OPTIMIZE))
82 + if (match_info->regex->jit_status == JIT_STATUS_DISABLED)
89 + old_jit_options = match_info->regex->jit_options;
98 + return match_info->regex->jit_status;
101 + retval = pcre2_jit_compile (match_info->regex->pcre_re, new_jit_options);
106 + match_info->regex->jit_options = new_jit_options;
108 + match_info->jit_stack = pcre2_jit_stack_create (1 << 15, 1 << 19, NULL);
109 + pcre2_jit_stack_assign (match_info->match_context, NULL, match_info->jit_stack);
[all …]
Dbackport-gregex-Handle-the-case-we-need-to-re-allocate-the-match-data.patch20 @@ -1027,7 +1027,7 @@ g_match_info_next (GMatchInfo *match_info,
27 g_return_val_if_fail (match_info != NULL, FALSE);
29 @@ -1075,6 +1075,19 @@ g_match_info_next (GMatchInfo *match_info,
30 match_info->regex->pattern, match_error (match_info->matches));
33 + else if (match_info->matches == 0)
36 + match_info->n_offsets *= 2;
37 + match_info->offsets = g_realloc_n (match_info->offsets,
38 + match_info->n_offsets,
41 + pcre2_match_data_free (match_info->match_data);
42 + match_info->match_data = pcre2_match_data_create (match_info->n_offsets, NULL);
[all …]
Dbackport-regex-Compute-the-offsets-size-based-on-match-results.patch17 @@ -832,10 +832,20 @@ recalc_match_offsets (GMatchInfo *match_info,
25 - if (pcre2_get_ovector_count (match_info->match_data) > G_MAXUINT32 / 2)
26 + g_assert (!IS_PCRE2_ERROR (match_info->matches));
28 + if (match_info->matches == PCRE2_ERROR_PARTIAL)
30 + else if (match_info->matches > 0)
31 + ovector_size = match_info->matches;
35 + if (pcre2_get_ovector_count (match_info->match_data) < ovector_size)
39 @@ -844,7 +854,7 @@ recalc_match_offsets (GMatchInfo *match_info,
42 pre_n_offset = match_info->n_offsets;
43 - match_info->n_offsets = pcre2_get_ovector_count (match_info->match_data) * 2;
[all …]
Dbackport-regex-Avoid-allocating-offsets-until-we-ve-a-match.patch23 - match_info->n_offsets = 24;
24 match_info->n_workspace = 100;
25 match_info->workspace = g_new (gint, match_info->n_workspace);
29 - match_info->n_offsets = (match_info->n_subpatterns + 1) * 3;
32 + match_info->n_offsets = 2;
33 match_info->offsets = g_new0 (gint, match_info->n_offsets);
35 match_info->offsets[0] = -1;
Dbackport-regex-Use-size-types-more-in-line-with-PCRE2-returned-values.patch50 @@ -831,9 +832,9 @@ recalc_match_offsets (GMatchInfo *match_info,
57 - if (pcre2_get_ovector_count (match_info->match_data) > G_MAXINT / 2)
58 + if (pcre2_get_ovector_count (match_info->match_data) > G_MAXUINT32 / 2)
72 @@ -1104,7 +1106,8 @@ g_match_info_next (GMatchInfo *match_info,
73 match_info->pos = match_info->offsets[1];
76 - g_assert (match_info->matches <= match_info->n_subpatterns + 1);
77 + g_assert (match_info->matches < 0 ||
78 + (uint32_t) match_info->matches <= match_info->n_subpatterns + 1);
82 @@ -1387,7 +1390,7 @@ g_match_info_fetch_pos (const GMatchInfo *match_info,
86 - if (match_num >= MAX (match_info->n_subpatterns + 1, match_info->matches))
[all …]
Dbackport-gregex-if-JIT-stack-limit-is-reached-fall-back-to-interpretive-matching.patch28 @@ -1107,8 +1105,17 @@ g_match_info_next (GMatchInfo *match_info,
30 match_info->match_data,
31 match_info->match_context);
34 + if (match_info->matches == PCRE2_ERROR_JIT_STACKLIMIT)
45 match_info->matches = pcre2_match (match_info->regex->pcre_re,
46 (PCRE2_SPTR8) match_info->string,
103 @@ -1109,12 +1109,13 @@ g_match_info_next (GMatchInfo *match_info,
105 if (match_info->matches == PCRE2_ERROR_JIT_STACKLIMIT)
118 match_info->matches = pcre2_match (match_info->regex->pcre_re,
Dbackport-gregex-Do-not-try-access-the-undefined-match-offsets.patch24 @@ -1073,6 +1073,12 @@ g_match_info_next (GMatchInfo *match_info,
25 match_info->regex->pattern, match_error (match_info->matches));
28 + else if (match_info->matches == PCRE2_ERROR_NOMATCH)
31 + match_info->pos = -1;
35 if (!recalc_match_offsets (match_info, error))
47 + "*match_info->pos >= 0*");
Dbackport-replace-pcre1-with-pcre2.patch951 match_info->regex = g_regex_ref ((GRegex *)regex);
952 match_info->string = string;
953 match_info->string_len = string_len;
954 - match_info->matches = PCRE_ERROR_NOMATCH;
955 + match_info->matches = PCRE2_ERROR_NOMATCH;
956 match_info->pos = start_position;
957 match_info->match_opts = match_options;
960 - PCRE_INFO_CAPTURECOUNT, &match_info->n_subpatterns);
962 + &match_info->n_subpatterns);
964 + match_info->match_context = pcre2_match_context_create (NULL);
[all …]
Dbackport-gregex-use-G_REGEX_OPTIMIZE-flag-to-enable-JIT-compilation.patch101 @@ -817,6 +825,56 @@ recalc_match_offsets (GMatchInfo *match_info,
157 * @match_info: a #GMatchInfo
158 @@ -956,13 +1014,28 @@ g_match_info_next (GMatchInfo *match_info,
161 opts = map_to_pcre2_match_flags (match_info->regex->match_opts | match_info->match_opts);
162 - match_info->matches = pcre2_match (match_info->regex->pcre_re,
163 - (PCRE2_SPTR8) match_info->string,
164 - match_info->string_len,
165 - match_info->pos,
167 - match_info->match_data,
168 - match_info->match_context);
[all …]
Dbackport-regex-Do-not-mix-PCRE2-Compile-Match-Newline-and-BSR-flags.patch551 GMatchInfo *match_info;
554 match_info->string_len = string_len;
555 match_info->matches = PCRE2_ERROR_NOMATCH;
556 match_info->pos = start_position;
557 - match_info->match_opts = match_options;
558 + match_info->match_opts =
562 &match_info->n_subpatterns);
563 @@ -822,8 +853,8 @@ recalc_match_offsets (GMatchInfo *match_info,
574 @@ -1009,7 +1040,7 @@ g_match_info_next (GMatchInfo *match_info,
578 - opts = map_to_pcre2_match_flags (match_info->regex->match_opts | match_info->match_opts);
[all …]
Dbackport-regex-Do-not-use-JIT-when-using-unsupported-match-options.patch43 @@ -869,7 +876,7 @@ recalc_match_offsets (GMatchInfo *match_info,
111 g_match_info_next (GMatchInfo *match_info,
118 @@ -1060,8 +1072,8 @@ g_match_info_next (GMatchInfo *match_info,
120 opts = match_info->regex->match_opts | match_info->match_opts;
122 - enable_jit_with_match_options (match_info->regex, opts);
123 - if (match_info->regex->jit_status == JIT_STATUS_ENABLED)
124 + jit_status = enable_jit_with_match_options (match_info->regex, opts);
127 match_info->matches = pcre2_jit_match (match_info->regex->pcre_re,
128 (PCRE2_SPTR8) match_info->string,
Dbackport-gregex-Use-pcre2-error-messages-if-we-dont-provide-a-specific-one.patch103 @@ -1096,9 +1127,12 @@ g_match_info_next (GMatchInfo *match_info,
105 if (IS_PCRE2_ERROR (match_info->matches))
107 + gchar *error_msg = get_match_error_message (match_info->matches);
111 - match_info->regex->pattern, match_error (match_info->matches));
112 + match_info->regex->pattern, error_msg);
116 else if (match_info->matches == 0)
Dbackport-gregex-do-not-set-match-and-recursion-limits-on-match-context.patch25 &match_info->n_subpatterns);
27 match_info->match_context = pcre2_match_context_create (NULL);
28 - pcre2_set_match_limit (match_info->match_context, 65536); /* should be plenty */
29 - pcre2_set_recursion_limit (match_info->match_context, 64); /* should be plenty */
Dbackport-gregex-Mark-g_match_info_get_regex-as-transfer-none.patch18 * after you free @match_info object.
20 - * Returns: #GRegex object used in @match_info
21 + * Returns: (transfer none): #GRegex object used in @match_info
Dbackport-gregex-Add-G_REGEX_DEFAULT-G_REGEX_MATCH_DEFAULT.patch58 * GMatchInfo *match_info;
62 * g_regex_match (regex, string, 0, &match_info);
63 * while (g_match_info_matches (match_info))
66 * GMatchInfo *match_info;
71 * g_regex_match_full (regex, string, -1, 0, 0, &match_info, &error);
72 * while (g_match_info_matches (match_info))
156 GMatchInfo *match_info;
166 GMatchInfo *match_info;
237 g_regex_match (regex, data->string, 0, &match_info);
273 0, &match_info, NULL);
[all …]
/third_party/node/deps/v8/src/builtins/
Dbuiltins-regexp.cc111 Handle<RegExpMatchInfo> match_info = isolate->regexp_last_match_info(); in BUILTIN() local
112 const int length = match_info->NumberOfCaptureRegisters(); in BUILTIN()
123 return *RegExpUtils::GenericCaptureGetter(isolate, match_info, last_capture); in BUILTIN()
128 Handle<RegExpMatchInfo> match_info = isolate->regexp_last_match_info(); in BUILTIN() local
129 const int start_index = match_info->Capture(0); in BUILTIN()
130 Handle<String> last_subject(match_info->LastSubject(), isolate); in BUILTIN()
136 Handle<RegExpMatchInfo> match_info = isolate->regexp_last_match_info(); in BUILTIN() local
137 const int start_index = match_info->Capture(1); in BUILTIN()
138 Handle<String> last_subject(match_info->LastSubject(), isolate); in BUILTIN()
Dbuiltins-regexp-gen.cc223 TNode<RegExpMatchInfo> match_info, TNode<String> string, in ConstructNewResultFromMatchInfo() argument
228 match_info, RegExpMatchInfo::kNumberOfCapturesIndex))); in ConstructNewResultFromMatchInfo()
231 match_info, RegExpMatchInfo::kFirstCaptureIndex)); in ConstructNewResultFromMatchInfo()
233 match_info, RegExpMatchInfo::kFirstCaptureIndex + 1)); in ConstructNewResultFromMatchInfo()
271 CAST(UnsafeLoadFixedArrayElement(match_info, from_cursor)); in ConstructNewResultFromMatchInfo()
279 CAST(UnsafeLoadFixedArrayElement(match_info, from_cursor_plus1)); in ConstructNewResultFromMatchInfo()
401 match_info, maybe_names)); in ConstructNewResultFromMatchInfo()
435 TNode<Number> last_index, TNode<RegExpMatchInfo> match_info, in RegExpExecInternal() argument
677 SmiSub(LoadFixedArrayBaseLength(match_info), in RegExpExecInternal()
688 match_info, RegExpMatchInfo::kNumberOfCapturesIndex, register_count); in RegExpExecInternal()
[all …]
Dbuiltins-regexp-gen.h57 TNode<Number> last_index, TNode<RegExpMatchInfo> match_info,
62 TNode<RegExpMatchInfo> match_info, TNode<String> string,
/third_party/mesa3d/src/gallium/drivers/r300/compiler/tests/
Drc_test_helpers.c61 struct match_info { struct
117 struct match_info Negate;
118 struct match_info Abs;
119 struct match_info File;
120 struct match_info Index;
121 struct match_info Swizzle;
250 struct match_info File;
251 struct match_info Index;
252 struct match_info WriteMask;
352 struct match_info Opcode;
[all …]
/third_party/rust/crates/regex/regex-capi/src/
Drure.rs177 match_info: *mut rure_match,
182 if !match_info.is_null() {
183 (*match_info).start = m.start();
184 (*match_info).end = m.end();
328 match_info: *mut rure_match,
348 return rure_iter_next(it, haystack, len, match_info);
354 if !match_info.is_null() {
356 (*match_info).start = s;
357 (*match_info).end = e;
418 match_info: *mut rure_match,
[all …]
/third_party/node/deps/v8/src/regexp/
Dregexp-utils.cc18 Isolate* isolate, Handle<RegExpMatchInfo> match_info, int capture, in GenericCaptureGetter() argument
21 if (index >= match_info->NumberOfCaptureRegisters()) { in GenericCaptureGetter()
26 const int match_start = match_info->Capture(index); in GenericCaptureGetter()
27 const int match_end = match_info->Capture(index + 1); in GenericCaptureGetter()
34 Handle<String> last_subject(match_info->LastSubject(), isolate); in GenericCaptureGetter()
Dregexp-utils.h23 Handle<RegExpMatchInfo> match_info,
/third_party/node/deps/v8/src/objects/
Djs-regexp.cc18 Isolate* isolate, Handle<RegExpMatchInfo> match_info, in BuildIndices() argument
29 int num_indices = match_info->NumberOfCaptureRegisters(); in BuildIndices()
37 int start_offset = match_info->Capture(base_offset); in BuildIndices()
38 int end_offset = match_info->Capture(base_offset + 1); in BuildIndices()
Dregexp-match-info.h58 Isolate* isolate, Handle<RegExpMatchInfo> match_info, int capture_count);

12