Fix rewriter to not treat throw as an expression.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 Apr 2012 13:41:05 +0000 (13:41 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 4 Apr 2012 13:41:05 +0000 (13:41 +0000)
commit47aa3254c24f8af3986bf588916b5141232f9ee6
treecab305a04d420209e13d8c55520d1d317fd428a7
parenta8ed9d6b235035788f95f02a101a25d1b171120e
Fix rewriter to not treat throw as an expression.

Now we can correctly optimize top level code that contains a throw (or
return) as it's last statement.

R=ulan@chromium.org
BUG=v8:2054
TEST=mjsunit/regress/regress-2054

Review URL: https://chromiumcodereview.appspot.com/9969146

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/rewriter.cc
test/mjsunit/regress/regress-2054.js [new file with mode: 0644]