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

Issue 1124733008: Remove const instance creation expressions from the dependency graph. (Closed)

Created:
5 years, 7 months ago by Paul Berry
Modified:
5 years, 7 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Remove const instance creation expressions from the dependency graph. Instead of treating them as separate nodes in the dependency graph, evaluate them directly in the ConstantVisitor at the time they are needed. This makes the dependency graph more uniform, since everything in it is now associated with an element. This should make it easier to adapt constant evaluation to the new task model. In order to avoid introducing regressions with this change, I had to implement proper reporting of cycles in compile-time constants. (Previously, this was unimplemented but worked correctly in most cases by luck.) Note: technically this constitutes a breaking API change, since it removes the field constantHandle and the getter evaluationResult from the InstanceCreationExpression class. I believe these members are not used outside of analyzer, so I'm leaving the analyzer version number as is. R=brianwilkerson@google.com Committed: https://code.google.com/p/dart/source/detail?r=45541

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -311 lines) Patch
M pkg/analyzer/lib/src/generated/ast.dart View 4 chunks +0 lines, -29 lines 0 comments Download
M pkg/analyzer/lib/src/generated/constant.dart View 15 chunks +62 lines, -84 lines 6 comments Download
M pkg/analyzer/lib/src/generated/error.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 4 chunks +18 lines, -22 lines 0 comments Download
M pkg/analyzer/test/generated/all_the_rest_test.dart View 37 chunks +41 lines, -148 lines 0 comments Download
M pkg/analyzer/test/generated/compile_time_error_code_test.dart View 5 chunks +50 lines, -27 lines 2 comments Download

Messages

Total messages: 5 (1 generated)
Paul Berry
5 years, 7 months ago (2015-05-05 21:00:18 UTC) #2
Brian Wilkerson
LGTM https://codereview.chromium.org/1124733008/diff/1/pkg/analyzer/lib/src/generated/constant.dart File pkg/analyzer/lib/src/generated/constant.dart (right): https://codereview.chromium.org/1124733008/diff/1/pkg/analyzer/lib/src/generated/constant.dart#newcode1220 pkg/analyzer/lib/src/generated/constant.dart:1220: CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, element, []); It would be really nice ...
5 years, 7 months ago (2015-05-05 21:25:24 UTC) #3
Paul Berry
https://codereview.chromium.org/1124733008/diff/1/pkg/analyzer/lib/src/generated/constant.dart File pkg/analyzer/lib/src/generated/constant.dart (right): https://codereview.chromium.org/1124733008/diff/1/pkg/analyzer/lib/src/generated/constant.dart#newcode1220 pkg/analyzer/lib/src/generated/constant.dart:1220: CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, element, []); On 2015/05/05 21:25:24, Brian Wilkerson wrote: ...
5 years, 7 months ago (2015-05-05 21:46:32 UTC) #4
Paul Berry
5 years, 7 months ago (2015-05-05 21:46:39 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as 45541 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698