mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
fixes for generating and evaluating RDs associate with ?$ expressions
This commit is contained in:
parent
18bb022dab
commit
5dde3adbdd
1 changed files with 12 additions and 4 deletions
|
@ -820,14 +820,18 @@ TraversalCode RD_Decorate::PreExpr(const Expr* e)
|
||||||
mgr.SetPreFromPre(lhs, a);
|
mgr.SetPreFromPre(lhs, a);
|
||||||
mgr.SetPreFromPre(rhs, a);
|
mgr.SetPreFromPre(rhs, a);
|
||||||
|
|
||||||
if ( CheckLHS(lhs, a) )
|
if ( ! rhs_aggr )
|
||||||
{
|
{
|
||||||
if ( ! rhs_aggr )
|
rhs->Traverse(this);
|
||||||
rhs->Traverse(this);
|
|
||||||
|
|
||||||
return TC_ABORTSTMT;
|
// The RHS could have established a pseudo-RD
|
||||||
|
// due to a ?$ operation.
|
||||||
|
mgr.SetPostFromPost(e, rhs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( CheckLHS(lhs, a) )
|
||||||
|
return TC_ABORTSTMT;
|
||||||
|
|
||||||
if ( rhs_aggr )
|
if ( rhs_aggr )
|
||||||
{
|
{
|
||||||
// No need to analyze the RHS.
|
// No need to analyze the RHS.
|
||||||
|
@ -987,6 +991,10 @@ TraversalCode RD_Decorate::PreExpr(const Expr* e)
|
||||||
CreateInitPostDef(field_rd, DefinitionPoint(hf),
|
CreateInitPostDef(field_rd, DefinitionPoint(hf),
|
||||||
false, 0);
|
false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't analyze r itself, since it's not expected
|
||||||
|
// to be defined here.
|
||||||
|
return TC_ABORTSTMT;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue