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

Issue 1662873002: Remove some duplicate code in FunctionTypeImpl. (Closed)

Created:
4 years, 10 months ago by Bob Nystrom
Modified:
4 years, 10 months ago
Reviewers:
Paul Berry
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Remove some duplicate code in FunctionTypeImpl. I noticed it when I was in there for LUB, so I figured I'd do some spring cleaning. Changes are: - Consolidate duplicate code in namedParameterTypes, normalParameterTypes, and optionalParameterTypes into a shared _forEachParameterType() method. - Consolidate duplicate code in isSubtypeOf() and isMoreSpecificThan() into a shared _testTypeRelation() method that is parameterized over the specific relation. - Also some other small-scale changes in the relation code. R=paulberry@google.com Committed: https://github.com/dart-lang/sdk/commit/67b725986b83e37a7faa50f02c2a19b76b68d8a6

Patch Set 1 #

Total comments: 6

Patch Set 2 : Revise with feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -250 lines) Patch
M pkg/analyzer/lib/src/dart/element/type.dart View 1 6 chunks +105 lines, -250 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Bob Nystrom
4 years, 10 months ago (2016-02-03 01:43:18 UTC) #2
Paul Berry
Nice cleanup. lgtm assuming comments are addressed. https://codereview.chromium.org/1662873002/diff/1/pkg/analyzer/lib/src/dart/element/type.dart File pkg/analyzer/lib/src/dart/element/type.dart (right): https://codereview.chromium.org/1662873002/diff/1/pkg/analyzer/lib/src/dart/element/type.dart#newcode691 pkg/analyzer/lib/src/dart/element/type.dart:691: type, (t, ...
4 years, 10 months ago (2016-02-03 02:13:53 UTC) #3
Bob Nystrom
https://codereview.chromium.org/1662873002/diff/1/pkg/analyzer/lib/src/dart/element/type.dart File pkg/analyzer/lib/src/dart/element/type.dart (right): https://codereview.chromium.org/1662873002/diff/1/pkg/analyzer/lib/src/dart/element/type.dart#newcode691 pkg/analyzer/lib/src/dart/element/type.dart:691: type, (t, s) => t.isMoreSpecificThan(s, withDynamic)); On 2016/02/03 02:13:53, ...
4 years, 10 months ago (2016-02-03 20:49:49 UTC) #4
Bob Nystrom
4 years, 10 months ago (2016-02-03 20:50:09 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
67b725986b83e37a7faa50f02c2a19b76b68d8a6 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698