Remove value serialization.

Note - this compiles, but you cannot run Bro anymore - it crashes
immediately with a 0-pointer access. The reason behind it is that the
required clone functionality does not work anymore.
This commit is contained in:
Johanna Amann 2019-05-09 11:52:51 -07:00
parent 9b49c7cbc6
commit 474efe9e69
78 changed files with 58 additions and 9185 deletions

View file

@ -71,9 +71,6 @@ public:
virtual unsigned int BPCount() const { return breakpoint_count; }
bool Serialize(SerialInfo* info) const;
static Stmt* Unserialize(UnserialInfo* info, BroStmtTag want = STMT_ANY);
virtual TraversalCode Traverse(TraversalCallback* cb) const = 0;
protected:
@ -83,8 +80,6 @@ protected:
void AddTag(ODesc* d) const;
void DescribeDone(ODesc* d) const;
DECLARE_ABSTRACT_SERIAL(Stmt);
BroStmtTag tag;
int breakpoint_count; // how many breakpoints on this statement
@ -111,8 +106,6 @@ protected:
void Describe(ODesc* d) const override;
void PrintVals(ODesc* d, val_list* vals, int offset) const;
DECLARE_ABSTRACT_SERIAL(ExprListStmt);
ListExpr* l;
};
@ -125,8 +118,6 @@ protected:
PrintStmt() {}
Val* DoExec(val_list* vals, stmt_flow_type& flow) const override;
DECLARE_SERIAL(PrintStmt);
};
class ExprStmt : public Stmt {
@ -151,8 +142,6 @@ protected:
int IsPure() const override;
DECLARE_SERIAL(ExprStmt);
Expr* e;
};
@ -175,8 +164,6 @@ protected:
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
int IsPure() const override;
DECLARE_SERIAL(IfStmt);
Stmt* s1;
Stmt* s2;
};
@ -197,17 +184,12 @@ public:
void Describe(ODesc* d) const override;
bool Serialize(SerialInfo* info) const;
static Case* Unserialize(UnserialInfo* info);
TraversalCode Traverse(TraversalCallback* cb) const;
protected:
friend class Stmt;
Case() { expr_cases = 0; type_cases = 0; s = 0; }
DECLARE_SERIAL(Case);
ListExpr* expr_cases;
id_list* type_cases;
Stmt* s;
@ -234,8 +216,6 @@ protected:
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
int IsPure() const override;
DECLARE_SERIAL(SwitchStmt);
// Initialize composite hash and case label map.
void Init();
@ -274,8 +254,6 @@ public:
protected:
friend class Stmt;
AddStmt() {}
DECLARE_SERIAL(AddStmt);
};
class DelStmt : public ExprStmt {
@ -290,8 +268,6 @@ public:
protected:
friend class Stmt;
DelStmt() {}
DECLARE_SERIAL(DelStmt);
};
class EventStmt : public ExprStmt {
@ -306,8 +282,6 @@ protected:
friend class Stmt;
EventStmt() { event_expr = 0; }
DECLARE_SERIAL(EventStmt);
EventExpr* event_expr;
};
@ -331,8 +305,6 @@ protected:
Val* Exec(Frame* f, stmt_flow_type& flow) const override;
DECLARE_SERIAL(WhileStmt);
Expr* loop_condition;
Stmt* body;
};
@ -362,8 +334,6 @@ protected:
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const override;
DECLARE_SERIAL(ForStmt);
id_list* loop_vars;
Stmt* body;
// Stores the value variable being used for a key value for loop.
@ -383,7 +353,6 @@ public:
TraversalCode Traverse(TraversalCallback* cb) const override;
protected:
DECLARE_SERIAL(NextStmt);
};
class BreakStmt : public Stmt {
@ -398,7 +367,6 @@ public:
TraversalCode Traverse(TraversalCallback* cb) const override;
protected:
DECLARE_SERIAL(BreakStmt);
};
class FallthroughStmt : public Stmt {
@ -413,7 +381,6 @@ public:
TraversalCode Traverse(TraversalCallback* cb) const override;
protected:
DECLARE_SERIAL(FallthroughStmt);
};
class ReturnStmt : public ExprStmt {
@ -427,8 +394,6 @@ public:
protected:
friend class Stmt;
ReturnStmt() {}
DECLARE_SERIAL(ReturnStmt);
};
class StmtList : public Stmt {
@ -448,8 +413,6 @@ public:
protected:
int IsPure() const override;
DECLARE_SERIAL(StmtList);
stmt_list stmts;
};
@ -467,9 +430,6 @@ public:
// bool IsTopmost() { return topmost; }
protected:
DECLARE_SERIAL(EventBodyList);
bool topmost;
};
@ -496,8 +456,6 @@ protected:
friend class Stmt;
InitStmt() { inits = 0; }
DECLARE_SERIAL(InitStmt);
id_list* inits;
};
@ -511,9 +469,6 @@ public:
void Describe(ODesc* d) const override;
TraversalCode Traverse(TraversalCallback* cb) const override;
protected:
DECLARE_SERIAL(NullStmt);
};
class WhenStmt : public Stmt {
@ -537,8 +492,6 @@ public:
protected:
WhenStmt() { cond = 0; s1 = s2 = 0; timeout = 0; is_return = 0; }
DECLARE_SERIAL(WhenStmt);
Expr* cond;
Stmt* s1;
Stmt* s2;