Justin Viiret
09938d532f
rose: return a vector from findEdgesByLiteral
2017-08-21 11:24:52 +10:00
Justin Viiret
927501175c
rose_build_long_lit: refactor to do less dupe work
...
Also some performance improvements.
2017-08-21 11:24:52 +10:00
Alex Coyte
37033ef9bb
Provide RoseResources to roseQuality.
...
RoseResources is an alternative to manually digging through the bytecode.
2017-08-21 11:24:52 +10:00
Alex Coyte
ffc2d578b1
roseQuality() no longer needs to be part of rose's API.
2017-08-21 11:23:41 +10:00
Alex Coyte
952f0aad21
support dynamic stream compression
2017-08-21 11:18:54 +10:00
Alex Coyte
f8544505ce
mergeLeftfixesVariableLag: update comments, debugging support
2017-08-21 11:18:54 +10:00
Justin Viiret
33823d60d1
tidy: "ue2::flat_set/map" -> "flat_set/map"
2017-08-21 11:14:59 +10:00
Justin Viiret
9cf66b6ac9
util: switch from Boost to std::unordered set/map
...
This commit replaces the ue2::unordered_{set,map} types with their STL
versions, with some new hashing utilities in util/hash.h. The new types
ue2_unordered_set<T> and ue2_unordered_map<Key, T> default to using the
ue2_hasher.
The header util/ue2_containers.h has been removed, and the flat_set/map
containers moved to util/flat_containers.h.
2017-08-21 11:14:55 +10:00
Wang, Xiang W
252eb820c4
ue-3145: make parents of included literals exclusive
2017-08-21 11:12:36 +10:00
Wang, Xiang W
86c5f7feb1
FDR: Squash buckets of included literals in FDR confirm
...
- Change the compile of literal matchers to two passes.
- Reverse the bucket assignment in FDR, bucket with longer literals has
smaller bucket id.
- Squash the buckets of included literals and jump to the the program of
included literals directly from parent literal program without going
through FDR confirm for included iterals.
2017-08-21 11:12:36 +10: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
cdb281df42
rose_build_convert: replace bind2nd with lambda
...
std::bind2nd was deprecated in C++11.
2017-08-21 11:12:26 +10:00
Justin Viiret
9f0bc429b4
rose_in_dump: use StdioFile
2017-08-21 11:12:16 +10:00
Justin Viiret
bf3ced92f4
hwlm_dump: take base filename, like NFA dump API
2017-08-21 11:10:11 +10:00
Justin Viiret
f762fb9af6
dump_util: richer StdioFile type
2017-08-21 11:10:11 +10:00
Justin Viiret
4edf1e4195
dump: move openStdioFile() to util/dump_util.h
2017-08-21 11:10:11 +10:00
Justin Viiret
bc953717c1
rose: dump lit tables in their own files
2017-08-21 11:10:11 +10:00
Justin Viiret
2dc1f9d629
rose_build_matchers: fix fragment noruns calc
2017-08-21 11:10:08 +10:00
Justin Viiret
c83f2ea389
rose_build_matchers: be more careful w/ mixed-case
...
Overhaul the way fragment literals are added to HWLM and accel, fix
some bugs shaken out by stricter mask use.
2017-08-21 11:09:45 +10:00
Justin Viiret
72387e0de4
lookarounds: don't reconfirm bytes in hwlm mask
2017-08-21 11:09:23 +10:00
Justin Viiret
7560e189eb
rose: always use mandatory masks for lit fragments
2017-08-21 11:09:20 +10:00
Justin Viiret
bdae3d5b80
dump: always allocate >=8 bytes for multibit
...
The multibit runtime assumes that it is always safe to read 8 bytes, so
we must over-allocate for smaller sizes. Caught by ASan.
2017-08-21 10:40:18 +10:00
Justin Viiret
85f7790a21
dfa: standardise 'using' instead of typedef
2017-08-21 10:40:18 +10:00
Justin Viiret
31141dd35b
determinise: use queue, improve api
...
- Use a queue rather than always building the full vector of state
sets.
- Make more use of move, emplace, reserve.
- Write directly into dstates argument.
- Return bool rather than int.
2017-08-21 10:40:18 +10:00
Justin Viiret
4976f019f4
rose_build_engine_blob: rose unused data() func
...
We should no longer be reading out of the engine blob.
2017-05-30 14:00:12 +10:00
Matthew Barr
f6b688fc06
rename pshufb to pshufb_m128
2017-05-30 13:59:23 +10:00
Matthew Barr
a295c96198
rename vpshufb to pshufb_m256
2017-05-30 13:59:23 +10:00
Alex Coyte
2b1a7da188
deterministic assembleProgramBlocks()
2017-05-30 13:59:00 +10:00
Justin Viiret
dfe1b8a2af
ng_depth: rename calcDepth functions, return vec
2017-05-30 13:59:00 +10:00
Alex Coyte
15c8a7bd98
rose: rework storage of extra lookaround information
...
- remove explicit lookaround table from bytecode
- make the RoseInstr responsible for adding required info to blob
2017-05-30 13:59:00 +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
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
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
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
Matthew Barr
19c7161d04
Use ue2::noncopyable instead of deleting copy ctor
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
3e5a8c9c90
rose: eliminate roseSize, use bytecode_ptr size
2017-04-26 15:19:43 +10:00
Justin Viiret
d269b83dda
rose_build_long_lit: use bytecode_ptr
2017-04-26 15:19:43 +10:00
Justin Viiret
b6047ea5d4
rose: use bytecode_ptr for interpreter programs
2017-04-26 15:19:36 +10:00
Justin Viiret
0a3bd455ad
rose_build_bytecode: fix up indentation
2017-04-26 15:19:36 +10:00