Parser: Refactor strict mode checks for functions
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Jun 2014 09:45:05 +0000 (09:45 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Jun 2014 09:45:05 +0000 (09:45 +0000)
commit1fd638e2843105ad82d62a83a8110ae62f6a0667
tree9ab560e06b6082d47ed7e7800d1354590a1e9bf9
parent969759fd3f9a88833aab0a8dd1755e01a73bad69
Parser: Refactor strict mode checks for functions

Moves the strict mode checks and error reporting for the function and
parameter names into a separate CheckStrictFunctionNameAndParameters()
function in ParserBase. Parsing of arrow functions will then use this
new function instead of duplicating the error code.

BUG=
R=marja@chromium.org

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

Patch from Adrián Pérez de Castro <aperez@igalia.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/parser.cc
src/parser.h
src/preparser.h