v8-bailout-reasons icon indicating copy to clipboard operation
v8-bailout-reasons copied to clipboard

'Assignment to parameter in arguments object' in strict mode

Open vsemozhetbyt opened this issue 7 years ago • 0 comments

function testFuncDeopt(namedArg) {
  const baz = arguments[0];
  namedArg = 'bar';
  function inner() { return namedArg; }
}

for (let i = 0; i < 1e3; i++) testFuncDeopt('foo');

There should be 3 conditions:

  1. arguments mention (arguments, arguments[i], arguments.length).
  2. Named parameter leaking in a lower scope.
  3. Named parameter reassignment (it should be reassigned in the parent scope; reassignment in the lower scope does not cause deopt).

vsemozhetbyt avatar Feb 26 '17 23:02 vsemozhetbyt