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

Side by Side Diff: src/regexp/regexp-parser.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 unified diff | Download patch
« no previous file with comments | « src/parsing/scanner.h ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/regexp/regexp-parser.h" 5 #include "src/regexp/regexp-parser.h"
6 6
7 #include "src/char-predicates-inl.h" 7 #include "src/char-predicates-inl.h"
8 #include "src/factory.h" 8 #include "src/factory.h"
9 #include "src/isolate.h" 9 #include "src/isolate.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 if (characters_ == NULL) { 1600 if (characters_ == NULL) {
1601 characters_ = new (zone()) ZoneList<uc16>(4, zone()); 1601 characters_ = new (zone()) ZoneList<uc16>(4, zone());
1602 } 1602 }
1603 characters_->Add(c, zone()); 1603 characters_->Add(c, zone());
1604 LAST(ADD_CHAR); 1604 LAST(ADD_CHAR);
1605 } 1605 }
1606 } 1606 }
1607 1607
1608 1608
1609 void RegExpBuilder::AddUnicodeCharacter(uc32 c) { 1609 void RegExpBuilder::AddUnicodeCharacter(uc32 c) {
1610 if (c > unibrow::Utf16::kMaxNonSurrogateCharCode) { 1610 if (c > static_cast<uc32>(unibrow::Utf16::kMaxNonSurrogateCharCode)) {
1611 DCHECK(unicode()); 1611 DCHECK(unicode());
1612 AddLeadSurrogate(unibrow::Utf16::LeadSurrogate(c)); 1612 AddLeadSurrogate(unibrow::Utf16::LeadSurrogate(c));
1613 AddTrailSurrogate(unibrow::Utf16::TrailSurrogate(c)); 1613 AddTrailSurrogate(unibrow::Utf16::TrailSurrogate(c));
1614 } else if (unicode() && unibrow::Utf16::IsLeadSurrogate(c)) { 1614 } else if (unicode() && unibrow::Utf16::IsLeadSurrogate(c)) {
1615 AddLeadSurrogate(c); 1615 AddLeadSurrogate(c);
1616 } else if (unicode() && unibrow::Utf16::IsTrailSurrogate(c)) { 1616 } else if (unicode() && unibrow::Utf16::IsTrailSurrogate(c)) {
1617 AddTrailSurrogate(c); 1617 AddTrailSurrogate(c);
1618 } else { 1618 } else {
1619 AddCharacter(static_cast<uc16>(c)); 1619 AddCharacter(static_cast<uc16>(c));
1620 } 1620 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 return false; 1787 return false;
1788 } 1788 }
1789 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom), 1789 terms_.Add(new (zone()) RegExpQuantifier(min, max, quantifier_type, atom),
1790 zone()); 1790 zone());
1791 LAST(ADD_TERM); 1791 LAST(ADD_TERM);
1792 return true; 1792 return true;
1793 } 1793 }
1794 1794
1795 } // namespace internal 1795 } // namespace internal
1796 } // namespace v8 1796 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/scanner.h ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698