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

Issue 2876533004: Add FunctionType.getNamedParameter. (Closed)

Created:
3 years, 7 months ago by Paul Berry
Modified:
3 years, 7 months ago
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add FunctionType.getNamedParameter. This functionality was duplicated both in TypeCheckingVisitor.handleFunctionCall and in the front end's TypeInferrerImpl._getCalleeFunctionType. I kept the implementation from TypeInferrerImpl._getCalleeFunctionType since it does a binary search, so it should theoretically be faster. R=kmillikin@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/06bba1e5517631d55bcf8e4d4160b5688ec476e5

Patch Set 1 #

Total comments: 2

Patch Set 2 : Extract namedParameters[pivot] into a local variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -28 lines) Patch
M pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart View 1 chunk +1 line, -15 lines 0 comments Download
M pkg/kernel/lib/ast.dart View 1 1 chunk +21 lines, -0 lines 0 comments Download
M pkg/kernel/lib/type_checker.dart View 1 chunk +7 lines, -13 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
Paul Berry
Asger, can you review the kernel changes? Konstantin, can you review the front_end changes?
3 years, 7 months ago (2017-05-10 17:59:07 UTC) #2
scheglov
LGTM https://codereview.chromium.org/2876533004/diff/1/pkg/kernel/lib/ast.dart File pkg/kernel/lib/ast.dart (right): https://codereview.chromium.org/2876533004/diff/1/pkg/kernel/lib/ast.dart#newcode4002 pkg/kernel/lib/ast.dart:4002: int comparison = name.compareTo(namedParameters[pivot].name); It should be slightly ...
3 years, 7 months ago (2017-05-10 18:03:36 UTC) #3
Paul Berry
https://codereview.chromium.org/2876533004/diff/1/pkg/kernel/lib/ast.dart File pkg/kernel/lib/ast.dart (right): https://codereview.chromium.org/2876533004/diff/1/pkg/kernel/lib/ast.dart#newcode4002 pkg/kernel/lib/ast.dart:4002: int comparison = name.compareTo(namedParameters[pivot].name); On 2017/05/10 18:03:35, scheglov wrote: ...
3 years, 7 months ago (2017-05-10 18:16:08 UTC) #4
Paul Berry
Adding kmillikin as reviewer for kernel since Asger has been out
3 years, 7 months ago (2017-05-11 12:54:23 UTC) #6
Kevin Millikin (Google)
LGTM.
3 years, 7 months ago (2017-05-11 12:57:15 UTC) #7
Paul Berry
3 years, 7 months ago (2017-05-11 13:03:43 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
06bba1e5517631d55bcf8e4d4160b5688ec476e5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698