mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
nfa: switch to using bytecode_ptr<NFA>
This commit is contained in:
committed by
Matthew Barr
parent
905ac78061
commit
a197074c5d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -26,9 +26,11 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
/**
|
||||
* \file
|
||||
* \brief SOM Slot Manager.
|
||||
*/
|
||||
|
||||
#include "slot_manager.h"
|
||||
|
||||
#include "slot_manager_internal.h"
|
||||
@@ -245,7 +247,7 @@ u32 SomSlotManager::numSomSlots() const {
|
||||
return nextSomSlot;
|
||||
}
|
||||
|
||||
u32 SomSlotManager::addRevNfa(aligned_unique_ptr<NFA> nfa, u32 maxWidth) {
|
||||
u32 SomSlotManager::addRevNfa(bytecode_ptr<NFA> nfa, u32 maxWidth) {
|
||||
u32 rv = verify_u32(rev_nfas.size());
|
||||
rev_nfas.push_back(move(nfa));
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -26,7 +26,8 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
/**
|
||||
* \file
|
||||
* \brief SOM Slot Manager.
|
||||
*/
|
||||
|
||||
@@ -35,7 +36,7 @@
|
||||
|
||||
#include "ue2common.h"
|
||||
#include "nfagraph/ng_holder.h"
|
||||
#include "util/alloc.h"
|
||||
#include "util/bytecode_ptr.h"
|
||||
#include "util/noncopyable.h"
|
||||
#include "util/ue2_containers.h"
|
||||
|
||||
@@ -78,11 +79,11 @@ public:
|
||||
|
||||
u32 numSomSlots() const;
|
||||
|
||||
const std::deque<aligned_unique_ptr<NFA>> &getRevNfas() const {
|
||||
const std::deque<bytecode_ptr<NFA>> &getRevNfas() const {
|
||||
return rev_nfas;
|
||||
}
|
||||
|
||||
u32 addRevNfa(aligned_unique_ptr<NFA> nfa, u32 maxWidth);
|
||||
u32 addRevNfa(bytecode_ptr<NFA> nfa, u32 maxWidth);
|
||||
|
||||
u32 somHistoryRequired() const { return historyRequired; }
|
||||
|
||||
@@ -97,7 +98,7 @@ private:
|
||||
std::unique_ptr<SlotCache> cache;
|
||||
|
||||
/** \brief Reverse NFAs used for SOM support. */
|
||||
std::deque<aligned_unique_ptr<NFA>> rev_nfas;
|
||||
std::deque<bytecode_ptr<NFA>> rev_nfas;
|
||||
|
||||
/** \brief In streaming mode, the amount of history we've committed to
|
||||
* using for SOM rev NFAs. */
|
||||
|
Reference in New Issue
Block a user