mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
streamlining of some script optimization APIs
This commit is contained in:
parent
f7b739a47d
commit
896238c173
3 changed files with 13 additions and 12 deletions
|
@ -635,7 +635,7 @@ bool ProfileFuncs::GetCallSideEffects(const NameExpr* n, IDSet& non_local_ids, T
|
|||
|
||||
auto func = fv->AsFunc();
|
||||
if ( func->GetKind() == Func::BUILTIN_FUNC ) {
|
||||
if ( ! has_no_script_side_effects(func->Name()) )
|
||||
if ( has_script_side_effects(func->Name()) )
|
||||
is_unknown = true;
|
||||
return true;
|
||||
}
|
||||
|
@ -1168,7 +1168,7 @@ bool ProfileFuncs::DefinitelyHasNoSideEffects(const ExprPtr& e) const {
|
|||
return false;
|
||||
|
||||
for ( auto& b : pf->BiFGlobals() )
|
||||
if ( ! has_no_script_side_effects(b->Name()) )
|
||||
if ( has_script_side_effects(b->Name()) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
@ -1259,7 +1259,7 @@ bool ProfileFuncs::AssessSideEffects(const ProfileFunc* pf, IDSet& non_local_ids
|
|||
}
|
||||
|
||||
for ( auto& b : pf->BiFGlobals() )
|
||||
if ( ! has_no_script_side_effects(b->Name()) ) {
|
||||
if ( has_script_side_effects(b->Name()) ) {
|
||||
is_unknown = true;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue