Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vsemozhetbyt opened this issue Feb 26, 2017 · 0 comments
Open

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

vsemozhetbyt opened this issue Feb 26, 2017 · 0 comments

Comments

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Feb 26, 2017

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant