(Pre)Parser: Simplify NewExpression handling (fixed).
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Feb 2014 15:40:51 +0000 (15:40 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Feb 2014 15:40:51 +0000 (15:40 +0000)
commit73c4a61848f190c2025b7c7a2537e52bab02bab0
treeb90273f26d18da567ac5b3e8d408a749ae1b42dc
parent429ce41f4b86b7c6a9bfe61daae10d75c875735e
(Pre)Parser: Simplify NewExpression handling (fixed).

Notes:
- We use simple recursion to keep track of how many "new" operators we have seen
  and where.
- This makes the self-baked stack class PositionStack in parser.cc unnecessary.
- Now the logic is also unified between Parser and PreParser.
- This is a fixed version of r19386.

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

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

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