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

Issue 2502343002: Store named parameters in sorted lists instead of using maps. (Closed)

Created:
4 years, 1 month ago by asgerf
Modified:
4 years, 1 month ago
CC:
dart-kernel+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Store named parameters in sorted lists instead of using maps. FunctionType now has a List<NamedType> which must be sorted by name. Previously, named parameters were stored in a Map<String, DartType>. FunctionNode still has a List<VariableDeclaration>, but this list must now be sorted by name. BUG= R=ahe@google.com Committed: https://github.com/dart-lang/kernel/commit/0defa95239024bf36b62f59d42130037cadfa519

Patch Set 1 #

Patch Set 2 : Add testcase #

Total comments: 3

Patch Set 3 : Add sanity check and add function type to testcase #

Patch Set 4 : Remove duplicates from named parameter lists to recover from erroneous inputs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+282 lines, -68 lines) Patch
M lib/analyzer/ast_from_analyzer.dart View 1 2 3 5 chunks +31 lines, -5 lines 0 comments Download
M lib/ast.dart View 12 chunks +53 lines, -20 lines 0 comments Download
M lib/binary/ast_from_binary.dart View 2 chunks +9 lines, -7 lines 0 comments Download
M lib/binary/ast_to_binary.dart View 2 chunks +8 lines, -6 lines 0 comments Download
M lib/checks.dart View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
M lib/text/ast_to_text.dart View 2 chunks +8 lines, -4 lines 0 comments Download
M lib/transformations/treeshaker.dart View 1 chunk +3 lines, -1 line 0 comments Download
M lib/type_algebra.dart View 5 chunks +20 lines, -8 lines 0 comments Download
M lib/type_environment.dart View 1 chunk +10 lines, -5 lines 0 comments Download
M lib/type_propagation/builder.dart View 2 chunks +9 lines, -8 lines 0 comments Download
M lib/visitor.dart View 1 chunk +1 line, -0 lines 0 comments Download
M test/type_parser.dart View 5 chunks +5 lines, -4 lines 0 comments Download
A testcases/input/named_parameters.dart View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A testcases/spec-mode/named_parameters.baseline.txt View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
A testcases/strong-mode/named_parameters.baseline.txt View 1 2 1 chunk +28 lines, -0 lines 0 comments Download
A testcases/type-propagation/named_parameters.baseline.txt View 1 2 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
asgerf
4 years, 1 month ago (2016-11-16 13:08:36 UTC) #2
ahe
lgtm Consider adding a sanity check for this. https://codereview.chromium.org/2502343002/diff/20001/lib/ast.dart File lib/ast.dart (right): https://codereview.chromium.org/2502343002/diff/20001/lib/ast.dart#newcode3382 lib/ast.dart:3382: return ...
4 years, 1 month ago (2016-11-16 13:21:03 UTC) #3
asgerf
Added sanity check and expanded the testcase a bit to ensure both sanity checks can ...
4 years, 1 month ago (2016-11-16 13:38:20 UTC) #4
ahe
lgtm https://codereview.chromium.org/2502343002/diff/20001/lib/ast.dart File lib/ast.dart (right): https://codereview.chromium.org/2502343002/diff/20001/lib/ast.dart#newcode3382 lib/ast.dart:3382: return name.hashCode * 31 + type.hashCode * 37; ...
4 years, 1 month ago (2016-11-16 13:41:56 UTC) #5
asgerf
PTAL at patch #4. We have to remove duplicates to avoid the violating the sanity ...
4 years, 1 month ago (2016-11-16 14:02:52 UTC) #6
ahe
lgtm
4 years, 1 month ago (2016-11-16 14:06:52 UTC) #7
asgerf
4 years, 1 month ago (2016-11-16 14:16:30 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
0defa95239024bf36b62f59d42130037cadfa519 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698