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.
Files changed (42) hide show
  1. package/.prettierrc +3 -1
  2. package/.travis.yml +1 -1
  3. package/README.md +9 -8
  4. package/lib/addon.cc +4 -6
  5. package/lib/exec.cc +8 -0
  6. package/lib/wrapped_re2.h +1 -1
  7. package/package.json +5 -3
  8. package/re2.d.ts +5 -1
  9. package/tests/test_exec.js +1 -0
  10. package/vendor/re2/bitstate.cc +5 -1
  11. package/vendor/re2/compile.cc +1 -1
  12. package/vendor/re2/dfa.cc +8 -11
  13. package/vendor/re2/nfa.cc +33 -16
  14. package/vendor/re2/onepass.cc +4 -4
  15. package/vendor/re2/parse.cc +32 -32
  16. package/vendor/{util → re2}/pod_array.h +3 -3
  17. package/vendor/re2/prefilter_tree.h +1 -1
  18. package/vendor/re2/prog.h +3 -3
  19. package/vendor/re2/re2.cc +3 -3
  20. package/vendor/re2/set.cc +2 -2
  21. package/vendor/re2/simplify.cc +1 -1
  22. package/vendor/{util → re2}/sparse_array.h +4 -4
  23. package/vendor/{util → re2}/sparse_set.h +4 -4
  24. package/vendor/re2/testing/backtrack.cc +4 -0
  25. package/vendor/re2/testing/dfa_test.cc +12 -10
  26. package/vendor/re2/testing/dump.cc +4 -10
  27. package/vendor/re2/testing/exhaustive1_test.cc +2 -7
  28. package/vendor/re2/testing/exhaustive2_test.cc +0 -1
  29. package/vendor/re2/testing/exhaustive_tester.cc +11 -8
  30. package/vendor/re2/testing/random_test.cc +9 -7
  31. package/vendor/re2/testing/regexp_benchmark.cc +435 -404
  32. package/vendor/re2/testing/regexp_generator.cc +1 -1
  33. package/vendor/re2/testing/tester.cc +19 -14
  34. package/vendor/re2/walker-inl.h +1 -1
  35. package/vendor/util/benchmark.cc +83 -113
  36. package/vendor/util/benchmark.h +138 -25
  37. package/vendor/util/flags.h +8 -11
  38. package/vendor/util/malloc_counter.h +19 -0
  39. package/vendor/util/pcre.cc +7 -31
  40. package/vendor/util/test.cc +4 -1
  41. package/vendor/util/test.h +4 -12
  42. package/vendor/util/util.h +8 -0
@@ -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_
@@ -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]]