33 Commits

Author SHA1 Message Date
Konstantinos Margaritis
22166ed948 Fix remaining marked as done const* cppcheck warnings 2024-05-15 10:52:31 +03:00
gtsoul-tech
5ad1f2127f constVariablePointer 2024-05-02 14:30:18 +03:00
G.E
7fd45f864c next batch for cppeheck, addressing syntaxError and
constParameterPointer
2024-04-24 17:32:09 +03:00
Chang, Harry
8a1c497f44 Logical Combination of patterns. 2018-06-27 14:04:57 +08:00
Wang, Xiang W
67a8f43355 literal matchers: change context passed to callback to scratch 2017-08-21 11:12:36 +10:00
Wang, Xiang W
ebb1b0006b remove start argument in literal matcher callbacks 2017-08-21 11:12:36 +10:00
Justin Viiret
cfa63a7096 stream: simplify do_rebuild call site 2017-04-26 14:46:49 +10:00
Justin Viiret
ac858cd47c rose: build a separate delay rebuild matcher 2017-04-26 14:46:48 +10:00
Alex Coyte
bbd64f98ae allow streams to marked as exhausted in more cases
At stream boundaries, we can mark streams as exhausted if there are no
groups active and there are no other ways to report matches. This allows us
to stop maintaining the history buffer on subsequent stream writes.
Previously, streams were only marked as exhausted if a pure highlander case
reported all patterns or the outfix in a sole outfix case died.
2017-04-26 14:44:53 +10:00
Justin Viiret
8cadba0bdd rose: call loadLongLiteralState() earlier
The ll_buf, ll_buf_nocase buffers must be initialised before anyh path
that could lead to storeLongLiteralState().
2016-12-02 11:23:14 +11:00
Justin Viiret
b9650d4fd0 rose: don't unconditionally init ll_buf etc
This is only necessary (and already always done) if there is a long
literal table.
2016-12-02 11:22:27 +11:00
Justin Viiret
8869dee643 rose: simplify long lit table, add bloom filter
Replaces the original long lit hash table (used in streaming mode) with a
smaller, simpler linear probing approach. Adds a bloom filter in front
of it to reduce time spent on false positives.

Sizing of both the hash table and bloom filter are done based on max
load.
2016-10-28 14:52:45 +11:00
Justin Viiret
68bf473e2e fdr: move long literal handling into Rose
Move the hash table used for long literal support in streaming mode from
FDR to Rose, and introduce new instructions CHECK_LONG_LIT and
CHECK_LONG_LIT_NOCASE for doing literal confirm for long literals.

This simplifies FDR confirm, and guarantees that HWLM matchers will only
be used for literals < 256 bytes long.
2016-10-28 14:52:26 +11:00
Alex Coyte
5c5ec905cc violet: initial implementation 2016-08-10 15:01:08 +10:00
Justin Viiret
76d96809f8 rose: move roseRunProgram into its own unit
The roseRunProgram function had gotten very large for the number of
sites it was being inlined into, with negative effects on performance in
large cases. This change moves it into its own translation unit.
2016-07-08 11:01:34 +10:00
Alex Coyte
f166bc5658 allow some prefixes that may squash the literal match to run eagerly 2016-07-08 11:01:34 +10:00
Alex Coyte
575e8c06dc only show floating groups to the floating table 2016-07-08 10:59:40 +10:00
Justin Viiret
cf8e8c90ff eod: move stream eod code to stream.c 2016-07-08 10:55:36 +10:00
Justin Viiret
36150bbc19 Rose: replace internal_report with program
Replace the use of the internal_report structure (for reports from
engines, MPV etc) with the Rose program interpreter.

SOM processing was reworked to use a new som_operation structure that is
embedded in the appropriate instructions.
2016-04-20 13:34:57 +10:00
Justin Viiret
6af1ead0aa Rose: make HWLM callbacks take scratch as ctx 2016-04-20 13:34:54 +10:00
Justin Viiret
67b9784dae Rose: use program for all literal matches
Unifies all literal match paths so that the Rose program is used for all
of them. This removes the previous specialised "direct report" and
"multi direct report" paths. Some additional REPORT instruction work was
necessary for this.

Reworked literal construction path at compile time in prep for using
program offsets as literal IDs.

Completely removed the anchored log runtime, which is no longer worth
the extra complexity.
2016-04-20 13:34:54 +10:00
Justin Viiret
8f3471dd4e Rename reduceQueue to reduceInfixQueue 2016-03-01 11:34:57 +11:00
Justin Viiret
09bf568d95 Rose: clean up use of scratch, RoseContext 2016-03-01 11:32:11 +11:00
Justin Viiret
9e9bb6a960 Rose: pack global state bits into one u8
Eliminate the RoseRuntimeState structure in favour of a single status
byte that is stored in scratch and copied to/from stream state.
2016-03-01 11:32:01 +11:00
Justin Viiret
28f379d738 Rose: remove alignment req for anchored DFA state 2016-03-01 11:32:01 +11:00
Justin Viiret
70620327cc Remove RoseContext::userCtx
All Rose callbacks receive scratch as their context.
2016-03-01 11:29:04 +11:00
Justin Viiret
8783750c72 Remove dupe engine, state ptrs from RoseContext
Remove the RoseEngine and stream state pointers frose RoseContext, as
they are also present in core_info.

Unify stream state handing in Rose to always use a char * (we were often
a u8 * for no particularly good reason) and tidy up.
2016-03-01 11:23:56 +11:00
Justin Viiret
48c9d7c381 Remove use of depth from Rose entirely 2016-03-01 11:23:11 +11:00
Justin Viiret
14f18bd6e8 Don't use depth for in-flight check 2016-03-01 11:23:11 +11:00
Justin Viiret
2abc038f1c roseCatchUpLeftfixes: iter state on stack 2016-03-01 11:20:36 +11:00
Alex Coyte
a7d8dafb71 detach the sidecar 2016-03-01 11:13:23 +11:00
Justin Viiret
cea914e18e Add q_last_type() queue function
Analogous to q_cur_type(), asserts that queue indices are within a valid
range.
2015-11-10 14:25:04 +11:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00