Jon Siwek
2ebc20a164
Deprecate ID::Attrs(), replace with GetAttrs()
2020-05-26 11:34:44 -07:00
Jon Siwek
28b4206519
Remove weak_ref param from ID::SetVal()
...
It was not used anywhere.
2020-05-23 09:29:27 -07:00
Jon Siwek
198d604dde
Store weak ref boolean along with Frame element Vals
2020-05-23 09:19:50 -07:00
Jon Siwek
9f4eca081f
Deprecate Frame::GetElement(ID*), replace with GetElementByID()
2020-05-23 09:08:45 -07:00
Jon Siwek
1ccbe743d0
Deprecate Frame::NthElement(), replace with GetElement()
2020-05-23 08:52:34 -07:00
Jon Siwek
e9e2e388f8
Switch Frame::SetElement() to use IntrusivePtr
2020-05-23 08:52:15 -07:00
Jon Siwek
1c617c4f7a
Store IntrusivePtrs in Frame
2020-05-22 23:43:03 -07:00
Jon Siwek
272db640aa
Deprecate Plugin::HookCallFunction(), replace with HookFunctionCall()
...
This also changes the argument type of Func::operator() to zeek::Args*
to allow plugins to be able to alter function arguments in place as
was previously documented.
2020-05-22 21:01:38 -07:00
Jon Siwek
46c5dea733
Switch plugin::Manager::HookCallFunction() to return IntrusivePtr
...
The plugin::Plugin side of things is not (yet) changed.
2020-05-22 17:48:35 -07:00
Jon Siwek
b1042e2824
Port remaining file analysis API to use IntrusivePtr
2020-05-22 16:32:40 -07:00
Jon Siwek
57a6069cd1
Deprecate file analyzer construction methods taking raw RecordVal*
...
Replaced with versions that instead take IntrusivePtr
2020-05-22 16:13:15 -07:00
Jon Siwek
ecb7c7c27e
Deprecate file_analysis::Analyzer::Args(), replace with GetArgs()
2020-05-22 12:34:40 -07:00
Jon Siwek
faa4738807
Deprecate file_analysis::File::GetVal(), replace with ToVal()
2020-05-22 12:27:37 -07:00
Jon Siwek
27c3c207e4
Change file_analysis::File::GetID() to return const-ref
2020-05-22 00:22:17 -07:00
Jon Siwek
8a3cd4c65b
Fix build: some don't like IntrusivePtr default arg w/ incomplete type
2020-05-22 00:09:14 -07:00
Jon Siwek
052104d5d2
Change bro_broker::DataVal::ScriptDataType() to IntrusivePtr
2020-05-21 23:31:01 -07:00
Jon Siwek
0a23b8dff5
Change find_nested_record_types() to take IntrusivePtr
2020-05-21 23:21:37 -07:00
Jon Siwek
a0481c0b26
Deprecate TypeType::Type(), replace with GetType()
2020-05-21 23:12:43 -07:00
Jon Siwek
863f02744e
Add is_assignable() overload taking TypeTag
2020-05-21 23:00:02 -07:00
Jon Siwek
457c08f531
Add is_atomic_type() overloads for IntrusivePtr
2020-05-21 22:53:10 -07:00
Jon Siwek
6a1c312451
Add same_type() overloads for IntrusivePtr args
2020-05-21 21:33:02 -07:00
Jon Siwek
2c4cc95e7c
Change merge_types() to take IntrusivePtrs
2020-05-21 20:01:00 -07:00
Jon Siwek
4b17929b6b
Deprecate IndexType::Indices(), replace with GetIndices()
2020-05-21 19:46:57 -07:00
Jon Siwek
4e77df3c28
Add is_vector() methods taking const-ref IntrusivePtr
2020-05-21 17:49:47 -07:00
Jon Siwek
ea878208ba
Factor static-local nil IntrusivePtrs to global locations
...
Minor optimization to remove any run-time impact.
2020-05-21 17:22:39 -07:00
Jon Siwek
a384bb8b81
Deprecate VectorVal::Lookup(), replace with At()
2020-05-21 17:03:46 -07:00
Jon Siwek
69533bcbc6
Switch VectorVal BroValUnion to store std::vector<IntrusivePtr<Val>>
...
This changes the return type of AsVector() from std::vector<Val*>*
2020-05-21 16:24:34 -07:00
Jon Siwek
40db09ccbf
Deprecate VectorVal::Insert() taking raw Val*, use IntrusivePtr
2020-05-21 15:44:06 -07:00
Jon Siwek
de1e3d7d6d
Deprecate VectorVal::Assign methods taking raw Val*
...
And adapt usages to pass in to alternate method taking IntrusivePtr
2020-05-21 15:31:04 -07:00
Jon Siwek
2cbf36721c
Merge remote-tracking branch 'origin/master' into topic/jsiwek/gh-893-intrusive-ptr-migration
2020-05-21 14:44:55 -07:00
Tim Wojtulewicz
94ef9f4542
Merge remote-tracking branch 'origin/topic/jsiwek/gh-983-broker-opaque-missing-type'
...
* origin/topic/jsiwek/gh-983-broker-opaque-missing-type:
GH-983: Fix opaque Broker types lacking a Type after (de)serialization
2020-05-21 13:05:57 -07:00
Tim Wojtulewicz
9283b1c2b2
Merge remote-tracking branch 'origin/topic/johanna/threading-allow-SendEvent-from-stuff-that-is-not-an-input-reader-because-it-turns-out-that-it-is-actually-kind-of-convenient-to-call-this-from-other-things-like-for-example-from-logging-writers'
...
* origin/topic/johanna/threading-allow-SendEvent-from-stuff-that-is-not-an-input-reader-because-it-turns-out-that-it-is-actually-kind-of-convenient-to-call-this-from-other-things-like-for-example-from-logging-writers:
Make SendEvent callable from all threads
2020-05-21 13:04:44 -07:00
Jon Siwek
d8327ee526
GH-983: Fix opaque Broker types lacking a Type after (de)serialization
2020-05-21 12:36:15 -07:00
Jon Siwek
05f829c727
Merge remote-tracking branch 'origin/topic/jazoff/fuzz-size-limit-speedup'
...
- Factored check into more descriptive function: ExceedsChunkLimit()
* origin/topic/jazoff/fuzz-size-limit-speedup:
Speed up ChunkCount validity check
2020-05-21 11:43:34 -07:00
Justin Azoff
6aa6eea7bc
Speed up ChunkCount validity check
...
When counting chunks for the purpose of a Valid check, only count up to
chunk_count_limit + 1 chunks. This speeds up the skipping of the 70,000
chunk test file considerably.
Before:
Processed 1 inputs in 0.025517s
After:
Processed 1 inputs in 0.000620s
2020-05-21 12:55:00 -04:00
Jon Siwek
fbc7725278
Change EventHandler to store IntrusivePtr<Func>
...
Also deprecates the LocalHandler() and SetLocalHandler() methods,
replaced with GetFunc() and SetFunc().
2020-05-21 01:06:05 -07:00
Jon Siwek
3b6f60a810
Add Val::AsFuncPtr() convenience method
...
Since it's not trivial to store IntrusivePtr in BroValUnion and also
not satisfying to store IntrusivePtr*.
2020-05-21 00:50:48 -07:00
Jon Siwek
5af962e11f
Deprecate StringVal::Substitute(), replace with Replace()
2020-05-20 23:38:01 -07:00
Jon Siwek
adb9d2881c
Switch a TableVal::CallChangeFunc param to IntrusivePtr
2020-05-20 23:17:25 -07:00
Jon Siwek
9798c4b763
Fix ambiguous ODesc::Add() call
2020-05-20 22:58:44 -07:00
Jon Siwek
61b44a9c63
Minor TableVal::Assign() ref-counting optimization
2020-05-20 22:23:31 -07:00
Jon Siwek
3f92df51b7
Improve TableVal HashKey management
...
* Deprecated ComputeHash() methods and replaced with MakeHashKey()
which returns std::unique_ptr<HashKey>
* Deprecated RecoverIndex() and replaced with RecreateIndex()
which takes HashKey& and returns IntrusivePtr.
* Updated the new TableVal Assign()/Remove() methods to take either
std::unique_ptr<HashKey> or HashKey& as appropriate for clarity of
ownership expectations.
2020-05-20 22:16:47 -07:00
Jon Siwek
8a6a92c348
Add back in a deprecated TableVal ctor taking raw pointers
2020-05-20 20:42:18 -07:00
Jon Siwek
ad224419ad
Deprecate TableVal::Attrs(), replace with GetAttrs()
2020-05-20 20:35:08 -07:00
Jon Siwek
dc03f0bb83
Deprecate TableVal::Delete(), replace with Remove()
2020-05-20 20:29:49 -07:00
Jon Siwek
087a0f3636
Switch Func::Call(val_list*) back to returning Val*
...
And renamed the method returning IntrusivePtr to operator().
This corrects the deprecation process for Func::Call(val_list*).
2020-05-20 18:41:59 -07:00
Jon Siwek
85a0ddd62d
Deprecate TableVal::Lookup(), replace with Find()/FindOrDefault()
2020-05-20 18:00:50 -07:00
Jon Siwek
b85cfc6fe4
Deprecate TableVal IsSubsetOf and EqualTo taking Val*, use Val&
2020-05-20 16:00:43 -07:00
Jon Siwek
e01d2c1b37
Deprecate ComputeHash(Val*) methods, replace with ComputeHash(Val&)
2020-05-20 15:47:19 -07:00
Jon Siwek
e5f66cd2e6
Deprecate TableVal::Intersect(), replace with Intersection()
2020-05-20 15:13:55 -07:00