On 2015/01/23 20:11:39, adamk wrote:
Moving LET/CONST parsing out of ParseStatement creates some dead branches in
ParseVariableDeclarations(). I'm guessing we can just delete that code,
possibly
replacing it with a few DCHECKs.

https://codereview.chromium.org/869293002/diff/80001/src/parser.cc
File src/parser.cc (right):

https://codereview.chromium.org/869293002/diff/80001/src/parser.cc#newcode2152
src/parser.cc:2152: if (var_context == kStatement) {
I believe this code is now unreachable...

https://codereview.chromium.org/869293002/diff/80001/src/parser.cc#newcode2172
src/parser.cc:2172: if (var_context == kStatement) {
...as is this.

https://codereview.chromium.org/869293002/diff/80001/src/parser.cc#newcode2451
src/parser.cc:2451: return nullptr;
Nit: the rest of the code in this file still uses "NULL"

https://codereview.chromium.org/869293002/diff/80001/src/preparser.cc
File src/preparser.cc (right):


https://codereview.chromium.org/869293002/diff/80001/src/preparser.cc#newcode450
src/preparser.cc:450: if (var_context != kSourceElement && var_context !=
kForStatement) {
Same dead code as in parser...


https://codereview.chromium.org/869293002/diff/80001/src/preparser.cc#newcode466
src/preparser.cc:466: if (var_context != kSourceElement && var_context !=
kForStatement) {
...and here too.

Good catch. I should probably also ensure that I use those old error messages.

https://codereview.chromium.org/869293002/

--
--
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/d/optout.

Reply via email to