[js] Handle functions with rest parameters in isObservableArgumentSlot.

This commit is contained in:
Jan de Mooij 2020-04-08 08:29:03 +02:00 committed by Roy Tam
commit 95db678f71

View file

@ -487,7 +487,7 @@ class CompileInfo
// Function.arguments can be used to access all arguments in non-strict
// scripts, so we can't optimize out any arguments.
if ((hasArguments() || !script()->strict()) &&
if ((mayReadFrameArgsDirectly_ || !script()->strict()) &&
firstArgSlot() <= slot && slot - firstArgSlot() < nargs())
{
return true;