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

Side by Side Diff: third_party/re2/patches/remove-static-initializers.patch

Issue 12033058: Updated to most recent version RE2 and remove upstreamed patches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 diff --git a/third_party/re2/re2/compile.cc b/third_party/re2/re2/compile.cc 1 diff --git a/re2/compile.cc b/re2/compile.cc
2 index adb45fd..14e401a 100644 2 index adb45fd..14e401a 100644
3 --- a/third_party/re2/re2/compile.cc 3 --- a/re2/compile.cc
4 +++ b/third_party/re2/re2/compile.cc 4 +++ b/re2/compile.cc
5 @@ -44,7 +44,7 @@ struct PatchList { 5 @@ -44,7 +44,7 @@ struct PatchList {
6 static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2); 6 static PatchList Append(Prog::Inst *inst0, PatchList l1, PatchList l2);
7 }; 7 };
8 8
9 -static PatchList nullPatchList; 9 -static PatchList nullPatchList;
10 +static PatchList nullPatchList = { 0 }; 10 +static PatchList nullPatchList = { 0 };
11 11
12 // Returns patch list containing just p. 12 // Returns patch list containing just p.
13 PatchList PatchList::Mk(uint32 p) { 13 PatchList PatchList::Mk(uint32 p) {
14 @@ -106,12 +106,13 @@ struct Frag { 14 @@ -106,12 +106,13 @@ struct Frag {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return NULL; 54 return NULL;
55 @@ -1097,7 +1098,7 @@ Prog* Compiler::CompileSet(const RE2::Options& options, RE 2::Anchor anchor, 55 @@ -1097,7 +1098,7 @@ Prog* Compiler::CompileSet(const RE2::Options& options, RE 2::Anchor anchor,
56 c.Setup(pf, options.max_mem(), anchor); 56 c.Setup(pf, options.max_mem(), anchor);
57 57
58 // Compile alternation of fragments. 58 // Compile alternation of fragments.
59 - Frag all = c.WalkExponential(re, kNullFrag, 2*c.max_inst_); 59 - Frag all = c.WalkExponential(re, kNullFrag, 2*c.max_inst_);
60 + Frag all = c.WalkExponential(re, NullFrag(), 2*c.max_inst_); 60 + Frag all = c.WalkExponential(re, NullFrag(), 2*c.max_inst_);
61 re->Decref(); 61 re->Decref();
62 if (c.failed_) 62 if (c.failed_)
63 return NULL; 63 return NULL;
64 diff --git a/third_party/re2/re2/re2.cc b/third_party/re2/re2/re2.cc 64 diff --git a/re2/re2.cc b/re2/re2.cc
65 index 78978f1..61b88e7 100644 65 index 0da886d..b9e44fc 100644
66 --- a/third_party/re2/re2/re2.cc 66 --- a/re2/re2.cc
67 +++ b/third_party/re2/re2/re2.cc 67 +++ b/re2/re2.cc
68 @@ -34,10 +34,10 @@ namespace re2 { 68 @@ -32,10 +32,10 @@ namespace re2 {
69 static const int kMaxArgs = 16; 69 static const int kMaxArgs = 16;
70 static const int kVecSize = 1+kMaxArgs; 70 static const int kVecSize = 1+kMaxArgs;
71 71
72 -const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Fu llMatchN> RE2::FullMatch; 72 -const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Fu llMatchN> RE2::FullMatch;
73 -const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Pa rtialMatchN> RE2::PartialMatch; 73 -const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Pa rtialMatchN> RE2::PartialMatch;
74 -const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::ConsumeN > RE2::Consume; 74 -const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::ConsumeN > RE2::Consume;
75 -const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::FindAndC onsumeN> RE2::FindAndConsume; 75 -const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::FindAndC onsumeN> RE2::FindAndConsume;
76 +const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Fu llMatchN> RE2::FullMatch = {}; 76 +const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Fu llMatchN> RE2::FullMatch = {};
77 +const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Pa rtialMatchN> RE2::PartialMatch = {}; 77 +const VariadicFunction2<bool, const StringPiece&, const RE2&, RE2::Arg, RE2::Pa rtialMatchN> RE2::PartialMatch = {};
78 +const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::ConsumeN > RE2::Consume = {}; 78 +const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::ConsumeN > RE2::Consume = {};
79 +const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::FindAndC onsumeN> RE2::FindAndConsume = {}; 79 +const VariadicFunction2<bool, StringPiece*, const RE2&, RE2::Arg, RE2::FindAndC onsumeN> RE2::FindAndConsume = {};
80 80
81 #define kDefaultMaxMem (8<<20) 81 #define kDefaultMaxMem (8<<20)
82 82
83 diff --git a/third_party/re2/re2/variadic_function.h b/third_party/re2/re2/varia dic_function.h 83 diff --git a/re2/variadic_function.h b/re2/variadic_function.h
84 index 8d2b763..7c7d6d5 100644 84 index 8d2b763..7c7d6d5 100644
85 --- a/third_party/re2/re2/variadic_function.h 85 --- a/re2/variadic_function.h
86 +++ b/third_party/re2/re2/variadic_function.h 86 +++ b/re2/variadic_function.h
87 @@ -11,8 +11,6 @@ template <typename Result, typename Param0, typename Param1, t ypename Arg, 87 @@ -11,8 +11,6 @@ template <typename Result, typename Param0, typename Param1, t ypename Arg,
88 Result (*Func)(Param0, Param1, const Arg* const [], int count)> 88 Result (*Func)(Param0, Param1, const Arg* const [], int count)>
89 class VariadicFunction2 { 89 class VariadicFunction2 {
90 public: 90 public:
91 - VariadicFunction2() {} 91 - VariadicFunction2() {}
92 - 92 -
93 Result operator()(Param0 p0, Param1 p1) const { 93 Result operator()(Param0 p0, Param1 p1) const {
94 return Func(p0, p1, 0, 0); 94 return Func(p0, p1, 0, 0);
95 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698