feature completeness for ZAM

This commit is contained in:
Vern Paxson 2023-06-16 16:14:15 -07:00 committed by Arne Welzel
parent 65a7e3de5f
commit ecc93606c4
5 changed files with 66 additions and 29 deletions

View file

@ -20,20 +20,6 @@ bool ZAM_error = false;
bool is_ZAM_compilable(const ProfileFunc* pf, const char** reason)
{
if ( pf->NumLambdas() > 0 )
{
if ( reason )
*reason = "use of lambda";
return false;
}
if ( pf->NumWhenStmts() > 0 )
{
if ( reason )
*reason = "use of \"when\"";
return false;
}
auto b = pf->ProfiledBody();
auto is_hook = pf->ProfiledFunc()->Flavor() == FUNC_FLAVOR_HOOK;
if ( b && ! script_is_valid(b, is_hook) )