Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: src/builtins/builtins-regexp.cc

Issue 2493553002: Fix -Wsign-compare warnings in parser, scanner, regexp, runtime. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/cpu.cc ('k') | src/builtins/builtins-string.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-regexp.cc
diff --git a/src/builtins/builtins-regexp.cc b/src/builtins/builtins-regexp.cc
index 40a99856b49d634777cfce7efe1aa43c2641d924..c51e9aba3901fafe60278284b82a9c793b71934c 100644
--- a/src/builtins/builtins-regexp.cc
+++ b/src/builtins/builtins-regexp.cc
@@ -1312,7 +1312,7 @@ MaybeHandle<JSArray> RegExpSplit(Isolate* isolate, Handle<JSRegExp> regexp,
elems = FixedArray::SetAndGrow(elems, num_elems++, substr);
}
- if (num_elems == limit) break;
+ if (static_cast<uint32_t>(num_elems) == limit) break;
for (int i = 2; i < match_indices->NumberOfCaptureRegisters(); i += 2) {
const int start = match_indices->Capture(i);
@@ -1326,7 +1326,7 @@ MaybeHandle<JSArray> RegExpSplit(Isolate* isolate, Handle<JSRegExp> regexp,
factory->undefined_value());
}
- if (num_elems == limit) {
+ if (static_cast<uint32_t>(num_elems) == limit) {
return NewJSArrayWithElements(isolate, elems, num_elems);
}
}
@@ -1500,7 +1500,7 @@ BUILTIN(RegExpPrototypeSplit) {
Handle<String> substr =
factory->NewSubString(string, prev_string_index, string_index);
elems = FixedArray::SetAndGrow(elems, num_elems++, substr);
- if (num_elems == limit) {
+ if (static_cast<uint32_t>(num_elems) == limit) {
return *NewJSArrayWithElements(isolate, elems, num_elems);
}
}
@@ -1522,7 +1522,7 @@ BUILTIN(RegExpPrototypeSplit) {
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, capture, Object::GetElement(isolate, result, i));
elems = FixedArray::SetAndGrow(elems, num_elems++, capture);
- if (num_elems == limit) {
+ if (static_cast<uint32_t>(num_elems) == limit) {
return *NewJSArrayWithElements(isolate, elems, num_elems);
}
}
« no previous file with comments | « src/base/cpu.cc ('k') | src/builtins/builtins-string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698