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

Unified Diff: third_party/re2/re2/compile.cc

Issue 10873029: Migrate WebRequestRedirectByRegExAction to use RE2 and roll RE2 to revision 97:401ab4168e8e (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 4 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 | « third_party/re2/patches/remove-valgrind-code.patch ('k') | third_party/re2/re2/dfa.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/compile.cc
diff --git a/third_party/re2/re2/compile.cc b/third_party/re2/re2/compile.cc
index 0c96d3395522afc9ec98c7882f428280e0fa6cf2..adb45fddbfdcda8e2198caddb83b2c4e3a41b26c 100644
--- a/third_party/re2/re2/compile.cc
+++ b/third_party/re2/re2/compile.cc
@@ -44,7 +44,7 @@ struct PatchList {
static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2);
};
-static PatchList nullPatchList = { 0 };
+static PatchList nullPatchList;
// Returns patch list containing just p.
PatchList PatchList::Mk(uint32 p) {
@@ -106,11 +106,12 @@ struct Frag {
uint32 begin;
PatchList end;
+ explicit Frag(LinkerInitialized) {}
Frag() : begin(0) { end.p = 0; } // needed so Frag can go in vector
Frag(uint32 begin, PatchList end) : begin(begin), end(end) {}
};
-static Frag kNullFrag;
+static Frag kNullFrag(LINKER_INITIALIZED);
// Input encodings.
enum Encoding {
@@ -588,7 +589,7 @@ static struct ByteRangeProg {
};
void Compiler::Add_80_10ffff() {
- int inst[arraysize(prog_80_10ffff)];
+ int inst[arraysize(prog_80_10ffff)] = { 0 }; // does not need to be initialized; silences gcc warning
for (int i = 0; i < arraysize(prog_80_10ffff); i++) {
const ByteRangeProg& p = prog_80_10ffff[i];
int next = 0;
@@ -732,7 +733,7 @@ Frag Compiler::PostVisit(Regexp* re, Frag, Frag, Frag* child_frags,
Frag f = Match(re->match_id());
// Remember unanchored match to end of string.
if (anchor_ != RE2::ANCHOR_BOTH)
- f = Cat(DotStar(), f);
+ f = Cat(DotStar(), Cat(EmptyWidth(kEmptyEndText), f));
return f;
}
« no previous file with comments | « third_party/re2/patches/remove-valgrind-code.patch ('k') | third_party/re2/re2/dfa.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698