mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 11:16:29 +03:00
unit: use bytecode_ptr instead of aligned_unique_ptr
This commit is contained in:
committed by
Matthew Barr
parent
b6047ea5d4
commit
e8162960fc
@@ -29,20 +29,20 @@
|
||||
#include "config.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "util/target_info.h"
|
||||
#include "util/charreach.h"
|
||||
#include "grey.h"
|
||||
#include "hs_compile.h" /* for controlling ssse3 usage */
|
||||
#include "compiler/compiler.h"
|
||||
#include "nfa/lbr.h"
|
||||
#include "nfa/nfa_api.h"
|
||||
#include "nfa/nfa_internal.h"
|
||||
#include "nfa/nfa_api_util.h"
|
||||
#include "nfa/nfa_internal.h"
|
||||
#include "nfagraph/ng.h"
|
||||
#include "nfagraph/ng_lbr.h"
|
||||
#include "nfagraph/ng_util.h"
|
||||
#include "util/alloc.h"
|
||||
#include "util/bytecode_ptr.h"
|
||||
#include "util/charreach.h"
|
||||
#include "util/compile_context.h"
|
||||
#include "grey.h"
|
||||
#include "nfagraph/ng.h"
|
||||
#include "compiler/compiler.h"
|
||||
#include "hs_compile.h" /* for controlling ssse3 usage */
|
||||
#include "util/target_info.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@@ -110,8 +110,8 @@ protected:
|
||||
nfa = constructLBR(*g, triggers, cc, rm);
|
||||
ASSERT_TRUE(nfa != nullptr);
|
||||
|
||||
full_state = aligned_zmalloc_unique<char>(nfa->scratchStateSize);
|
||||
stream_state = aligned_zmalloc_unique<char>(nfa->streamStateSize);
|
||||
full_state = make_bytecode_ptr<char>(nfa->scratchStateSize, 64);
|
||||
stream_state = make_bytecode_ptr<char>(nfa->streamStateSize);
|
||||
}
|
||||
|
||||
virtual void initQueue() {
|
||||
@@ -154,11 +154,11 @@ protected:
|
||||
// Compiled NFA structure.
|
||||
bytecode_ptr<NFA> nfa;
|
||||
|
||||
// Space for full state.
|
||||
aligned_unique_ptr<char> full_state;
|
||||
// Aligned space for full state.
|
||||
bytecode_ptr<char> full_state;
|
||||
|
||||
// Space for stream state.
|
||||
aligned_unique_ptr<char> stream_state;
|
||||
bytecode_ptr<char> stream_state;
|
||||
|
||||
// Queue structure.
|
||||
struct mq q;
|
||||
|
Reference in New Issue
Block a user