re2 1.10.2 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierrc +3 -1
- package/.travis.yml +1 -1
- package/README.md +9 -8
- package/lib/addon.cc +4 -6
- package/lib/exec.cc +8 -0
- package/lib/wrapped_re2.h +1 -1
- package/package.json +5 -3
- package/re2.d.ts +5 -1
- package/tests/test_exec.js +1 -0
- package/vendor/re2/bitstate.cc +5 -1
- package/vendor/re2/compile.cc +1 -1
- package/vendor/re2/dfa.cc +8 -11
- package/vendor/re2/nfa.cc +33 -16
- package/vendor/re2/onepass.cc +4 -4
- package/vendor/re2/parse.cc +32 -32
- package/vendor/{util → re2}/pod_array.h +3 -3
- package/vendor/re2/prefilter_tree.h +1 -1
- package/vendor/re2/prog.h +3 -3
- package/vendor/re2/re2.cc +3 -3
- package/vendor/re2/set.cc +2 -2
- package/vendor/re2/simplify.cc +1 -1
- package/vendor/{util → re2}/sparse_array.h +4 -4
- package/vendor/{util → re2}/sparse_set.h +4 -4
- package/vendor/re2/testing/backtrack.cc +4 -0
- package/vendor/re2/testing/dfa_test.cc +12 -10
- package/vendor/re2/testing/dump.cc +4 -10
- package/vendor/re2/testing/exhaustive1_test.cc +2 -7
- package/vendor/re2/testing/exhaustive2_test.cc +0 -1
- package/vendor/re2/testing/exhaustive_tester.cc +11 -8
- package/vendor/re2/testing/random_test.cc +9 -7
- package/vendor/re2/testing/regexp_benchmark.cc +435 -404
- package/vendor/re2/testing/regexp_generator.cc +1 -1
- package/vendor/re2/testing/tester.cc +19 -14
- package/vendor/re2/walker-inl.h +1 -1
- package/vendor/util/benchmark.cc +83 -113
- package/vendor/util/benchmark.h +138 -25
- package/vendor/util/flags.h +8 -11
- package/vendor/util/malloc_counter.h +19 -0
- package/vendor/util/pcre.cc +7 -31
- package/vendor/util/test.cc +4 -1
- package/vendor/util/test.h +4 -12
- package/vendor/util/util.h +8 -0
package/vendor/util/test.h
CHANGED
|
@@ -6,9 +6,12 @@
|
|
|
6
6
|
#define UTIL_TEST_H_
|
|
7
7
|
|
|
8
8
|
#include "util/util.h"
|
|
9
|
-
#include "util/flags.h"
|
|
10
9
|
#include "util/logging.h"
|
|
11
10
|
|
|
11
|
+
namespace testing {
|
|
12
|
+
std::string TempDir();
|
|
13
|
+
} // namespace testing
|
|
14
|
+
|
|
12
15
|
#define TEST(x, y) \
|
|
13
16
|
void x##y(void); \
|
|
14
17
|
TestRegisterer r##x##y(x##y, # x "." # y); \
|
|
@@ -44,15 +47,4 @@ class TestRegisterer {
|
|
|
44
47
|
#define EXPECT_GT CHECK_GT
|
|
45
48
|
#define EXPECT_GE CHECK_GE
|
|
46
49
|
|
|
47
|
-
namespace testing {
|
|
48
|
-
class MallocCounter {
|
|
49
|
-
public:
|
|
50
|
-
MallocCounter(int x) {}
|
|
51
|
-
static const int THIS_THREAD_ONLY = 0;
|
|
52
|
-
long long HeapGrowth() { return 0; }
|
|
53
|
-
long long PeakHeapGrowth() { return 0; }
|
|
54
|
-
void Reset() {}
|
|
55
|
-
};
|
|
56
|
-
} // namespace testing
|
|
57
|
-
|
|
58
50
|
#endif // UTIL_TEST_H_
|
package/vendor/util/util.h
CHANGED
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
#endif
|
|
18
18
|
#endif
|
|
19
19
|
|
|
20
|
+
#ifndef ATTRIBUTE_UNUSED
|
|
21
|
+
#if defined(__GNUC__)
|
|
22
|
+
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
|
23
|
+
#else
|
|
24
|
+
#define ATTRIBUTE_UNUSED
|
|
25
|
+
#endif
|
|
26
|
+
#endif
|
|
27
|
+
|
|
20
28
|
#ifndef FALLTHROUGH_INTENDED
|
|
21
29
|
#if defined(__clang__)
|
|
22
30
|
#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
|