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

Issue 2551023005: Prepare for decoupling analyzer ASTs from element model. (Closed)

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

Description

Prepare for decoupling analyzer ASTs from element model. This CL creates top level accessor functions which may be used to map from AST data structures to their corresponding elements and types, and begins using those accessor functions throughout the SDK. It also adds empty interfaces ResolutionTarget and ResolutionType, which are implemented by Element and DartType respectively. In a future CL, I will change the types stored in the AST to ResolutionTarget and ResolutionType, rather than specific element types; this will decouple the ASTs from the element model. The presence of the accessor functions will allow clients to continue accessing elements and types in a type-safe way. R=asgerf@google.com, brianwilkerson@google.com, scheglov@google.com, vsm@google.com Committed: https://github.com/dart-lang/sdk/commit/ae6fd961a1e3a5d0009b01b6a3f9c424a7b61ab5

Patch Set 1 #

Total comments: 6

Patch Set 2 : Sort imports #

Patch Set 3 : Address review comments #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+1469 lines, -364 lines) Patch
M pkg/analysis_server/lib/src/analysis_server.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/computer/computer_highlights2.dart View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/edit/edit_domain.dart View 1 2 5 chunks +18 lines, -7 lines 0 comments Download
M pkg/analysis_server/lib/src/operation/operation_analysis.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart View 1 2 4 chunks +6 lines, -3 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/local_constructor_contributor.dart View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/optype.dart View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/services/correction/assist_internal.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/correction/fix_internal.dart View 1 2 3 chunks +5 lines, -2 lines 0 comments Download
M pkg/analysis_server/lib/src/services/correction/namespace.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/index/index.dart View 1 2 3 chunks +15 lines, -4 lines 0 comments Download
M pkg/analysis_server/lib/src/services/index/index_unit.dart View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/refactoring/extract_method.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/test/analysis/update_content_test.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analysis_server/test/services/correction/assist_test.dart View 1 2 4 chunks +13 lines, -4 lines 0 comments Download
M pkg/analysis_server/test/services/correction/fix_test.dart View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M pkg/analysis_server/test/src/utilities/change_builder_dart_test.dart View 1 2 21 chunks +68 lines, -33 lines 0 comments Download
M pkg/analyzer/benchmark/errors_in_all_libraries.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
A pkg/analyzer/lib/dart/ast/resolution_base_classes.dart View 1 chunk +20 lines, -0 lines 0 comments Download
A pkg/analyzer/lib/dart/ast/resolution_map.dart View 1 2 1 chunk +318 lines, -0 lines 4 comments Download
A pkg/analyzer/lib/dart/ast/standard_resolution_map.dart View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/dart/element/element.dart View 3 chunks +4 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/dart/element/type.dart View 4 chunks +5 lines, -4 lines 0 comments Download
M pkg/analyzer/lib/src/context/context.dart View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/dart/analysis/index.dart View 1 2 2 chunks +5 lines, -1 line 0 comments Download
A pkg/analyzer/lib/src/dart/ast/resolution_map.dart View 1 2 1 chunk +352 lines, -0 lines 2 comments Download
M pkg/analyzer/lib/src/dart/constant/utilities.dart View 1 2 5 chunks +14 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/generated/error_verifier.dart View 1 2 8 chunks +16 lines, -8 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 1 2 16 chunks +32 lines, -16 lines 0 comments Download
M pkg/analyzer/lib/src/generated/static_type_analyzer.dart View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 2 6 chunks +13 lines, -5 lines 0 comments Download
M pkg/analyzer/lib/src/task/strong/checker.dart View 1 2 16 chunks +74 lines, -62 lines 0 comments Download
M pkg/analyzer/test/generated/element_resolver_test.dart View 1 2 10 chunks +21 lines, -17 lines 0 comments Download
M pkg/analyzer/test/generated/non_error_resolver_test.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analyzer/test/generated/resolver_test.dart View 1 2 19 chunks +61 lines, -29 lines 0 comments Download
M pkg/analyzer/test/generated/resolver_test_case.dart View 1 2 4 chunks +8 lines, -4 lines 0 comments Download
M pkg/analyzer/test/generated/simple_resolver_test.dart View 1 2 10 chunks +48 lines, -9 lines 0 comments Download
M pkg/analyzer/test/generated/strong_mode_test.dart View 1 2 12 chunks +17 lines, -12 lines 0 comments Download
M pkg/analyzer/test/src/context/context_test.dart View 1 2 4 chunks +6 lines, -3 lines 0 comments Download
M pkg/analyzer/test/src/dart/analysis/driver_test.dart View 1 2 6 chunks +17 lines, -6 lines 0 comments Download
M pkg/analyzer/test/src/dart/analysis/search_test.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analyzer/test/src/dart/constant/evaluation_test.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analyzer/test/src/summary/resynthesize_common.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 1 2 23 chunks +99 lines, -42 lines 0 comments Download
M pkg/analyzer/test/src/task/incremental_element_builder_test.dart View 1 2 8 chunks +29 lines, -9 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/strong_test_helper.dart View 1 2 4 chunks +9 lines, -6 lines 0 comments Download
M pkg/analyzer/test/utils.dart View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M pkg/dev_compiler/lib/src/compiler/code_generator.dart View 1 2 26 chunks +59 lines, -31 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M pkg/dev_compiler/lib/src/compiler/source_map_printer.dart View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M pkg/kernel/lib/analyzer/ast_from_analyzer.dart View 1 2 8 chunks +21 lines, -7 lines 0 comments Download

Messages

Total messages: 13 (2 generated)
Paul Berry
4 years ago (2016-12-05 16:50:57 UTC) #2
vsm
lgtm on ddc part
4 years ago (2016-12-05 17:01:46 UTC) #3
vsm
lgtm on ddc part
4 years ago (2016-12-05 17:01:48 UTC) #4
scheglov
LGTM https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/test/src/task/dart_test.dart File pkg/analyzer/test/src/task/dart_test.dart (right): https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/test/src/task/dart_test.dart#newcode36 pkg/analyzer/test/src/task/dart_test.dart:36: import 'package:analyzer/dart/ast/resolution_accessors.dart'; Not sorted.
4 years ago (2016-12-05 17:10:50 UTC) #5
Paul Berry
https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/test/src/task/dart_test.dart File pkg/analyzer/test/src/task/dart_test.dart (right): https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/test/src/task/dart_test.dart#newcode36 pkg/analyzer/test/src/task/dart_test.dart:36: import 'package:analyzer/dart/ast/resolution_accessors.dart'; On 2016/12/05 17:10:50, scheglov wrote: > Not ...
4 years ago (2016-12-05 17:50:48 UTC) #6
Brian Wilkerson
lgtm https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/lib/dart/ast/resolution_accessors.dart File pkg/analyzer/lib/dart/ast/resolution_accessors.dart (right): https://codereview.chromium.org/2551023005/diff/1/pkg/analyzer/lib/dart/ast/resolution_accessors.dart#newcode16 pkg/analyzer/lib/dart/ast/resolution_accessors.dart:16: ExecutableElement bestElementForFunctionExpressionInvocation( I am concerned about the use ...
4 years ago (2016-12-05 18:22:11 UTC) #7
asgerf
I don't see the bigger picture here, but if you want to go through with ...
4 years ago (2016-12-06 13:46:15 UTC) #8
Paul Berry
Brian, PTAL. The core changes are in the following files (all other changes are just ...
4 years ago (2016-12-07 18:06:16 UTC) #9
Brian Wilkerson
lgtm https://codereview.chromium.org/2551023005/diff/40001/pkg/analyzer/lib/dart/ast/resolution_map.dart File pkg/analyzer/lib/dart/ast/resolution_map.dart (right): https://codereview.chromium.org/2551023005/diff/40001/pkg/analyzer/lib/dart/ast/resolution_map.dart#newcode15 pkg/analyzer/lib/dart/ast/resolution_map.dart:15: class ResolutionMap { I was expecting to see ...
4 years ago (2016-12-07 18:26:20 UTC) #10
Paul Berry
https://codereview.chromium.org/2551023005/diff/40001/pkg/analyzer/lib/dart/ast/resolution_map.dart File pkg/analyzer/lib/dart/ast/resolution_map.dart (right): https://codereview.chromium.org/2551023005/diff/40001/pkg/analyzer/lib/dart/ast/resolution_map.dart#newcode15 pkg/analyzer/lib/dart/ast/resolution_map.dart:15: class ResolutionMap { On 2016/12/07 18:26:20, Brian Wilkerson wrote: ...
4 years ago (2016-12-07 18:55:02 UTC) #11
Paul Berry
4 years ago (2016-12-07 19:08:20 UTC) #13
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
ae6fd961a1e3a5d0009b01b6a3f9c424a7b61ab5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698