Reviewers: ulan,

Message:
Thanks for review! I did these changes, as discussed IRL:
- Moved Scope and Factory out of PreParserTraits (now they're PreParserScope and
PreParserFactory).
- Added a struct Type to the Traits classes and put the typedefs there.
- Clarified types by using the concrete types in all places.


https://codereview.chromium.org/135213007/diff/1/src/preparser.h
File src/preparser.h (right):

https://codereview.chromium.org/135213007/diff/1/src/preparser.h#newcode116
src/preparser.h:116: typename Traits::FunctionStateParamType*
extra_param = NULL);
On 2014/02/13 10:43:27, ulan wrote:
Maybe rename Traits::FunctionStateParamType to just Traits::Zone and
extra_param
to zone. This will make at least one case (parser) readable. For
preparser it
doesn't make sense, but it will be clear from the void typedef.

Done.

Description:
(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.

[email protected]
BUG=v8:3126
LOG=N

Please review this at https://codereview.chromium.org/135213007/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+293, -330 lines):
  src/parser.h
  src/parser.cc
  src/preparser.h
  src/preparser.cc


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to