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

Issue 2522143003: Create a new AstFactory class to be used by analyzer and its clients. (Closed)

Created:
4 years ago by Paul Berry
Modified:
4 years ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Create a new AstFactory class to be used by analyzer and its clients. Unlike the previous AstFactory (now called AstTestFactory), this class is not just for testing; it is intended to be able to create all analyzer AST objects used in production. Also, its methods are non-static. For now, all users of the new AstFactory access it using the final variable `astFactory` in standard_ast_factory.dart. In future CLs I intend to plumb a reference to the AstFactory through various analyzer classes so that it can be used in a dependency injection style. Also, the classes CommentType and UriValidationCodeImpl have been moved out of the AST implementation file (pkg/analyzer/lib/src/dart/ast/ast.dart) and to their own files so that the AST interface will be able to continue to use them without depending on the AST implementation. In follow-up CLs I will change the analyzer and its clients to use the AstFactory rather than the redirecting constructors in the AST interface file, and then remove those redirecting constructors. R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/f4baeb20d7b3a3a0819877af51acddc7bccd741d

Patch Set 1 #

Total comments: 17

Patch Set 2 : Address code review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1932 lines, -31 lines) Patch
M pkg/analyzer/lib/dart/ast/ast.dart View 1 1 chunk +0 lines, -22 lines 0 comments Download
A pkg/analyzer/lib/dart/ast/ast_factory.dart View 1 1 chunk +1017 lines, -0 lines 0 comments Download
A pkg/analyzer/lib/dart/ast/standard_ast_factory.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/dart/ast/ast.dart View 1 3 chunks +5 lines, -6 lines 0 comments Download
A pkg/analyzer/lib/src/dart/ast/ast_factory.dart View 1 1 chunk +896 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Paul Berry
4 years ago (2016-11-23 00:43:42 UTC) #2
Brian Wilkerson
https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/ast_factory.dart File pkg/analyzer/lib/dart/ast/ast_factory.dart (right): https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/ast_factory.dart#newcode12 pkg/analyzer/lib/dart/ast/ast_factory.dart:12: * instances of the interfaces that constitute the AST. ...
4 years ago (2016-11-23 15:58:19 UTC) #3
Paul Berry
PTAL https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/ast_factory.dart File pkg/analyzer/lib/dart/ast/ast_factory.dart (right): https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/ast_factory.dart#newcode12 pkg/analyzer/lib/dart/ast/ast_factory.dart:12: * instances of the interfaces that constitute the ...
4 years ago (2016-11-24 15:03:18 UTC) #4
Brian Wilkerson
lgtm https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart File pkg/analyzer/lib/dart/ast/standard_ast_factory.dart (right): https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart#newcode11 pkg/analyzer/lib/dart/ast/standard_ast_factory.dart:11: final AstFactory astFactory = new AstFactoryImpl(); > What's ...
4 years ago (2016-11-28 16:27:39 UTC) #5
Paul Berry
https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart File pkg/analyzer/lib/dart/ast/standard_ast_factory.dart (right): https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart#newcode11 pkg/analyzer/lib/dart/ast/standard_ast_factory.dart:11: final AstFactory astFactory = new AstFactoryImpl(); Ok, since I ...
4 years ago (2016-11-28 18:02:30 UTC) #6
Brian Wilkerson
https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart File pkg/analyzer/lib/dart/ast/standard_ast_factory.dart (right): https://codereview.chromium.org/2522143003/diff/1/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart#newcode11 pkg/analyzer/lib/dart/ast/standard_ast_factory.dart:11: final AstFactory astFactory = new AstFactoryImpl(); I would prefer ...
4 years ago (2016-11-28 18:35:48 UTC) #7
Paul Berry
4 years ago (2016-11-28 18:50:29 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
f4baeb20d7b3a3a0819877af51acddc7bccd741d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698