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

Unified Diff: src/regexp/regexp-ast.h

Issue 1773573002: Fix compile error on arm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/regexp-ast.h
diff --git a/src/regexp/regexp-ast.h b/src/regexp/regexp-ast.h
index 89cbf9b9ff94c0eacdb3bbddce680c7d57aa3765..fbe9c750790efde25299766265c647d2d43ddbcc 100644
--- a/src/regexp/regexp-ast.h
+++ b/src/regexp/regexp-ast.h
@@ -79,7 +79,8 @@ class CharacterRange {
// For compatibility with the CHECK_OK macro
CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT
CharacterRange(uc32 from, uc32 to) : from_(from), to_(to) {
- DCHECK(from <= to);
+ DCHECK(0 <= from && to <= String::kMaxCodePoint);
+ DCHECK(static_cast<uint32_t>(from) <= static_cast<uint32_t>(to));
}
static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges,
Zone* zone);
@@ -88,8 +89,6 @@ class CharacterRange {
return CharacterRange(value, value);
}
static inline CharacterRange Range(uc32 from, uc32 to) {
- DCHECK(0 <= from && to <= String::kMaxCodePoint);
- DCHECK(static_cast<uint32_t>(from) <= static_cast<uint32_t>(to));
return CharacterRange(from, to);
}
static inline CharacterRange Everything() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698