Factor formal argument parsing into ParserBase
authorwingo <wingo@igalia.com>
Tue, 21 Apr 2015 11:09:53 +0000 (04:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 21 Apr 2015 11:09:34 +0000 (11:09 +0000)
commit636cb4f365afe93de37685a69a9b8bfd16a9f70f
treebb5b55a6d8c4004d3582d1d4f0654a03484328db
parent0a8f8a953e85986bb0a5c21b784cfa7a9aaaf8b4
Factor formal argument parsing into ParserBase

This commit is a precursor to making lazy arrow function parsing use
similar logic to function(){} argument parsing.

Originally landed in these three CLs:

  https://codereview.chromium.org/1078093002
  https://codereview.chromium.org/1083623002
  https://codereview.chromium.org/1083953002

These were rolled out due to a performance regression on CodeLoad.  This
patchset will fix that by avoiding creation of a DuplicateFinder in the
full parser.

R=marja@chromium.org
BUG=
LOG=N

Review URL: https://codereview.chromium.org/1100713002

Cr-Commit-Position: refs/heads/master@{#27960}
15 files changed:
src/messages.js
src/parser.cc
src/parser.h
src/preparser.cc
src/preparser.h
src/scopes.cc
src/scopes.h
test/message/formal-parameters-bad-rest.js [new file with mode: 0644]
test/message/formal-parameters-bad-rest.out [new file with mode: 0644]
test/message/formal-parameters-strict-body.js [new file with mode: 0644]
test/message/formal-parameters-strict-body.out [new file with mode: 0644]
test/message/formal-parameters-trailing-comma.js [new file with mode: 0644]
test/message/formal-parameters-trailing-comma.out [new file with mode: 0644]
test/message/strict-formal-parameters.js [new file with mode: 0644]
test/message/strict-formal-parameters.out [new file with mode: 0644]