Justin Viiret
1a04d1330e
verify_types: add type static assertions
2017-05-30 13:59:00 +10:00
Justin Viiret
16a00074c6
verify_types: throw on failure
...
In release builds, we would like a verify_u32 (etc) failure to be more
than just an assertion.
2017-05-30 13:58:59 +10:00
Alex Coyte
097d73c7ff
pass roleStateIndices by reference
2017-05-30 13:58:59 +10:00
Alex Coyte
b30e5021f1
Strengthen assert to indicate that q->end is less than q->cur
...
Coverity CID-167665
2017-05-30 13:58:59 +10:00
Justin Viiret
8b9328fe9e
rose: replace RoseLiteralMap use of bimap
...
This apoproach is simpler and more efficient for cases with large
numbers of literals.
2017-05-30 13:58:59 +10:00
Justin Viiret
a75b2ba2e5
rose: remove hasLiteral()
2017-05-30 13:58:59 +10:00
Justin Viiret
8a7ac432c0
ue2_literal: add hash_value()
2017-05-30 13:58:59 +10:00
Alex Coyte
bb29aeb298
rose: shift program construction functions to rose_build_program
2017-05-30 13:58:32 +10:00
Justin Viiret
82838f5728
rose_build: move dedupe analysis into own file
2017-05-30 13:58:32 +10:00
Justin Viiret
9258592d0b
report_manager: more use of unordered_map
2017-05-30 13:58:32 +10:00
Justin Viiret
1878b9a857
report_manager: use unordered externalIdMap
2017-05-30 13:58:32 +10:00
Alex Coyte
1287b70f4b
split out instruction details to own files
2017-05-30 13:58:32 +10:00
Alex Coyte
f74f475189
rose_program: merge RECORD_ANCHORED instruction into ANCHORED_DELAY
2017-05-30 13:58:32 +10:00
Alex Coyte
e24c38a85c
rose: minor improvements to avoid unneeded program instructions
...
- strip out lonely check handled instructions
- avoid producing programs for empty ghost roles
2017-05-30 13:58:32 +10:00
Alex Coyte
88fd95e38a
rose: minor clean up of catchup
...
- anchored dfa do not mean that catchup is required
- remove needsCatchup from rose bytecode as catchup is based on interpreter
2017-05-30 13:58:32 +10:00
Alex Coyte
a810bac8f7
be more selective about generating CLEAR_WORK_DONE instructions
2017-05-30 13:58:32 +10:00
Alex Coyte
cd424bdb45
minor clean up of rose_build_bytecode.cpp
...
- consistently name functions creating programs as makeFoo()
- replace writeLiteralProgram() with makeFragmentProgram()
- make applyFinalSpecialisation() part of writeProgram(bc, prog)
- seperate users who want to make a program for a single literal and fragments
2017-05-30 13:58:04 +10:00
Matthew Barr
0626a30a6a
Make the build wrapper less fragile
...
This script was failing for certain paths (dots, whitespace), and using
sed to replace parts of the command line was overkill. Do less mangling,
and quote command line args.
Fixes 01org/hyperscan#51
2017-05-30 13:57:32 +10:00
Justin Viiret
d809e73d45
smallwrite: cope when everything has been pruned
2017-05-30 13:57:32 +10:00
Justin Viiret
c6f5275acc
mcclellancompile: docs for main compile function
2017-05-30 13:57:32 +10:00
Justin Viiret
42fca877a7
smallwrite: prune trie when rose is high quality
2017-05-30 13:57:32 +10:00
Justin Viiret
388c16c550
smallwrite: construct DFA states in BFS order
2017-05-30 13:57:32 +10:00
Justin Viiret
10f52346ca
smallwrite: bfs ordering, refine daddy selection
2017-05-30 13:57:32 +10:00
Justin Viiret
3b3f6b739c
smallwrite: use failure map to set dfa daddy state
2017-05-30 13:57:32 +10:00
Justin Viiret
beac58fcb4
dfa: allow smwr to avoid lengthy daddy recalc
2017-05-30 13:57:32 +10:00
Justin Viiret
1538d90a9e
mcsheng_compile: factor out find_daddy_candidates
2017-05-30 13:57:32 +10:00
Justin Viiret
f5d769118a
mcclellancompile: factor out find_daddy_candidates
2017-05-30 13:57:32 +10:00
Justin Viiret
0dd8536c6e
dfa: only accel init states from smwr path
...
If the small-write DFA has been built from literals, then we only need
to look for accel states at init.
2017-05-30 13:57:32 +10:00
Justin Viiret
41d7aa8281
dfa: prune_overlong -> clear_deeper_reports
...
Rather than pruning states, we simply clear reports on states that are
too deep and allow Hopcroft minimisation to reduce the size of the DFA
afterwards.
2017-05-30 13:57:32 +10:00
Justin Viiret
8650a1a33f
dfa_min: clean up and improve minimize code
2017-05-30 13:57:32 +10:00
Justin Viiret
8fdef3f3be
accel_dfa_build_strat: use flat_map for small maps
2017-05-30 13:49:49 +10:00
Justin Viiret
c9be18c7e2
accel_dfa_build_strat: use small_vector for paths
2017-05-30 13:49:49 +10:00
Justin Viiret
304bac3286
mcclellancompile_util: reduce malloc traffic, tidy
2017-05-30 13:49:49 +10:00
Justin Viiret
4cc998e4ab
ng_limex_accel: fix broken termination condition
2017-05-30 13:49:49 +10:00
Justin Viiret
083d84cfd6
expressions: add much faster limitToSignatures()
2017-05-30 13:49:24 +10:00
Matthew Barr
0b8f25a036
Ensure simd types are aligned to what we assume
...
Turns out Clang is sensitive to the location of the alignment attribute.
2017-05-30 13:48:38 +10:00
Justin Viiret
c0d7960954
ng_limex_accel: compile time speedups, tidy up
2017-05-30 13:48:38 +10:00
Justin Viiret
40f03929be
find_better_daddy: use flat_set for hinted states
2017-05-30 13:47:20 +10:00
Justin Viiret
698653766b
find_escape_strings: find outs2_broken faster
2017-05-30 13:47:20 +10:00
Justin Viiret
bfcb391580
doc: update copyright year
2017-04-26 15:36:04 +10:00
Justin Viiret
6dc1e202b9
hsbench: documentation
2017-04-26 15:34:45 +10:00
Matthew Barr
b1c57f9f54
cmake: check for libc++ directly
...
Rather than trying to infer libc++ use from platform and compiler, just
look for a defined symbol.
2017-04-26 15:19:52 +10:00
Matthew Barr
19c7161d04
Use ue2::noncopyable instead of deleting copy ctor
2017-04-26 15:19:51 +10:00
Matthew Barr
51b9146608
windows: tools are unix only
2017-04-26 15:19:51 +10:00
Justin Viiret
d4c66e294b
smallwrite: aho-corasick construction for literals
2017-04-26 15:19:51 +10:00
Justin Viiret
b75b169b49
smallwrite: simple trie experiment
2017-04-26 15:19:51 +10:00
Justin Viiret
eec2b8233d
rdfa_merge: sort esets before alphabet calc
2017-04-26 15:19:51 +10:00
Xu, Chi
2f9d063190
rose: fix CHECK_MULTIPATH_LOOKAROUND match difference bug
2017-04-26 15:19:49 +10:00
Justin Viiret
97bbb62504
bytecode_ptr: needs <stdexcept> for logic_error
2017-04-26 15:19:43 +10:00
Justin Viiret
37596c50cf
bytecode_ptr: avoid shadowing size()
2017-04-26 15:19:43 +10:00