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

Issue 11049023: [dart2js] Report an error if throw is used outside of catch expression without an argument. (Closed)

Created:
8 years, 2 months ago by Roman
Modified:
8 years, 2 months ago
Reviewers:
ahe
CC:
reviews_dartlang.org
Visibility:
Public.

Description

[dart2js] Report an error if throw is used outside of catch expression without an argument. BUG=5598 Committed: https://code.google.com/p/dart/source/detail?r=13171

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -10 lines) Patch
M lib/compiler/implementation/resolver.dart View 1 2 4 chunks +8 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/builder.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M lib/compiler/implementation/warnings.dart View 1 1 chunk +3 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2dart.status View 1 chunk +0 lines, -6 lines 0 comments Download
M tests/language/language.status View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Roman
We can hack it in dart2dart, but looks like the correct place to detect bad ...
8 years, 2 months ago (2012-10-03 09:37:46 UTC) #1
ahe
LGTM https://codereview.chromium.org/11049023/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/11049023/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3200 lib/compiler/implementation/ssa/builder.dart:3200: compiler.reportError(node, MessageKind.THROW_WITHOUT_EXPRESSION); This would be an internal error ...
8 years, 2 months ago (2012-10-03 09:57:39 UTC) #2
Roman
https://codereview.chromium.org/11049023/diff/1/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/11049023/diff/1/lib/compiler/implementation/ssa/builder.dart#newcode3200 lib/compiler/implementation/ssa/builder.dart:3200: compiler.reportError(node, MessageKind.THROW_WITHOUT_EXPRESSION); On 2012/10/03 09:57:39, ahe wrote: > This ...
8 years, 2 months ago (2012-10-03 10:07:34 UTC) #3
ahe
Still LGTM! https://codereview.chromium.org/11049023/diff/8001/lib/compiler/implementation/ssa/builder.dart File lib/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/11049023/diff/8001/lib/compiler/implementation/ssa/builder.dart#newcode3200 lib/compiler/implementation/ssa/builder.dart:3200: compiler.internalError('rethrowableException should not be null', node); I ...
8 years, 2 months ago (2012-10-03 10:25:28 UTC) #4
Roman
8 years, 2 months ago (2012-10-03 10:36:20 UTC) #5
https://codereview.chromium.org/11049023/diff/8001/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/11049023/diff/8001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/builder.dart:3200:
compiler.internalError('rethrowableException should not be null', node);
On 2012/10/03 10:25:28, ahe wrote:
> I think you should use "node: node". I plan to make this method use the {}
> syntax instead of the [] syntax.

Done.

Powered by Google App Engine
This is Rietveld 408576698