[js] Handle functions with rest parameters in isObservableArgumentSlot.
parent
64db46075a
commit
5897468de2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue