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

Issue 1665353002: Use ElementAnnotation as the ConstantEvaluationTarget for annotations. (Closed)

Created:
4 years, 10 months ago by Paul Berry
Modified:
4 years, 10 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use ElementAnnotation as the ConstantEvaluationTarget for annotations. Previously, we had a special class, ConstantEvaluationTarget_Annotation, for this purpose. It held on to a the AST node for the annotation. This was bad because it meant that the presence of any ConstantEvaluationTarget_Annotation referring to a given compilation unit would keep the entire compilation unit's AST in memory. Now we copy just the portions of the AST we need into ElementAnnotation, just as we do for all other constant evaluation targets. In addition to saving memory, this paves the way for supporting annotations in summaries, by making it possible to compute the constant value of an annotation without having to consult the full AST. Fixes #25285. R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/c43622e89727dd08978ab8ce208d2b863f0b07f1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+132 lines, -133 lines) Patch
M pkg/analysis_server/lib/src/status/validator.dart View 4 chunks +11 lines, -10 lines 0 comments Download
M pkg/analyzer/lib/dart/element/element.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 4 chunks +20 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/generated/constant.dart View 4 chunks +58 lines, -100 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/test/generated/constant_test.dart View 4 chunks +29 lines, -5 lines 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 4 chunks +4 lines, -13 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Paul Berry
4 years, 10 months ago (2016-02-04 22:27:15 UTC) #2
Brian Wilkerson
LGTM
4 years, 10 months ago (2016-02-04 22:37:59 UTC) #3
Paul Berry
4 years, 10 months ago (2016-02-04 23:22:46 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
c43622e89727dd08978ab8ce208d2b863f0b07f1 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698