Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Unified Diff: src/rewriter.cc

Issue 9969146: Fix rewriter to not treat throw as an expression. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2054.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/rewriter.cc
diff --git a/src/rewriter.cc b/src/rewriter.cc
index 55f93ee0d7165e40d65852671f7d92a4e0c99b47..e58ddb417e267763599dbf78dbc3c0f9f97ac0b4 100644
--- a/src/rewriter.cc
+++ b/src/rewriter.cc
@@ -111,7 +111,7 @@ void Processor::VisitBlock(Block* node) {
void Processor::VisitExpressionStatement(ExpressionStatement* node) {
// Rewrite : <x>; -> .result = <x>;
- if (!is_set_) {
+ if (!is_set_ && !node->expression()->IsThrow()) {
node->set_expression(SetResult(node->expression()));
if (!in_try_) is_set_ = true;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2054.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698