Skip to content

'Assignment to parameter in arguments object' in strict mode #15

Open
@vsemozhetbyt

Description

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions