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

Issue 12220011: Handle malformed types in catch-on. (Closed)

Created:
7 years, 10 months ago by Johnni Winther
Modified:
7 years, 10 months ago
Reviewers:
karlklose, ahe, ngeoffray
CC:
reviews_dartlang.org, ahe
Visibility:
Public.

Description

Handle malformed types in catch-on. BUG=http://dartbug.com/8325 Committed: https://code.google.com/p/dart/source/detail?r=18652

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebased #

Patch Set 3 : New implementation + test. #

Total comments: 14

Patch Set 4 : Rebased #

Patch Set 5 : Updated cf. comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -10 lines) Patch
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 3 4 2 chunks +27 lines, -7 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M tests/language/language.status View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/on_catch_malformed_type_test.dart View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Johnni Winther
7 years, 10 months ago (2013-02-05 09:40:22 UTC) #1
ngeoffray
LGTM! https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode4454 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4454: compiler.cancel('On with no type', Fits in one line? ...
7 years, 10 months ago (2013-02-05 09:43:46 UTC) #2
ahe
LGTM! https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode4460 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4460: stack.add(condition); Am I understanding this correctly: the specification ...
7 years, 10 months ago (2013-02-05 09:58:39 UTC) #3
karlklose
https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode4460 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4460: stack.add(condition); Shouldn't we treat any malformed type as dynamic ...
7 years, 10 months ago (2013-02-05 10:21:45 UTC) #4
Johnni Winther
PTAL The new implementation is not currently exercised since it needs https://codereview.chromium.org/12210010/. https://codereview.chromium.org/12220011/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart ...
7 years, 10 months ago (2013-02-18 14:51:43 UTC) #5
ngeoffray
LGTM https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode4477 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4477: compiler.cancel('On with no type', node: catchBlock.type); cancel -> ...
7 years, 10 months ago (2013-02-18 15:48:35 UTC) #6
Johnni Winther
7 years, 10 months ago (2013-02-19 07:08:53 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right):

https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4477:
compiler.cancel('On with no type', node: catchBlock.type);
On 2013/02/18 15:48:35, ngeoffray wrote:
> cancel -> internalError ?

Done.

https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4490: else {
On 2013/02/18 15:48:35, ngeoffray wrote:
> Move else one line above.

Done.

https://codereview.chromium.org/12220011/diff/6002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/builder.dart:4517: // In checked
mode: Throw a type error if the on-catch type is
On 2013/02/18 15:48:35, ngeoffray wrote:
> Throw -> throw

Done.

https://codereview.chromium.org/12220011/diff/6002/tests/language/language.st...
File tests/language/language.status (right):

https://codereview.chromium.org/12220011/diff/6002/tests/language/language.st...
tests/language/language.status:354: on_catch_malformed_type_test: Fail # Issue
8356
On 2013/02/18 15:48:35, ngeoffray wrote:
> Replace with # VM issue ?

Done.

https://codereview.chromium.org/12220011/diff/6002/tests/language/language_da...
File tests/language/language_dart2js.status (right):

https://codereview.chromium.org/12220011/diff/6002/tests/language/language_da...
tests/language/language_dart2js.status:202: on_catch_malformed_type_test: Fail #
Malformed types causes compile-time errors.
On 2013/02/18 15:48:35, ngeoffray wrote:
> causes -> cause

Done.

https://codereview.chromium.org/12220011/diff/6002/tests/language/on_catch_ma...
File tests/language/on_catch_malformed_type_test.dart (right):

https://codereview.chromium.org/12220011/diff/6002/tests/language/on_catch_ma...
tests/language/on_catch_malformed_type_test.dart:5: // Check that malformed
types in on-catch are handled correct, that is
On 2013/02/18 15:48:35, ngeoffray wrote:
> correct -> correctly

Done.

https://codereview.chromium.org/12220011/diff/6002/tests/language/on_catch_ma...
tests/language/on_catch_malformed_type_test.dart:11: String s = i;
On 2013/02/18 15:48:35, ngeoffray wrote:
> How about String s = 1 ?

Done.

Powered by Google App Engine
This is Rietveld 408576698