provide ZAM execution with direct access to ZVal elements

This commit is contained in:
Vern Paxson 2021-08-16 10:29:49 -07:00
parent 9f68002392
commit 51fee244c9

View file

@ -35,6 +35,10 @@ using TypeValPtr = IntrusivePtr<TypeVal>;
using ValPtr = IntrusivePtr<Val>; using ValPtr = IntrusivePtr<Val>;
using VectorValPtr = IntrusivePtr<VectorVal>; using VectorValPtr = IntrusivePtr<VectorVal>;
namespace detail {
class ZBody;
}
// Note that a ZVal by itself is ambiguous: it doesn't track its type. // Note that a ZVal by itself is ambiguous: it doesn't track its type.
// This makes them consume less memory and cheaper to copy. It does // This makes them consume less memory and cheaper to copy. It does
// however require a separate way to determine the type. Generally // however require a separate way to determine the type. Generally
@ -160,6 +164,7 @@ union ZVal {
private: private:
friend class RecordVal; friend class RecordVal;
friend class VectorVal; friend class VectorVal;
friend class zeek::detail::ZBody;
// Used for bool, int, enum. // Used for bool, int, enum.
bro_int_t int_val; bro_int_t int_val;