fix for ZAM inlining failing to inline function call arguments

This commit is contained in:
Vern Paxson 2023-07-13 11:48:29 -07:00
parent 6b0d595dae
commit 51eec61272

View file

@ -2363,6 +2363,10 @@ ExprPtr CallExpr::Duplicate()
ExprPtr CallExpr::Inline(Inliner* inl)
{
// First check our elements.
func = func->Inline(inl);
args = cast_intrusive<ListExpr>(args->Inline(inl));
auto new_me = inl->CheckForInlining({NewRef{}, this});
if ( ! new_me )
@ -2372,10 +2376,6 @@ ExprPtr CallExpr::Inline(Inliner* inl)
if ( new_me.get() != this )
return new_me;
// We're not inlining, but perhaps our elements should be.
func = func->Inline(inl);
args = cast_intrusive<ListExpr>(args->Inline(inl));
return ThisPtr();
}