unit: use bytecode_ptr instead of aligned_unique_ptr

This commit is contained in:
Justin Viiret
2017-04-04 11:41:50 +10:00
committed by Matthew Barr
parent b6047ea5d4
commit e8162960fc
5 changed files with 30 additions and 30 deletions

View File

@@ -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;