Make invalid break/continue statements an early syntax error.
authorlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Jan 2011 09:36:10 +0000 (09:36 +0000)
committerlrn@chromium.org <lrn@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Jan 2011 09:36:10 +0000 (09:36 +0000)
commitf09705ab9b82af99735cf7b6346f2091fae4a2dd
tree116bc96fa2512c3ea84b532ef8ac8c8e586c9d9c
parentfae90d4f3248df6fe5f5af929994582b4a99502a
Make invalid break/continue statements an early syntax error.

Previously we delayed the throwing of syntax errors until runtime, so
unreachable errors didn't get reported.
To match a change in JSC, we now stop parsing and report the error immediately.

BUG=69736
TEST=

Review URL: http://codereview.chromium.org/6355006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/parser.cc
src/parser.h
test/mjsunit/delay-syntax-error.js
test/mjsunit/regress/regress-1036894.js
test/mjsunit/regress/regress-990205.js