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

Issue 11412245: MalformedType used for all invalid type annotations. (Closed)

Created:
8 years ago by Johnni Winther
Modified:
8 years ago
Reviewers:
karlklose, ahe, ngeoffray
CC:
reviews_dartlang.org, aam-me
Visibility:
Public.

Description

MalformedType used for all invalid type annotations. Committed: https://code.google.com/p/dart/source/detail?r=15684

Patch Set 1 #

Patch Set 2 : #

Total comments: 18

Patch Set 3 : Bug fixes #

Total comments: 49

Patch Set 4 : Updated cf. comments #

Patch Set 5 : Rebased #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+474 lines, -200 lines) Patch
M sdk/lib/_internal/compiler/implementation/compile_time_constants.dart View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart View 1 2 3 4 1 chunk +1 line, -8 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/elements/elements.dart View 1 2 3 chunks +1 line, -21 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 2 3 4 4 chunks +29 lines, -3 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart View 1 chunk +4 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/resolution/members.dart View 1 2 3 4 5 chunks +134 lines, -107 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/bailout.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 2 3 4 7 chunks +48 lines, -12 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/codegen.dart View 1 2 3 8 chunks +28 lines, -6 lines 6 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 1 chunk +3 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/types.dart View 1 chunk +6 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/typechecker.dart View 1 2 3 4 10 chunks +139 lines, -21 lines 2 comments Download
M sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/universe/universe.dart View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link.dart View 1 1 chunk +1 line, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/util/link_implementation.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/warnings.dart View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 4 chunks +2 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/resolver_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M tests/language/language.status View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M tests/language/type_variable_scope2_test.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/wrong_number_type_arguments_test.dart View 1 2 3 1 chunk +33 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Johnni Winther
8 years ago (2012-11-29 15:10:09 UTC) #1
ngeoffray
LGTM! https://codereview.chromium.org/11412245/diff/3001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart File sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (right): https://codereview.chromium.org/11412245/diff/3001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart#newcode133 sdk/lib/_internal/compiler/implementation/compile_time_constants.dart:133: && element.isField()) { Maybe try to have this ...
8 years ago (2012-11-30 12:00:39 UTC) #2
ahe
Comments so far. Overall, it really looks good. https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/compiler.dart File sdk/lib/_internal/compiler/implementation/compiler.dart (right): https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/compiler.dart#newcode157 sdk/lib/_internal/compiler/implementation/compiler.dart:157: reportDiagnostic(span, ...
8 years ago (2012-11-30 15:44:06 UTC) #3
ahe
Everything but resolution/members.dart reviewed and good. https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart File sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart (right): https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart#newcode65 sdk/lib/_internal/compiler/implementation/universe/partial_type_tree.dart:65: * Returns the ...
8 years ago (2012-12-03 12:32:01 UTC) #4
ahe
LGTM! https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/resolution/members.dart File sdk/lib/_internal/compiler/implementation/resolution/members.dart (right): https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode1064 sdk/lib/_internal/compiler/implementation/resolution/members.dart:1064: // TODO(johnniwinther): Remove this case. Absolutely :-) https://codereview.chromium.org/11412245/diff/12001/sdk/lib/_internal/compiler/implementation/resolution/members.dart#newcode1069 ...
8 years ago (2012-12-03 12:45:31 UTC) #5
Johnni Winther
https://codereview.chromium.org/11412245/diff/3001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart File sdk/lib/_internal/compiler/implementation/compile_time_constants.dart (right): https://codereview.chromium.org/11412245/diff/3001/sdk/lib/_internal/compiler/implementation/compile_time_constants.dart#newcode133 sdk/lib/_internal/compiler/implementation/compile_time_constants.dart:133: && element.isField()) { On 2012/11/30 12:00:40, ngeoffray wrote: > ...
8 years ago (2012-12-04 10:07:17 UTC) #6
ngeoffray
Still LGTM https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart File sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart#newcode1616 sdk/lib/_internal/compiler/implementation/ssa/codegen.dart:1616: !identical(receiverType.kind, TypeKind.MALFORMED_TYPE)) { Is that important? If ...
8 years ago (2012-12-05 15:43:46 UTC) #7
Johnni Winther
https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart File sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart#newcode1616 sdk/lib/_internal/compiler/implementation/ssa/codegen.dart:1616: !identical(receiverType.kind, TypeKind.MALFORMED_TYPE)) { On 2012/12/05 15:43:46, ngeoffray wrote: > ...
8 years ago (2012-12-05 18:33:50 UTC) #8
ngeoffray
https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart File sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (right): https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart#newcode1616 sdk/lib/_internal/compiler/implementation/ssa/codegen.dart:1616: !identical(receiverType.kind, TypeKind.MALFORMED_TYPE)) { On 2012/12/05 18:33:51, Johnni Winther wrote: ...
8 years ago (2012-12-05 18:37:37 UTC) #9
Johnni Winther
8 years ago (2012-12-05 19:11:20 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compile...
File sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (right):

https://codereview.chromium.org/11412245/diff/12030/sdk/lib/_internal/compile...
sdk/lib/_internal/compiler/implementation/ssa/codegen.dart:1616:
!identical(receiverType.kind, TypeKind.MALFORMED_TYPE)) {
On 2012/12/05 18:37:38, ngeoffray wrote:
> On 2012/12/05 18:33:51, Johnni Winther wrote:
> > On 2012/12/05 15:43:46, ngeoffray wrote:
> > > Is that important? If it's malformed, it will say yes to any subtype
check,
> > > right? So having a TypedSelector should be fine.
> > 
> > It is to make a distinction between List<SomeMalformedType> and
> > SomeMalformedType. In the first case we actually know as much as if the type
> was
> > List<dynamic> and we should use that, whereas in the latter case we know
> > nothing.
> 
> What I'm trying to understand is whether that will lead to bad JS code being
> generated (because of tree shaking on typed selectors), or it will lead to
code
> being better optimized. If it's the latter, then I would remove the check,
since
> a malformed program is not something we care about optimizing.

It's the latter.

Powered by Google App Engine
This is Rietveld 408576698