From dd05beff505892a5942ad2c73d411a313fd75808 Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Mon, 19 Apr 2021 16:20:22 -0700 Subject: [PATCH] fixed missing profiling for ?$ operator --- src/script_opt/ProfileFunc.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/script_opt/ProfileFunc.cc b/src/script_opt/ProfileFunc.cc index ac44f79a3b..185f2c470f 100644 --- a/src/script_opt/ProfileFunc.cc +++ b/src/script_opt/ProfileFunc.cc @@ -242,6 +242,19 @@ TraversalCode ProfileFunc::PreExpr(const Expr* e) } break; + case EXPR_HAS_FIELD: + if ( abs_rec_fields ) + { + auto f = e->AsHasFieldExpr()->Field(); + addl_hashes.push_back(std::hash{}(f)); + } + else + { + auto fn = e->AsHasFieldExpr()->FieldName(); + addl_hashes.push_back(std::hash{}(fn)); + } + break; + case EXPR_ASSIGN: { if ( e->GetOp1()->Tag() == EXPR_REF )