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

Issue 1878253002: Adds support for remaining generic method syntax constructs. (Closed)

Created:
4 years, 8 months ago by eernst
Modified:
4 years, 8 months ago
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Adds support for remaining generic method syntax constructs. CL https://codereview.chromium.org/1863053003/ added support for most syntactic constructs in relation to generic methods/functions, and this one adds the missing ones: Declarations of function typed arguments with type parameters, declarations of generic local functions, and declarations of generic literal function expressions. It also adds support for `super` bounds, because they were discussed recently and may be quite useful (and it turns out to be no problem to parse them). Finally, a new test file is added to tests the additional constructs. BUG= R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/377b806bbccbc969bb11b25c17c913e6df3dc31f

Patch Set 1 #

Patch Set 2 : Added comment at a tricky point #

Total comments: 6

Patch Set 3 : Review response #

Total comments: 6

Patch Set 4 : Review 2 response #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -55 lines) Patch
M pkg/compiler/lib/src/dart_backend/backend_ast_to_frontend_ast.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/parser/element_listener.dart View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/parser/listener.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/parser/node_listener.dart View 2 chunks +2 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/parser/parser.dart View 1 2 3 12 chunks +159 lines, -38 lines 0 comments Download
M pkg/compiler/lib/src/scanner/array_based_scanner.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/tree/nodes.dart View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M tests/language/generic_functions_test.dart View 1 chunk +6 lines, -4 lines 0 comments Download
A tests/language/generic_local_functions_test.dart View 1 chunk +22 lines, -0 lines 0 comments Download
A + tests/language/generic_local_functions_test.options View 0 chunks +-1 lines, --1 lines 0 comments Download
M tests/language/generic_methods_test.dart View 1 chunk +6 lines, -4 lines 0 comments Download
M tests/language/generic_sends_test.dart View 1 chunk +5 lines, -3 lines 0 comments Download
M tests/language/language.status View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/language/language_analyzer2.status View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
eernst
Parsing remaining generic method constructs. Note the comments 'TODO(eernst): Check this, looks like an NPE ...
4 years, 8 months ago (2016-04-12 16:29:29 UTC) #2
eernst
Additional patch uploaded, with a comment at a location that looks like a bug, explaining ...
4 years, 8 months ago (2016-04-13 07:47:46 UTC) #3
Johnni Winther
https://codereview.chromium.org/1878253002/diff/20001/pkg/compiler/lib/src/parser/parser.dart File pkg/compiler/lib/src/parser/parser.dart (right): https://codereview.chromium.org/1878253002/diff/20001/pkg/compiler/lib/src/parser/parser.dart#newcode783 pkg/compiler/lib/src/parser/parser.dart:783: listener.endTypeVariable(token); Remove 'handleExtendsOrSuper' and 'handleNoExtendsNorSuper' and pass and 'extendsOrSuperToken' ...
4 years, 8 months ago (2016-04-13 11:50:19 UTC) #4
karlklose
DBC: https://codereview.chromium.org/1878253002/diff/20001/pkg/compiler/lib/src/parser/parser.dart File pkg/compiler/lib/src/parser/parser.dart (right): https://codereview.chromium.org/1878253002/diff/20001/pkg/compiler/lib/src/parser/parser.dart#newcode1855 pkg/compiler/lib/src/parser/parser.dart:1855: Token endParen = beginParen.endGroup; Consider creating an issue ...
4 years, 8 months ago (2016-04-13 12:26:55 UTC) #6
eernst
Response to review comments plus refactoring discussed IRL. Essentially, it's about checking for '<', '{', ...
4 years, 8 months ago (2016-04-13 17:08:26 UTC) #7
Johnni Winther
lgtm https://codereview.chromium.org/1878253002/diff/40001/pkg/compiler/lib/src/parser/parser.dart File pkg/compiler/lib/src/parser/parser.dart (right): https://codereview.chromium.org/1878253002/diff/40001/pkg/compiler/lib/src/parser/parser.dart#newcode2265 pkg/compiler/lib/src/parser/parser.dart:2265: Token beginToken = token; You can assert that ...
4 years, 8 months ago (2016-04-14 08:23:50 UTC) #8
eernst
Review response https://codereview.chromium.org/1878253002/diff/40001/pkg/compiler/lib/src/parser/parser.dart File pkg/compiler/lib/src/parser/parser.dart (right): https://codereview.chromium.org/1878253002/diff/40001/pkg/compiler/lib/src/parser/parser.dart#newcode2265 pkg/compiler/lib/src/parser/parser.dart:2265: Token beginToken = token; On 2016/04/14 08:23:50, ...
4 years, 8 months ago (2016-04-14 09:47:27 UTC) #9
eernst
4 years, 8 months ago (2016-04-14 13:25:56 UTC) #12
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
377b806bbccbc969bb11b25c17c913e6df3dc31f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698