]> granicus.if.org Git - re2c/commitdiff
libre2c: deleted unused buffers.
authorUlya Trofimovich <skvadrik@gmail.com>
Tue, 19 Feb 2019 21:44:38 +0000 (21:44 +0000)
committerUlya Trofimovich <skvadrik@gmail.com>
Tue, 19 Feb 2019 21:44:38 +0000 (21:44 +0000)
re2c/lib/regex_impl.h
re2c/lib/regexec.cc

index ecb9f1e1b1f1c929af7a46afeda000afd5fd50aa..1ae4798b667437a2ae1c81feffc5ba8443283587 100644 (file)
@@ -27,10 +27,8 @@ struct history_t
     static const int32_t ROOT;
 
     std::vector<node_t> nodes;
-    tag_path_t path1;
-    tag_path_t path2;
 
-    history_t(size_t nstates, size_t ntags);
+    explicit history_t(size_t nstates);
     inline const node_t &at(int32_t i) const { return nodes[static_cast<uint32_t>(i)]; }
     inline int32_t push(int32_t i, uint32_t step, tag_info_t info, uint32_t orig);
     FORBID_COPY(history_t);
index 44b3bcfd47f6cb76b792ad63012d86f6530ebe5a..7770e2c30cab8b7e725182705c8d7f9c07c6e1a3 100644 (file)
@@ -75,7 +75,7 @@ simctx_t::simctx_t(const nfa_t *nfa, size_t re_nsub, int flags)
     , flags(flags)
     , reach()
     , state()
-    , hist(nfa->size, nfa->tags.size())
+    , hist(nfa->size)
     , hidx(history_t::ROOT)
     , step(0)
     , rule(Rule::NONE)
@@ -151,14 +151,10 @@ void init(simctx_t &ctx, const char *string)
     DASSERT(ctx.gtop_heap.empty());
 }
 
-history_t::history_t(size_t nstates, size_t ntags)
+history_t::history_t(size_t nstates)
     : nodes()
-    , path1()
-    , path2()
 {
     nodes.reserve(nstates);
-    path1.reserve(ntags);
-    path2.reserve(ntags);
 }
 
 } // namespace libre2c