Redo r19140 with better efficiency.
authormarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 6 Feb 2014 13:12:10 +0000 (13:12 +0000)
committermarja@chromium.org <marja@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 6 Feb 2014 13:12:10 +0000 (13:12 +0000)
commit42ea494cd67a3abde36fc946beb3c23f7f5c520d
tree935b3cff754cca93fba0c3258abbc5877491b965
parent43c0a419ed922a0e0399731d34824f762e5cd8e4
Redo r19140 with better efficiency.

Still relevant parts of the original commit message:

Unify paren handling in Parser and PreParser.

It is only needed in (Pre)Parser::ParseExpressionOrLabelledStatement for not
recognizing parenthesized identifiers as labels and in
(Pre)Parser::ParseSourceElements for not recognizing a parenthesized string as
directive prologue.

Parser Expressions don't keep track of whether they're parenthesized, so
PreParser Expressions shouldn't either.

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

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

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