mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
UID, ..: un-inline methods to reduce header dependencies
Only 1% build time speedup, but still, it declutters the headers a bit. Before this patch: 2565.17user 141.83system 2:25.46elapsed 1860%CPU (0avgtext+0avgdata 1489076maxresident)k 72576inputs+9130920outputs (1667major+49400430minor)pagefaults 0swaps After this patch: 2537.19user 142.94system 2:26.90elapsed 1824%CPU (0avgtext+0avgdata 1434268maxresident)k 16240inputs+8887152outputs (1931major+48728888minor)pagefaults 0swaps
This commit is contained in:
parent
0db61f3094
commit
6a815b4b06
38 changed files with 348 additions and 211 deletions
11
src/ID.h
11
src/ID.h
|
@ -3,7 +3,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "Obj.h"
|
||||
#include "Type.h"
|
||||
#include "Attr.h"
|
||||
#include "Notifier.h"
|
||||
#include "TraverseTypes.h"
|
||||
|
@ -36,7 +35,7 @@ public:
|
|||
|
||||
std::string ModuleName() const;
|
||||
|
||||
void SetType(BroType* t) { Unref(type); type = t; }
|
||||
void SetType(BroType* t);
|
||||
BroType* Type() { return type; }
|
||||
const BroType* Type() const { return type; }
|
||||
|
||||
|
@ -74,7 +73,7 @@ public:
|
|||
void SetOffset(int arg_offset) { offset = arg_offset; }
|
||||
int Offset() const { return offset; }
|
||||
|
||||
bool IsRedefinable() const { return FindAttr(ATTR_REDEF) != 0; }
|
||||
bool IsRedefinable() const;
|
||||
|
||||
void SetAttrs(Attributes* attr);
|
||||
void AddAttrs(Attributes* attr);
|
||||
|
@ -82,11 +81,9 @@ public:
|
|||
void UpdateValAttrs();
|
||||
Attributes* Attrs() const { return attrs; }
|
||||
|
||||
Attr* FindAttr(attr_tag t) const
|
||||
{ return attrs ? attrs->FindAttr(t) : 0; }
|
||||
Attr* FindAttr(attr_tag t) const;
|
||||
|
||||
bool IsDeprecated() const
|
||||
{ return FindAttr(ATTR_DEPRECATED) != 0; }
|
||||
bool IsDeprecated() const;
|
||||
|
||||
void MakeDeprecated(Expr* deprecation);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue