Comment #1 on issue 1924 by [email protected]: Parse error with labelled statements
http://code.google.com/p/v8/issues/detail?id=1924

Thanks for the report.  We have a buggy optimization in the parser.

Here's the story: for a labeled 'if', we treat the arms as if they were labeled. The test cases become internally:

    if (0) a: break a;
    if (0) b: { break b; } else b: { }
    if (0) c: break c; else c: { }

And we have an optimization that kicks in where we replace "x: break x" with an empty statement. This optimization has a bug, it does not consume any following semicolon:

    if (0) { } ;
    if (0) b: { break b; } else b: { }
    if (0) { } ; else c: { }

Anyone want to take a stab at fixing this?

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to