reordering of expressions to match main usage vs. script-optimization extras

This commit is contained in:
Vern Paxson 2024-04-08 18:22:05 -04:00 committed by Tim Wojtulewicz
parent 52f506b7ae
commit f557b40d14
2 changed files with 13 additions and 10 deletions

View file

@ -82,18 +82,19 @@ const char* expr_name(ExprTag t) {
"record_coerce",
"table_coerce",
"vector_coerce",
"to_any_coerce",
"from_any_coerce",
"sizeof",
"cast",
"is",
"[:]=",
"inline()",
"vec+=",
"[]=",
"$=",
"vec+=",
"to_any_coerce",
"from_any_coerce",
"from_any_vec_coerce",
"any[]",
"ZAM-builtin()",
"nop",
};

View file

@ -86,22 +86,24 @@ enum ExprTag : int {
EXPR_RECORD_COERCE,
EXPR_TABLE_COERCE,
EXPR_VECTOR_COERCE,
EXPR_TO_ANY_COERCE,
EXPR_FROM_ANY_COERCE,
EXPR_SIZE,
EXPR_CAST,
EXPR_IS,
EXPR_INDEX_SLICE_ASSIGN,
EXPR_INLINE,
// The following types of expressions are only created for
// ASTs transformed to reduced form; they aren't germane for
// ASTs produced by parsing .zeek script files.
// The following types of expressions are only created for ASTs
// transformed to reduced form; they aren't germane for ASTs produced
// by parsing .zeek script files. See script_opt/Expr.h for the
// corresponding definitions.
EXPR_INLINE,
EXPR_APPEND_TO,
EXPR_INDEX_ASSIGN,
EXPR_FIELD_LHS_ASSIGN,
EXPR_APPEND_TO,
EXPR_TO_ANY_COERCE,
EXPR_FROM_ANY_COERCE,
EXPR_FROM_ANY_VEC_COERCE,
EXPR_ANY_INDEX,
EXPR_SCRIPT_OPT_BUILTIN,
EXPR_NOP,