Improve type checking of records, addresses BIT-1159.

This commit is contained in:
Jon Siwek 2014-03-20 13:54:26 -05:00
parent 0f3ed1a553
commit b1fd161274
13 changed files with 118 additions and 58 deletions

View file

@ -753,7 +753,7 @@ protected:
class RecordConstructorExpr : public UnaryExpr {
public:
RecordConstructorExpr(ListExpr* constructor_list, BroType* arg_type = 0);
RecordConstructorExpr(ListExpr* constructor_list);
~RecordConstructorExpr();
protected:
@ -766,8 +766,6 @@ protected:
void ExprDescribe(ODesc* d) const;
DECLARE_SERIAL(RecordConstructorExpr);
RecordType* ctor_type; // type inferred from the ctor expression list args
};
class TableConstructorExpr : public UnaryExpr {
@ -878,6 +876,7 @@ protected:
friend class Expr;
RecordCoerceExpr() { map = 0; }
Val* InitVal(const BroType* t, Val* aggr) const;
Val* Fold(Val* v) const;
DECLARE_SERIAL(RecordCoerceExpr);