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

Issue 1329743005: Abstract over the type system. (Closed)

Created:
5 years, 3 months ago by Leaf
Modified:
5 years, 3 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

First cut at abstracting over the type system. This factors out uses of isAssignableTo and isSubtypeOf into calls through a type system object. Currently there is only one kind of type system, which just falls over to the existing implementations. BUG= R=brianwilkerson@google.com, paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/a19bd39da8e1b79bdb0971c5487cd5b053306965

Patch Set 1 #

Total comments: 2

Patch Set 2 : Remove TypeProvider from TypeSystem #

Patch Set 3 : Add typeSystem to LibraryResolver2 #

Patch Set 4 : Assignability #

Patch Set 5 : Reformat #

Patch Set 6 : Cleanup small issues #

Total comments: 15

Patch Set 7 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1260 lines, -168 lines) Patch
M pkg/analyzer/lib/src/context/context.dart View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/generated/constant.dart View 1 2 3 4 5 chunks +20 lines, -13 lines 0 comments Download
M pkg/analyzer/lib/src/generated/engine.dart View 1 2 3 8 chunks +23 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/generated/error_verifier.dart View 1 2 3 4 28 chunks +45 lines, -34 lines 0 comments Download
M pkg/analyzer/lib/src/generated/incremental_resolver.dart View 1 2 3 4 5 chunks +16 lines, -5 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 1 2 3 4 5 6 37 chunks +441 lines, -48 lines 0 comments Download
M pkg/analyzer/lib/src/generated/static_type_analyzer.dart View 1 2 3 4 7 chunks +11 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/generated/testing/element_factory.dart View 1 2 3 4 5 6 1 chunk +34 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 2 3 4 13 chunks +33 lines, -18 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong_mode.dart View 1 1 chunk +1 line, -3 lines 0 comments Download
M pkg/analyzer/test/generated/all_the_rest_test.dart View 1 2 3 4 8 chunks +15 lines, -13 lines 0 comments Download
M pkg/analyzer/test/generated/engine_test.dart View 1 chunk +6 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/resolver_test.dart View 1 2 3 4 13 chunks +21 lines, -14 lines 0 comments Download
M pkg/analyzer/test/generated/type_system_test.dart View 1 2 3 4 5 6 6 chunks +580 lines, -9 lines 0 comments Download
M pkg/analyzer/test/src/task/strong_mode_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (1 generated)
Leaf
Hi Guys - This is not ready to submit, but I wanted to run it ...
5 years, 3 months ago (2015-09-05 01:07:23 UTC) #2
Paul Berry
Overall, lgtm. I have some concerns about how and when the TypeSystem is being created; ...
5 years, 3 months ago (2015-09-05 03:25:12 UTC) #3
Paul Berry
https://codereview.chromium.org/1329743005/diff/1/pkg/analyzer/lib/src/generated/incremental_resolver.dart File pkg/analyzer/lib/src/generated/incremental_resolver.dart (right): https://codereview.chromium.org/1329743005/diff/1/pkg/analyzer/lib/src/generated/incremental_resolver.dart#newcode853 pkg/analyzer/lib/src/generated/incremental_resolver.dart:853: * The object used to access the types from ...
5 years, 3 months ago (2015-09-05 03:25:39 UTC) #4
Brian Wilkerson
> > This version is careful to only create typeSystems in places where > > ...
5 years, 3 months ago (2015-09-05 16:02:41 UTC) #5
Leaf
OK, I've re-factored this per the previous comments, and have also added in a strong ...
5 years, 3 months ago (2015-09-15 23:01:12 UTC) #6
Brian Wilkerson
LGTM. Nits can be implemented in a later CL or just ignored. https://codereview.chromium.org/1329743005/diff/100001/pkg/analyzer/lib/src/generated/resolver.dart File pkg/analyzer/lib/src/generated/resolver.dart ...
5 years, 3 months ago (2015-09-16 14:00:45 UTC) #7
Leaf
Ok, addressed most of the nits. If you're happy enough for now, I'll go ahead ...
5 years, 3 months ago (2015-09-16 21:07:55 UTC) #8
Leaf
Committed patchset #7 (id:120001) manually as a19bd39da8e1b79bdb0971c5487cd5b053306965 (presubmit successful).
5 years, 3 months ago (2015-09-16 21:56:04 UTC) #9
Brian Wilkerson
5 years, 3 months ago (2015-09-16 22:54:51 UTC) #10
Message was sent while issue was closed.
https://codereview.chromium.org/1329743005/diff/100001/pkg/analyzer/lib/src/g...
File pkg/analyzer/lib/src/generated/resolver.dart (right):

https://codereview.chromium.org/1329743005/diff/100001/pkg/analyzer/lib/src/g...
pkg/analyzer/lib/src/generated/resolver.dart:15267: bool _isInterfaceSubtypeOf(
My personal recommendation :-) is to use doc comments for every method that
someone not familiar with the code might ever need to understand (which for me
translates to everything). I'm sure a lot of people would argue that that's
overkill, or that doc comments become stale, but I still prefer documentation
over its absence. It's your call, obviously, whether you think it's worth it in
this case.

Powered by Google App Engine
This is Rietveld 408576698