Konstantin Shcheglov
787e9fcf7f
Reanalyze after creating a referenced part.
...
We need to finish linking CompilationUnitElement(s) to LibraryElement(s)
even for not existing sources. Otherwise we get NPE later and leave
model in the ERROR state.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1168743002
2015-06-05 11:29:04 -07:00
Brian Wilkerson
ba4523df1a
Add correct test for issue 23523
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1166503004
2015-06-05 09:20:54 -07:00
Konstantin Shcheglov
1c1497ff98
Another tweak for displaying performance.
...
1. It is still interesting to see performance tags, even with the next task model.
2. Factor out "WorkOrder.moveNext" as a separate performance tag, something like "intertask" for new tasks.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1161183004
2015-06-05 09:19:28 -07:00
Harry Terkelsen
fcd407b0cf
Revert "Support Package Resolution Configuration files."
...
This reverts commit 36c29d05bc .
BUG=
Review URL: https://codereview.chromium.org//1165943005
2015-06-04 15:55:13 -07:00
Harry Terkelsen
36c29d05bc
Support Package Resolution Configuration files.
...
BUG=http://dartbug.com/23371
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1162363004
2015-06-04 15:15:09 -07:00
Dan Rubel
4224b9c049
fix ENUM_CONSTANT suggestions
...
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1157283004
2015-06-04 18:01:06 -04:00
danrubel
d6580fd9fb
generated analysis server java client code package rename
...
This changes the generated package name to better reflect our new home
from com.google.dart.server.generated.types
to org.dartlang.analysis.server.protocol
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1164683003
2015-06-04 17:29:35 -04:00
Konstantin Shcheglov
3cbd3e2e96
Tweak ADD_PART_OF quick fix to support both new/old task models.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1165943003
2015-06-04 14:28:35 -07:00
Konstantin Shcheglov
32f4b9aca5
Only units with 'part of' and no other directives are parts.
...
Invalidate CONTAINING_LIBRARIES as needed.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//1160873004
2015-06-04 14:03:07 -07:00
Brian Wilkerson
5d2cbd5d55
Added test for issue 23523
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1166653006
2015-06-04 13:34:13 -07:00
Brian Wilkerson
56be513cf9
Add isExternal accessor to element model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1158793004
2015-06-04 12:38:31 -07:00
Konstantin Shcheglov
c1e2448928
Tweak for the new task statistics formatting.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1147043006
2015-06-04 11:49:37 -07:00
Konstantin Shcheglov
a24d84ecd9
Ensure types are resolved for combined import/export closures.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1166983005
2015-06-04 11:48:56 -07:00
Dan Rubel
4b082cb871
cleanup local reference contributor
...
BUG=
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1163973004
2015-06-04 14:18:03 -04:00
Brian Wilkerson
aec339a767
Expose timing data for the new task model in the status pages
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1169573003
2015-06-04 10:47:04 -07:00
Konstantin Shcheglov
a9632f3bab
Fix for DeclarationResolver.
...
It's not the main problem we observe during pkg/analysis_server/test/operation/operation_test, but I still saw it.
The actual fix is removing "unary-".
The other change is just for performance.
It is much cheaper to compare int(s) than to compute (for methods) 'displayName'.
Maybe we should go as far as removing the name check altogether and use just element kind.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1149083007
2015-06-04 10:41:19 -07:00
Dan Rubel
ab5371e9b7
analysis server performance measurement driver first cut
...
* reads instrumentation file (log file support later)
* tracks initial analysis elapse time
* skeleton structure for adding more operations and tracking
BUG=
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1163713005
2015-06-04 10:11:59 -04:00
Karl Klose
0e1673ead0
cps_ir: Clean up BuilderTask.
...
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1149423009
2015-06-04 09:07:03 +02:00
pq
2c5e890fc7
Build fixes.
...
Long tail of fixes related to moving out of `pkg_tested`.
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1162423002
2015-06-03 14:03:15 -07:00
Karl Klose
e9656e8db1
Add type arguments to lists in the code generator and make them fixed length.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1164563005
2015-06-03 13:49:02 +02:00
Karl Klose
683743c9c5
Change more JS foreign methods to JS_GET_NAME.
...
R=herhut@google.com
Review URL: https://codereview.chromium.org//1154073004
2015-06-03 11:41:46 +02:00
Konstantin Shcheglov
b35d54a8b7
Decide if unit without directives is a part or a library.
...
1. When there is a library containing it while we are parsing a part.
2. When a part was parsed, but then we found a library containing it.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1167733004
2015-06-02 16:01:01 -07:00
Konstantin Shcheglov
a567814119
Replace 'Element.node' with 'Element.computeNode()'.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1164823003
2015-06-02 13:25:04 -07:00
Konstantin Shcheglov
958638ca20
Record SourceKind.UNKNOWN for not existing sources.
...
So, they are not returned as library sources.
This fixes one of the Quick Fix tests.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1167773002
2015-06-02 13:18:56 -07:00
Konstantin Shcheglov
2888728de0
Remove an unused local variable in the test.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org//1155613010
2015-06-02 13:16:52 -07:00
Konstantin Shcheglov
250992aad8
Ignore not existing parts.
...
We decided to produce an empty token streams, so empty units for them.
So, we need to have a separate check for not existing Source later.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1160543003
2015-06-02 11:09:27 -07:00
Konstantin Shcheglov
b9dbeedb54
Prepare CompilationUnitElementDelta in IncrementalCompilationUnitElementBuilder.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1155543005
2015-06-02 11:03:03 -07:00
Brian Wilkerson
d614533a9e
Fix NPE in building element model when part URI could not be resolved
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1155693004
2015-06-02 10:40:03 -07:00
Brian Wilkerson
a82c880bb1
Fix NPE when computing dependencies of enum constants
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//1156893006
2015-06-02 09:46:21 -07:00
Konstantin Shcheglov
8e439849b3
Issue 23573. Catch exception during indexing.
...
R=paulberry@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23573
Review URL: https://codereview.chromium.org//1168473003
2015-06-02 09:40:20 -07:00
Brian Wilkerson
06a3fd1984
Fix more tests for the new task model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1159623013
2015-06-02 09:06:53 -07:00
Johnni Winther
4f969bbc3b
Remove ConstantExpression.value
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1148343004
2015-06-02 15:23:16 +02:00
Asger Feldthaus
c442bf5697
dart2js cps: Do not propagate impure expressions across null receiver.
...
If the receiver is null, the arguments are not evaluated.
Example:
Dart:
var x = null;
var y = bar();
x.foo(y);
JS before:
null.foo$1(bar());
JS after:
var y = bar();
null.foo$1(y);
If the receiver is known not be null, we still propagate into the
arguments, and "pure" expressions can always propagate even if the
receiver might be null.
InvokeMethod now has a field isReceiverNotNull, which carries a bit of
static type information. Another field like this is InvokeStatic.isPure.
I intentionally chose to pass along the *least* amount of information
that is sufficient for what we need in the tree optimizations.
That CPS type propagation was not very good at proving when things are
not null, so a couple of things missing from it have been filled in.
BUG=
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//1159643005
2015-06-02 15:06:29 +02:00
Karl Klose
add53e33e7
Optimize identical based on types.
...
R=asgerf@google.com
Review URL: https://codereview.chromium.org//1080003004
2015-06-02 13:01:42 +02:00
Johnni Winther
11eab3a917
Fix crash in deferred_constraint_constants_test.
...
BUG=
Review URL: https://codereview.chromium.org//1167713002
2015-06-02 12:05:54 +02:00
Karl Klose
95a46fb177
Adjust cps_ir test expectations.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//1167673009
2015-06-02 11:26:26 +02:00
Johnni Winther
3250c8fd91
Add StringLengthConstantExpression
...
... and make .fromEnvironment name a ConstantExpression.
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1166723002
2015-06-02 10:52:50 +02:00
Johnni Winther
411246ccc7
Handle .fromEnvironment and incompatible constructor invocations
...
BUG=
R=karlklose@google.com
Review URL: https://codereview.chromium.org//1161823004
2015-06-02 10:44:19 +02:00
Brian Wilkerson
40e925078f
Bug fixes for the new task model
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1144393006
2015-06-01 16:42:36 -07:00
Konstantin Shcheglov
34ce430b9e
Reformat ast.dart with the current formatter.
...
Otherwise there are more changes than I'd like in the other CL.
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//1154923005
2015-06-01 15:19:23 -07:00
Konstantin Shcheglov
aad76fdcbf
Issue 23568. Fix for NPE in index when unresolved field formal parameter.
...
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23568
Review URL: https://codereview.chromium.org//1162853004
2015-06-01 15:08:33 -07:00
Konstantin Shcheglov
b9cdbace93
Issue 23545. Replace unaccessible type parameters with 'dynamic'.
...
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23545
Review URL: https://codereview.chromium.org//1147213005
2015-06-01 14:50:39 -07:00
Konstantin Shcheglov
a3a40c9ef6
Issue 11200. Quick Fix for adding required/positional parameters.
...
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=11200
Review URL: https://codereview.chromium.org//1159273004
2015-06-01 14:48:50 -07:00
Konstantin Shcheglov
be9cd1c165
Issue 23551. Fix for using type parameters of the enclosed classes in 'Create Missing Overrides' Quick Fix.
...
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23551
Review URL: https://codereview.chromium.org//1151183003
2015-06-01 14:19:33 -07:00
Paul Berry
717da6731b
Eliminate Modifier.TYPEDEF and deprecate ClassElement.isTypedef.
...
Modifier.TYPEDEF was redundant with Modifier.MIXIN_APPLICATION and
ClassElement.isTypedef was redundant with
ClassElement.isMixinApplication.
Since Modifier.TYPEDEF was private to analyzer, it has been
eliminated. Since ClassElement.isTypedef is part of the public API to
analyzer, it is retained, but with a "@deprecated" annotation.
R=scheglov@google.com
Review URL: https://codereview.chromium.org//1158193008
2015-06-01 14:17:40 -07:00
Paul Berry
62f7ac8c5d
Fix handling of nested typedefs (for real this time).
...
This is a re-fix of dartbug.com/21912, which I previously fixed
incorrectly. Previously, our approach to avoiding infinite loops when
comparing types was to maintain a set of typedefs being expanded on
the stack, and prune the comparison whenever an attempt was made to
expand a typedef that was already being expanded. However, this was
too strict, since there are legal (non-circular) types which invole
expanding a given typedef in reentrant fashion; we can't prune these
types without producing incorrect semantics. An example (from the bug
report) is the type of f in the code below:
typedef T Function2<S, T>(S z);
Function2<Function2<A, B>, Function2<B, A>> f;
The solution is to maintain the list of typedefs being expanded inside
each FunctionTypeImpl object (and InterfaceTypeImpl object) rather
than on the stack during the comparison; this allows us to distinguish
the situations where we need to prune (those having to do exclusively
with expansion of a typedef) from the situations where we shouldn't
prune (those having to do with substitution of a type parameter).
A beneficial side effect of this change is that code that interacts
with types no longer needs to worry about typedef circularities, since
the circularities will automatically be pruned while exploring the
type definitions. This simplifies the implementation of
isAssignableTo, isSubtypeOf, operator==, and hashCode. (Note,
however, that code still needs to cope with circularities in the
inheritance hierarchy).
BUG=dartbug.com/21912
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//1143003007
2015-06-01 12:45:27 -07:00
Konstantin Shcheglov
f1d4ef9164
Issue 23409. Don't set 'propagatedType' in (vs. after) 'name is Type'.
...
This fixes the corresponding 'Extract Method' issue.
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23409
Review URL: https://codereview.chromium.org//1161343002
2015-06-01 12:40:30 -07:00
Konstantin Shcheglov
c1c0354014
Issue 23239. Fix for 'Create Class' Quick Fix i case of prefixed names.
...
R=brianwilkerson@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=23239
Review URL: https://codereview.chromium.org//1161333002
2015-06-01 12:26:39 -07:00
Konstantin Shcheglov
f118546d06
Issue 23332. Don't compute overrides for static members.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23332
Review URL: https://codereview.chromium.org//1151573011
2015-06-01 10:42:22 -07:00
Konstantin Shcheglov
5b44136f2a
Issue 23389. Report error in the renamed element be invisible after rename.
...
R=brianwilkerson@google.com
BUG= https://code.google.com/p/dart/issues/detail?id=23389
Review URL: https://codereview.chromium.org//1153253004
2015-06-01 10:40:59 -07:00