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

Issue 1507933002: Refactor strong mode to remove duplicate TypeRules (Closed)

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

Description

Refactor strong mode to remove duplicate TypeRules Most of this code is already in StrongTypeSystemImpl. A few helpers move there, with some moving into CodeChecker. This does not rename "rules" parameters/variables yet, but let me know if we should do that. This just moves code around. One subtle thing: TypeRules.isAssignableTo was only used in one place, in override checking, and that method just forwarded to TypeRules.isSubTypeOf. By contrast, StrongTypeSystemImpl does *not* just forward. So OverrideChecker now uses isSubtypeOf, preserving its old behavior. R=leafp@google.com Committed: https://github.com/dart-lang/sdk/commit/5e118574519d7277c725d9689b2f1a23c77b278c

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -626 lines) Patch
M pkg/analyzer/lib/src/generated/resolver.dart View 4 chunks +2 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/generated/type_system.dart View 1 5 chunks +47 lines, -14 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong/checker.dart View 1 2 3 4 28 chunks +234 lines, -48 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong/info.dart View 19 chunks +33 lines, -25 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong/rules.dart View 1 2 3 1 chunk +0 lines, -524 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/test/src/task/strong/strong_test_helper.dart View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Jennifer Messerly
5 years ago (2015-12-07 23:36:17 UTC) #4
Leaf
lgtm. Feel free to leave the DownwardsInference thing for subsequent refactoring. https://codereview.chromium.org/1507933002/diff/40001/pkg/analyzer/lib/src/task/strong/rules.dart File pkg/analyzer/lib/src/task/strong/rules.dart (right): ...
5 years ago (2015-12-08 00:24:40 UTC) #5
Jennifer Messerly
Thanks Leaf! PTAL https://codereview.chromium.org/1507933002/diff/40001/pkg/analyzer/lib/src/task/strong/rules.dart File pkg/analyzer/lib/src/task/strong/rules.dart (right): https://codereview.chromium.org/1507933002/diff/40001/pkg/analyzer/lib/src/task/strong/rules.dart#newcode17 pkg/analyzer/lib/src/task/strong/rules.dart:17: class DownwardsInference { On 2015/12/08 00:24:40, ...
5 years ago (2015-12-08 01:06:32 UTC) #6
Jennifer Messerly
https://codereview.chromium.org/1507933002/diff/60001/pkg/analyzer/lib/src/task/strong/checker.dart File pkg/analyzer/lib/src/task/strong/checker.dart (right): https://codereview.chromium.org/1507933002/diff/60001/pkg/analyzer/lib/src/task/strong/checker.dart#newcode941 pkg/analyzer/lib/src/task/strong/checker.dart:941: {cast: true}) { I could remove this as well. ...
5 years ago (2015-12-08 01:07:11 UTC) #7
Leaf
lgtm, thanks! https://codereview.chromium.org/1507933002/diff/60001/pkg/analyzer/lib/src/task/strong/checker.dart File pkg/analyzer/lib/src/task/strong/checker.dart (right): https://codereview.chromium.org/1507933002/diff/60001/pkg/analyzer/lib/src/task/strong/checker.dart#newcode941 pkg/analyzer/lib/src/task/strong/checker.dart:941: {cast: true}) { On 2015/12/08 01:07:11, John ...
5 years ago (2015-12-08 01:12:11 UTC) #8
Jennifer Messerly
5 years ago (2015-12-08 01:19:18 UTC) #10
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
5e118574519d7277c725d9689b2f1a23c77b278c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698