[js] Handle functions with rest parameters in isObservableArgumentSlot.

This commit is contained in:
Fedor 2020-04-12 13:03:19 +03:00
parent 64db46075a
commit 5897468de2
1 changed files with 1 additions and 1 deletions

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;