(Pre)Parser: Move FunctionState, BlockState and Scope handling to ParserBase.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Feb 2014 16:17:55 +0000 (16:17 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 13 Feb 2014 16:17:55 +0000 (16:17 +0000)
commitcad32c1917046d515e761a8f53d84e03500ee5b3
tree1679629c831de0a6f697e19bc367ed663ec95ead
parent8f170a66e7badc4044f2d0bc19ae9611f0cd4cec
(Pre)Parser: Move FunctionState, BlockState and Scope handling to ParserBase.

Notes:
- This removes Parser::FunctionState and PreParser::FunctionState and adds
ParserBase::FunctionState etc.
- Also the scope stacks and function state stacks are moved to ParserBase.
- PreParser::FunctionState didn't add and subtract
JSFunction::kLiteralsPrefixSize (unlike Parser::FunctionState). Since the
actual value of NextMaterializedLiteralIndex is not used in the Preparser,
this change is valid.
- Traits no longer need functions like is_classic_mode(), since now there is a
 unified way of getting the information from the FunctionState / Scope.

R=ulan@chromium.org
BUG=v8:3126
LOG=N

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

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