Merge remote-tracking branch 'origin/topic/timw/266-namespaces'

Merge adjustments:

- Preserved original `base_type_no_ref` argument type as ::TypeTag
- Removed superfluous #pragma guard around deprecated TableVal ctor
- Clarify NEWS regarding MetaHook{Pre,Post} deprecations
- Simplify some `::zeek::` qualifications to just `zeek::`
- Prefixed FORWARD_DECLARE_NAMESPACED macro with ZEEK_

* origin/topic/timw/266-namespaces:
  Disable some deprecation diagnostics for GCC
  Rename BroType to Type
  Update NEWS
  Review cleanup
  Move Type types to zeek namespace
  Move Flare/Pipe from the bro namespace to zeek::detail
  Move Attr to the zeek::detail namespace
  Move Trigger into the zeek::detail namespace
  Move ID to the zeek::detail namespace
  Move Anon.h into zeek::detail namespace
  Mark all of the aliased classes in plugin/Plugin.h deprecated, and fix all of the plugins that were using them
  Move all of the base plugin classes into the zeek::plugin namespace
  Expr: move all classes into zeek::detail
  Stmt: move Stmt classes into zeek::detail namespace
  Add utility macro for creating namespaced aliases for classes
This commit is contained in:
Jon Siwek 2020-06-11 23:12:02 -07:00
commit d4f3cad7d1
256 changed files with 4277 additions and 3501 deletions

View file

@ -5,6 +5,7 @@
#include "Obj.h"
#include "Queue.h"
#include "StmtEnums.h"
#include "util.h"
#include <vector>
#include <map>
@ -12,14 +13,15 @@
template <class T> class IntrusivePtr;
class Val;
class Stmt;
ZEEK_FORWARD_DECLARE_NAMESPACED(Stmt, zeek::detail);
// This needs to be defined before we do the includes that come after it.
enum ParseLocationRecType { plrUnknown, plrFileAndLine, plrFunction };
struct ParseLocationRec {
ParseLocationRecType type;
int32_t line;
Stmt* stmt;
zeek::detail::Stmt* stmt;
const char* filename;
};
@ -33,7 +35,7 @@ class DbgDisplay;
class StmtHashFn;
typedef std::map<int, DbgBreakpoint*> BPIDMapType;
typedef std::multimap<const Stmt*, DbgBreakpoint*> BPMapType;
typedef std::multimap<const zeek::detail::Stmt*, DbgBreakpoint*> BPMapType;
extern std::string current_module;
@ -104,15 +106,15 @@ private:
class StmtLocMapping {
public:
StmtLocMapping() { }
StmtLocMapping(const Location* l, Stmt* s) { loc = *l; stmt = s; }
StmtLocMapping(const Location* l, zeek::detail::Stmt* s) { loc = *l; stmt = s; }
bool StartsAfter(const StmtLocMapping* m2);
const Location& Loc() const { return loc; }
Stmt* Statement() const { return stmt; }
zeek::detail::Stmt* Statement() const { return stmt; }
protected:
Location loc;
Stmt* stmt;
zeek::detail::Stmt* stmt;
};
@ -143,8 +145,8 @@ std::vector<ParseLocationRec> parse_location_string(const std::string& s);
// Debugging hooks.
// Return true to continue execution, false to abort.
bool pre_execute_stmt(Stmt* stmt, Frame* f);
bool post_execute_stmt(Stmt* stmt, Frame* f, Val* result, stmt_flow_type* flow);
bool pre_execute_stmt(zeek::detail::Stmt* stmt, Frame* f);
bool post_execute_stmt(zeek::detail::Stmt* stmt, Frame* f, Val* result, stmt_flow_type* flow);
// Returns 1 if successful, 0 otherwise.
// If cmdfile is non-nil, it contains the location of a file of commands
@ -168,7 +170,7 @@ IntrusivePtr<Val> dbg_eval_expr(const char* expr);
int dbg_read_internal_state();
// Get line that looks like "In FnFoo(arg = val) at File:Line".
std::string get_context_description(const Stmt* stmt, const Frame* frame);
std::string get_context_description(const zeek::detail::Stmt* stmt, const Frame* frame);
extern Frame* g_dbg_locals; // variables created within debugger context