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

Issue 1147853002: Properly handle circular references among constants in the task model. (Closed)

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

Description

Properly handle circular references among constants in the task model. Tasks may now override the getter "handlesDependencyCycles" to return true to indicate that they can deal with circular dependencies. Most tasks will not have to do this, since outside of constant evaluation circular dependencies among tasks should only be possible due to an analyzer bug. Any task that handles dependency cycles can detect that a cycle has occurred by consulting AnalysisTask.dependencyCycle inside its internalPerform() method. The ComputeConstantValueTask uses this to determine which constants are involved in the cycle. This required modifying the TaskInputBuilder classes so that if the current input can't be evaluated due to a circularity, they can continue on to evaluate other inputs. This allows the circularity to be reported on the whole strongly connected component, rather than just the firs cycle that was noticed (which would be nondeterministic). R=brianwilkerson@google.com, scheglov@google.com Committed: https://github.com/dart-lang/sdk/commit/a9982b0e0247b79ef10e6bab9847377f4c794923

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+572 lines, -131 lines) Patch
M pkg/analyzer/lib/src/generated/constant.dart View 3 chunks +32 lines, -32 lines 0 comments Download
M pkg/analyzer/lib/src/task/dart.dart View 6 chunks +32 lines, -8 lines 0 comments Download
M pkg/analyzer/lib/src/task/driver.dart View 12 chunks +70 lines, -47 lines 0 comments Download
M pkg/analyzer/lib/src/task/inputs.dart View 9 chunks +58 lines, -4 lines 0 comments Download
M pkg/analyzer/lib/task/model.dart View 5 chunks +31 lines, -0 lines 0 comments Download
M pkg/analyzer/test/src/task/dart_test.dart View 4 chunks +71 lines, -23 lines 2 comments Download
M pkg/analyzer/test/src/task/driver_test.dart View 13 chunks +63 lines, -16 lines 0 comments Download
M pkg/analyzer/test/src/task/inputs_test.dart View 16 chunks +210 lines, -0 lines 7 comments Download
M pkg/analyzer/test/src/task/test_support.dart View 1 chunk +5 lines, -1 line 2 comments Download

Messages

Total messages: 6 (1 generated)
Paul Berry
5 years, 7 months ago (2015-05-19 16:48:48 UTC) #2
Brian Wilkerson
LGTM
5 years, 7 months ago (2015-05-19 19:25:17 UTC) #3
scheglov
lgtm https://codereview.chromium.org/1147853002/diff/1/pkg/analyzer/test/src/task/dart_test.dart File pkg/analyzer/test/src/task/dart_test.dart (right): https://codereview.chromium.org/1147853002/diff/1/pkg/analyzer/test/src/task/dart_test.dart#newcode1465 pkg/analyzer/test/src/task/dart_test.dart:1465: }).variable; You could use unit.element.topLevelVariables directly. https://codereview.chromium.org/1147853002/diff/1/pkg/analyzer/test/src/task/inputs_test.dart File ...
5 years, 7 months ago (2015-05-19 19:25:42 UTC) #4
Paul Berry
https://codereview.chromium.org/1147853002/diff/1/pkg/analyzer/test/src/task/dart_test.dart File pkg/analyzer/test/src/task/dart_test.dart (right): https://codereview.chromium.org/1147853002/diff/1/pkg/analyzer/test/src/task/dart_test.dart#newcode1465 pkg/analyzer/test/src/task/dart_test.dart:1465: }).variable; On 2015/05/19 19:25:41, scheglov wrote: > You could ...
5 years, 7 months ago (2015-05-19 19:36:11 UTC) #5
Paul Berry
5 years, 7 months ago (2015-05-19 19:43:33 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a9982b0e0247b79ef10e6bab9847377f4c794923 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698