Refactor scope and function state tracking in (Pre)Parser.
Notes: - PreParser::Scope was a weird combination of Parser::FunctionState and Scope. Split it into two (PreParser::FunctionState and PreParser::Scope). This is necessary for unifying the Parser and the PreParser. - Scopes take care of language mode and tracking "with". - FunctionStates take care of counting material literal indexes, properties etc. and tracking generators. - PreParser::Scope::InsideWith was a hack to make a FunctionState-like object take care of tracking "with". It's now the responsibility fo PreParser::Scope and Scope. - PreParser::ScopeType is unnecessarly, there is already a ScopeType enum in v8globals.h. - Renamed scope stack variables so that they're consistent in Parser and PreParser. - Parser::FunctionState and Parser::BlockState had an unnecessary dependency to the Parser; they only need a couple of things from Parser. Broke the dependency. R=ulan@chromium.org BUG=v8:3126 LOG=N Review URL: https://codereview.chromium.org/148293011 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Showing
Please
register
or
sign in
to comment