Tim Wojtulewicz
ed13972924
Move Type types to zeek namespace
2020-06-09 17:20:45 -07:00
Tim Wojtulewicz
60ed29c3b6
Move Attr to the zeek::detail namespace
2020-06-03 15:16:19 -07:00
Tim Wojtulewicz
0d623d003c
Move ID to the zeek::detail namespace
2020-06-03 15:16:19 -07:00
Tim Wojtulewicz
cbdb8ee074
Expr: move all classes into zeek::detail
2020-06-03 15:16:18 -07:00
Tim Wojtulewicz
3fa4acc175
Stmt: move Stmt classes into zeek::detail namespace
2020-06-03 13:37:57 -07:00
Jon Siwek
1f45e690a0
Change BroFunc ctor to take const-ref IntrusivePtr<ID>
2020-05-27 17:40:02 -07:00
Jon Siwek
2cee468eac
Change Scope/Func inits from id_list* to vector<IntrusivePtr<ID>>
2020-05-27 17:27:40 -07:00
Jon Siwek
46e23b49fb
Change Scope::GenerateTemporary() to return IntrusivePtr
2020-05-27 16:51:25 -07:00
Jon Siwek
8b6de5852c
Switch parsing to use vector<IntrusivePtr<Attr>> from attr_list
...
This allows improved passing/storing of Attr references to Exprs,
TypeDecl, Scope, etc.
2020-05-26 18:19:29 -07:00
Jon Siwek
5fc78a548c
Deprecate ID::FindAttr(), replace with GetAttr()
2020-05-26 15:31:31 -07:00
Jon Siwek
bee321711f
Deprecate Attributes::FindAttr(), replace with Find()
2020-05-26 15:25:08 -07:00
Jon Siwek
ccd1cbbc54
Add Attributes ctor that takes IntrusivePtrs
2020-05-26 15:05:38 -07:00
Jon Siwek
102e58b80b
Change Attributes to store std:vector<IntrusivePtr<Attr>>
...
This also changes the return type of Attributes::Attrs() from attr_list*
2020-05-26 13:05:24 -07:00
Jon Siwek
97636e97a5
Deprecate Attr::AttrExpr(), replace with GetExpr()
2020-05-26 12:13:56 -07:00
Jon Siwek
2ebc20a164
Deprecate ID::Attrs(), replace with GetAttrs()
2020-05-26 11:34:44 -07:00
Jon Siwek
6a1c312451
Add same_type() overloads for IntrusivePtr args
2020-05-21 21:33:02 -07:00
Jon Siwek
40153cc5cb
Deprecate FuncType::Args(), replace with Params()
2020-05-15 19:04:31 -07:00
Jon Siwek
a031f5b727
Deprecate Val(Func*) ctor, replace with one using IntrusivePtr
2020-05-15 16:24:53 -07:00
Jon Siwek
440b0623ac
Deprecate RecordVal(RecordType*) ctor
...
Replaced with one that takes IntrusivePtr
2020-05-14 19:31:43 -07:00
Jon Siwek
4debad8caf
Switch zeek: 🆔 :lookup to zeek: 🆔 :find
...
For parity with Scope since it now uses Find instead of Lookup
2020-05-14 18:00:18 -07:00
Jon Siwek
78e3267c44
Deprecate internal_handler(), replace with EventRegistry::Register()
...
Added a couple explicit event declarations that were missing: "net_done"
and "dns_mapping_name_changed".
2020-05-14 17:25:02 -07:00
Jon Siwek
0af7f8141b
Change lookup_ID() to return a const-reference
2020-05-14 17:24:21 -07:00
Jon Siwek
8f95a2a0bb
Deprecate Scope::Lookup(), replace with Scope::Find()
2020-05-14 17:24:21 -07:00
Jon Siwek
a5762c12cc
Move various elements into ID.h and zeek::id namespace
...
* A handful of generic/useful/common global type pointers that used
to be in NetVar.h
* Lookup functions that used to be Var.h
2020-05-14 17:24:20 -07:00
Jon Siwek
1eb723fc9d
Deprecate Val::Type(), replace with GetType()
2020-05-14 17:23:20 -07:00
Jon Siwek
d4dba40727
Deprecate VectorVal(VectorType*) ctora
...
Adds a new one taking an IntrusivePtr.
2020-05-14 17:23:20 -07:00
Jon Siwek
447b052d11
Deprecate opt_internal_val()
2020-05-14 17:23:20 -07:00
Jon Siwek
26f6fe01c8
Deprecate internal_func(), replace with zeek::lookup_func()
2020-05-14 17:23:20 -07:00
Jon Siwek
a83941d64d
Deprecate internal_val() and internal_const_val()
...
Replaced with zeek::lookup_val() and zeek::lookup_const()
2020-05-14 17:23:19 -07:00
Jon Siwek
ac06259eec
Deprecate internal_type(), replace with zeek::lookup_type()
2020-05-14 17:22:26 -07:00
Jon Siwek
32b895f4ba
Deprecate ID::ID_Val(), replace with ID::GetVal()
2020-05-14 17:18:00 -07:00
Jon Siwek
3f07c57523
Deprecate ID::Type(), replace with GetType()
2020-05-14 17:18:00 -07:00
Jon Siwek
f26904e031
Deprecate BroType::YieldType(), replace with Yield()
2020-05-14 17:18:00 -07:00
Jon Siwek
103fed9f01
Deprecate RecordType::FieldType(), replace with GetFieldType()
2020-05-14 17:18:00 -07:00
Jon Siwek
9ab7150883
Deprecate SetType::SetElements(), replace with SetType::Elements()
2020-05-14 17:18:00 -07:00
Jon Siwek
89dd668aff
Change BroType::ShallowClone() to return IntrusivePtr
2020-05-14 17:18:00 -07:00
Jon Siwek
b096e552d3
Deprecate TableVal::ConvertToList() and TableVal::ConvertToPureList()
...
Replaced with ToListVal() and ToPureListVal() that return IntrusivePtr
2020-05-14 17:18:00 -07:00
Tim Wojtulewicz
ba1c03188f
Merge remote-tracking branch 'origin/topic/jsiwek/alternate-hook-event-prototypes'
...
* origin/topic/jsiwek/alternate-hook-event-prototypes:
Add warning for ineffective &default arguments in handlers
Fix frame size allocation of alternate event/hook handlers
Emit error for alternate event/hook prototype args with attributes
Improve alternate event/hook prototype matching
Allow alternate event/hook prototype declarations
2020-04-13 15:00:25 -07:00
Jon Siwek
640dbea57c
Add warning for ineffective &default arguments in handlers
...
For event/hook handlers that had a previous declaration, any &default
arguments are ineffective. Only &default uses in the initial
prototype's arguments have an effect (that includes if the handler
is actually the site at which the declaration occurs).
2020-04-09 22:51:01 -07:00
Jon Siwek
070b28ac05
Emit error for alternate event/hook prototype args with attributes
...
Argument attributes are only allowed in the canonical prototype.
2020-04-09 21:00:09 -07:00
Jon Siwek
9b6934eab8
Improve alternate event/hook prototype matching
...
This fixes it to again allow the old behavior of matching a handler
against the canonical prototype as long as all argument types, but not
necessarily names, match.
2020-04-09 20:20:38 -07:00
Johanna Amann
876c803d75
Merge remote-tracking branch 'origin/topic/timw/776-using-statements'
...
* origin/topic/timw/776-using-statements:
Remove 'using namespace std' from SerialTypes.h
Remove other using statements from headers
GH-776: Remove using statements added by PR 770
Includes small fixes in files that changed since the merge request was
made.
Also includes a few small indentation fixes.
2020-04-09 13:31:07 -07:00
Tim Wojtulewicz
0a47588d0b
The remaining nulls
2020-04-07 16:08:34 -07:00
Tim Wojtulewicz
d53c1454c0
Remove 'using namespace std' from SerialTypes.h
...
This unfortunately cuases a ton of flow-down changes because a lot of other
code was depending on that definition existing. This has a fairly large chance
to break builds of external plugins, considering how many internal ones it broke.
2020-04-07 15:59:59 -07:00
Jon Siwek
8c0e8ecd28
Allow alternate event/hook prototype declarations
...
The alternates must be some subset of the canonical prototype (the one
that's first declared) and allows users to define handlers for any
such prototype. Example:
# Prototype declarations
global my_event: event(s: string, c: count);
global my_event: event(c: count);
global my_event: event();
# Handler definitions
event my_event(s: string, c: count) { print s, c; }
event my_event(c: count) { print c; }
event my_event() { }
This allows handlers to consume a subset of the arguments or even
re-order them. This makes it easier to either extend an existing
event/hook's arguments and/or deprecate usages of certain prototypes.
2020-04-01 17:25:28 -07:00
Johanna Amann
3ce1c9ffd6
Merge remote-tracking branch 'origin/topic/jsiwek/misc-lambda-fixes'
...
* origin/topic/jsiwek/misc-lambda-fixes:
GH-725: fix logic for finding a lambda's usage of outer IDs
Change record field anonymous functions to use lambda expressions
2020-03-31 15:46:54 -07:00
Johanna Amann
d18f2f8f76
Merge remote-tracking branch 'origin/topic/timw/override'
...
* origin/topic/timw/override:
Mark input/output message classes as final, since nothing should be inheriting from them
Add missing override specifier to a number of methods, remove virtual from some as well
Add override specifier to Configure() method in almost all of the internal plugins
2020-03-31 08:48:44 -07:00
Tim Wojtulewicz
fd5e15b116
The Great Embooleanating
...
A large number of functions had return values and/or arguments changed
to use ``bool`` types instead of ``int``.
2020-03-31 06:41:54 +00:00
Tim Wojtulewicz
186005133b
Add missing override specifier to a number of methods, remove virtual from some as well
2020-03-30 14:54:24 -07:00
Jon Siwek
1ca11f11c7
GH-725: fix logic for finding a lambda's usage of outer IDs
2020-03-26 17:05:59 -07:00