scheglov@google.com
1ccf10f617
Some clean ups for cache partitions.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1130263002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45615 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 20:15:49 +00:00
brianwilkerson@google.com
9414515ba7
Remove CompositeResultDescriptor
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1136603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45613 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 20:00:49 +00:00
paulberry@google.com
7040257579
Store elements in the constant eval dependency graph rather than AST nodes.
...
This paves the way for constant evaluation to be integrated into the
new task model, since the new tasks for constants will use elements as
their targets.
Since the element model makes a distinction between constructor
members and constructor elements, we have to be careful to be
consistent about what kinds of elements are stored in the dependency
graph. We always store constructor elements in the dependency graph.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1129143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45611 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 19:38:37 +00:00
scheglov@google.com
1bc667b086
Flush memento objects.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1129173003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45610 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 19:36:04 +00:00
scheglov@google.com
9aeccc0d2f
Get AnalysisCache from InternalAnalysisContext.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1124113004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45609 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 19:12:42 +00:00
scheglov@google.com
11f96844dc
When invalidate because of the ERROR state, propagate its exception.
...
I have to move invalidation implementation into CacheEntry, because we need to set the "exception" field value.
Should we also move "setDependedOnResults" and make ResultData a dumb data container?
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1126793004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45608 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 19:10:27 +00:00
scheglov@google.com
4f04a6cf2e
Don't update offsets for elements of 'part' and 'part of' directives.
...
These elements are not defined in the source that references it.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1131053002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45605 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 18:34:19 +00:00
brianwilkerson@google.com
e8c5b87478
Get computeError working
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1130763003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45604 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 18:30:40 +00:00
scheglov@google.com
8152e8c970
Use AbstractContextTest for AnalysisContextImplTest.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1124053003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45599 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 16:58:14 +00:00
scheglov@google.com
a3366361de
Cache flushing implementation for the task model.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1133513003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45597 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 15:50:13 +00:00
brianwilkerson@google.com
2a1657d467
Fix methods for getting source kind
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1131853003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45596 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 15:32:41 +00:00
brianwilkerson@google.com
1124eaacd8
Rename EMPTY_ARRAY to EMPTY_LIST
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1127183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45579 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-06 23:47:59 +00:00
paulberry@google.com
dc04ae1271
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
Review URL: https://codereview.chromium.org//1124733008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45541 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 21:46:25 +00:00
scheglov@google.com
b1ae4d74c2
Use IncrementalCompilationUnitElementBuilder in BuildCompilationUnitElementTask.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1113223006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45536 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 19:31:41 +00:00
scheglov@google.com
c236100c96
Incrementally build unit member elements.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1119683004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45534 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 18:36:56 +00:00
paulberry@google.com
3d770ab87a
Create a class for evaluating const instance creation expressions.
...
Previously the methods for evaluating const instance creation
expressions were all in the ConstantValueComputer class. Moving them
to their own class allows for the possibility of evaluating them in
the ConstantVisitor, which in a future CL should allow us to avoid
making these expressions part of the const dependency graph.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1129563002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45533 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:47:35 +00:00
brianwilkerson@google.com
0305ce28e1
Compute explicit imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1124923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45531 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:09:42 +00:00
scheglov@google.com
e5f7e02484
Initial steps for the incremental elements builder.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1124553005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45528 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 14:54:13 +00:00
paulberry@google.com
fe50987b74
Move validation logic for constant evaluation into its own class.
...
This will help facilitate some refactoring of constant evaluation that
needs to be done in order to prepare it for the new task model.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1121313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45527 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 14:22:53 +00:00
paulberry@google.com
f2b84f9988
Fix constant evaluation logic for String.length.
...
Previously, we used static resolution to determine whether
String.length was being referred to, causing incorrect results in the
presence of bad type annotations. Also, we were missing a null check,
causing constant evaluation to crash if an attempt was made to take
the length of a constant that couldn't be evaluated.
BUG=dartbug.com/23383
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1124433007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45524 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 13:07:21 +00:00
scheglov@google.com
bbde73602d
Use memento in ParseDartTask.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1124703005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45509 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 20:51:12 +00:00
scheglov@google.com
1827a0715d
Use memento in ScanDartTask.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1113103003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45503 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 20:10:49 +00:00
scheglov@google.com
e54d46d2d8
Get memento objects from tasks, remember in cache and pass back to tasks.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1120313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45496 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 17:13:31 +00:00
paulberry@google.com
a924c66fc5
Add a flag to the element model to identify mixin applications.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1120623003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45495 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 17:00:34 +00:00
paulberry@google.com
7138d01444
In constant evaluation, handle final vars initialized at declaration site.
...
Previously final variables initialized at the declaration site
would simply be ignored, causing some checked-mode compile time
errors to be missed, and causing the analyzer to produce
incorrect values for any such constants.
BUG=dartbug.com/23292
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1099953004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45494 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 16:21:54 +00:00
paulberry@google.com
34d8b562be
Make sure to visit function annotations in ElementBuilder.
...
Since r44861, ElementBuilder is responsible for creating the
ConstantInstanceCreationHandle objects associated with
InstanceCreationExpressions. Since InstanceCreationExpressions may
appear inside annotations, we must make sure the ElementBuilder visits
all annotations. Previous to this change, it didn't visit function
annotations.
BUG=dartbug.com/23354
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1125613003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45489 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 13:25:08 +00:00
scheglov@google.com
10774af094
Rename abstract_context_test.dart -> abstract_context.dart
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1125553003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45483 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-03 21:30:44 +00:00
scheglov@google.com
79aea09150
Record dependencies and invalidate results.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1121963002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45480 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-03 20:26:51 +00:00
brianwilkerson@google.com
bfbaadca44
More fixes to the new analysis context implementation
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1127483002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45479 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-03 15:06:06 +00:00
scheglov@google.com
f92f340ab8
Remove AnalysisContext.refactoringUnsafeSources.
...
It is not used anyway.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1113423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45474 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-01 20:36:51 +00:00
scheglov@google.com
89514d6799
Finish AnalysisContext.getLaunchableServerLibrarySources implementation.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1120973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45473 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-01 20:34:55 +00:00
scheglov@google.com
aad45934a4
Fix for computing IS_CLIENT.
...
Also start using it in AnalysisContextImpl.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1118963003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45469 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-01 16:06:12 +00:00
brianwilkerson@google.com
ac3613e2bb
Re-apply change to move to plugin package
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1094083003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45408 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-24 18:54:24 +00:00
brianwilkerson@google.com
20a2f86f6b
Re-add missed files
...
Review URL: https://codereview.chromium.org//1102473006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45386 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 22:29:37 +00:00
brianwilkerson@google.com
3d536efcfe
Revert breaking change
...
Review URL: https://codereview.chromium.org//1101213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45384 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 22:12:20 +00:00
brianwilkerson@google.com
24c853446a
Convert analyzer and analysis_server to use the plugin package
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1063153004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45382 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 20:32:35 +00:00
scheglov@google.com
a713fc0e01
Use package:test_reflective_loader instead of reflective_tests.
...
R=brianwilkerson@google.com
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=45367
Review URL: https://codereview.chromium.org//1101003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45368 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 21:16:38 +00:00
scheglov@google.com
ab423fe70e
Use package:test_reflective_loader instead of reflective_tests.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1101003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45367 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 21:12:55 +00:00
pquitslund@google.com
49d0f16a2a
Analyzer CLI removal.
...
CLI now lives in dedicated `analyzer_cli` package.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1102613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45362 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 20:32:05 +00:00
scheglov@google.com
817e9fce3b
Use ExtensionManager and EnginePlugin to configure task list.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1095013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45290 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 16:30:10 +00:00
brianwilkerson@google.com
5c5bc38ac3
Initial re-write of analysis context for the new task model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1053673008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45284 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-20 15:00:01 +00:00
brianwilkerson@google.com
9bb1c7ff18
Rename EMPTY_ARRAY to EMPTY_LIST in element model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1061993003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45212 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 15:54:10 +00:00
scheglov@google.com
1ea1b3ac49
Move LibraryUnitTarget into API.
...
We need this Target to use it in the Angular plugin.
Also increment version with the goal to publish the analyzer package and use in the Angular plugin.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//1082913007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45192 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 00:06:20 +00:00
scheglov@google.com
b1dd0f8843
Fix another false positive for not used function type alias.
...
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//1061003004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45178 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 19:45:49 +00:00
brianwilkerson@google.com
c699a9b79d
Stop generating error when ignoring function bodies (issue 23207)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1059753005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45172 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 16:11:12 +00:00
brianwilkerson@google.com
d2af892e6a
Capture annotations on enums (issue 23071)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1087223002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45167 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 14:33:39 +00:00
paulberry@google.com
0457770df5
Don't permit annotations inside variable declarations.
...
This addresses the root cause of dartbug.com/23176.
BUG=dartbug.com/23204
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1083093002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45165 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 13:28:38 +00:00
scheglov@google.com
9cdd2dd31f
Issue 23190. Type check with a function type alias is its usage.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23190
Review URL: https://codereview.chromium.org//1081233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45124 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-14 00:35:56 +00:00
scheglov@google.com
af4edb61e7
(belated) Tests for CompilationUnitElement.getElementAt().
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1081103004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45120 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 20:24:16 +00:00
jakemac@google.com
0f8841239f
expose option to not parse function bodies when calling parseCompilationUnit
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1081083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45119 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-13 20:00:48 +00:00