John Messerly
a5ee0a435e
remove obsolete UninferredClosure type
...
fixes https://github.com/dart-lang/dev_compiler/issues/290
R=vsm@google.com
Review URL: https://codereview.chromium.org/1627503002 .
2016-01-25 16:08:31 -08:00
Brian Slesinsky
ccf3870ffc
final fields shouldn't be dependencies of const variables
...
(They are only dependencies of const constructors.)
This was causing bogus error messages to appear
when a const expression mistakenly references
a final field.
BUG=https://github.com/dart-lang/sdk/issues/25526
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1620963003 .
2016-01-25 15:53:41 -08:00
Bob Nystrom
fdb1c0ff58
Update link to super call guideline.
...
Fixes https://github.com/dart-lang/dev_compiler/issues/375 .
R=jmesserly@google.com
Review URL: https://codereview.chromium.org/1636573003 .
2016-01-25 15:29:03 -08:00
Brian Wilkerson
5a07d5c559
Add support for tasks to determine whether they are appropriate for a given target
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1633823002 .
2016-01-25 12:28:41 -08:00
Konstantin Shcheglov
013f0066ff
Include explicit constructors and static methods into UnlinkedPublicName
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1619253003 .
2016-01-25 09:27:24 -08:00
Brian Wilkerson
032aa11711
Add minimal yaml support to the engine
...
R=paulberry@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1622313003 .
2016-01-25 09:00:56 -08:00
Paul Berry
e97db5219c
Store the result of type inference in summaries.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1624853002 .
2016-01-25 08:04:50 -05:00
Florian Loitsch
5cb3da473b
Update messages, and fix typing in test.
...
Review URL: https://codereview.chromium.org/1625213003 .
2016-01-25 13:41:03 +01:00
Florian Loitsch
c849a62744
Generate dart2js and analyzer files for shared messages.
...
R=brianwilkerson@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org/1582903003 .
2016-01-25 13:08:40 +01:00
Konstantin Shcheglov
205a2a9c28
Don't add sources to DartSdk contexts.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1625273003 .
2016-01-24 15:49:18 -08:00
Paul Berry
201e980fd2
Rework recent changes to LineInfo to be backward compatible.
...
Commit 1ecd06d39c introduced a new getter
to the LineInfo class, breaking clients such as linter that use
LineInfo in an `implements` clause.
This CL reworks the change to be backward compatible. It may be
reverted once we are ready to roll to a new major version of analyzer.
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org/1625783002 .
2016-01-23 17:33:20 -05:00
Bob Nystrom
60ad9a8585
Don't include node in downcast error message.
...
The error itself has the node's location, and putting it in the
message can be ugly if the relevant node is a particularly long one.
Fixes https://github.com/dart-lang/dev_compiler/issues/377 .
R=brianwilkerson@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1622763002 .
2016-01-22 16:53:17 -08:00
keertip
946ae8f807
set LibraryElement documentation to docs of first directive in CU
...
BUG=
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1620203006 .
2016-01-22 16:13:19 -08:00
Konstantin Shcheglov
0025a8383e
Copy 'ConstructorName.staticElement' in ConstantAstCloner.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1625473004 .
2016-01-22 15:19:06 -08:00
Brian Wilkerson
1ecd06d39c
Add a count of total lines to status performance page
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1622713002 .
2016-01-22 14:37:29 -08:00
Paul Berry
f1d7130d27
Fix resynthesis of abstract classes and methods.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1625633002 .
2016-01-22 17:05:45 -05:00
John Messerly
9a4b1c36ce
fixes #25482 , flatten futures in strong mode so Future.then works
...
Also fixes https://github.com/dart-lang/dev_compiler/issues/228
A few tweaks were made to the propagatedType inference for Future.then:
* only record type if better than static type
* only go down this path when strong mode is off
also renames tests: test_pseudoGeneric to test_genericMethod.
R=brianwilkerson@google.com , vsm@google.com
Review URL: https://codereview.chromium.org/1609093003 .
2016-01-22 13:29:58 -08:00
Paul Berry
52386076f5
Drop implicit types from summaries.
...
Previously, implicit types were serialized in the summary as
references to `dynamic`. Now, we simply omit the types from the
summary and the dynamic type is inferred at resynthesis time.
This should reduce the summary size and simplify the implementation of
inferred types.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1622673002 .
2016-01-22 14:57:33 -05:00
Paul Berry
d1f3290c38
Use the explicit string 'void' to refer to void in summaries.
...
Previously we used a null EntityRef as a special case to mean "void".
This saved a tiny amount of space in the summary file, but it's not
worth it because (a) it will complicate some error handling scenarios,
and (b) it would be more worthwhile to use a null EntityRef to
represent implicit types. Both (a) and (b) will be addressed in
future CLs.
This CL changes "void" so that it's serialized as though it were
defined in the defining compilation unit of each library.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1625543002 .
2016-01-22 13:26:35 -05:00
Paul Berry
ef3935b590
Use the explicit string 'dynamic' to refer to dynamic in summaries.
...
Previously we used reference 0 as a special case to mean "dynamic".
This saved a tiny amount of space in the summary file, but it's not
worth it because it will complicate some error handling scenarios
(which will be addressed in future CLs).
This CL changes "dynamic" so that it's serialized as though it were
defined in the defining compilation unit of each library.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1621763002 .
2016-01-22 12:57:01 -05:00
Paul Berry
daa7a4ee32
Add a test of summaries that uses strong mode.
...
This will be expanded once we start storing inferred types in
summaries.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1615073007 .
2016-01-21 20:13:48 -05:00
Paul Berry
dd209aa19c
Rename TypeRef to EntityRef.
...
Now that we're storing constants in the summary, the we can have
legitimate references to things other than types.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1619913005 .
2016-01-21 17:53:59 -05:00
Konstantin Shcheglov
068b886543
Disable incremental resolution for constructor parameter names changes.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org/1620453002 .
2016-01-21 14:33:42 -08:00
Konstantin Shcheglov
b78decfa8f
Issue 25522. Insert a synthetic '>' for incomplete type arguments.
...
If we don't do this and insert 'f' instead, later when we attempt to
search 'f' by its offset we find the type instead of the identifier 'f'.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25522
Review URL: https://codereview.chromium.org/1615963003 .
2016-01-21 13:03:24 -08:00
Paul Berry
5e27219e9a
Modify summary codegen so that builder getters return builders.
...
This should allow more flexibility in the code that creates summaries,
since it will be possible to things like:
FooBuilder foo = new FooBuilder(bar: new BarBuilder);
foo.bar.baz = ...;
(Previously this would have been disallowed because foo.bar would have
returned a `Foo` rather than a `FooBuilder`, and the `Foo` class doesn't
have a setter for `baz`).
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1606283003 .
2016-01-21 11:26:53 -08:00
Konstantin Shcheglov
b0704262d9
Generate documentation for enumeration values.
...
I missed it previous time, now noticed that format.dart does not change
when I update the idl.dart file constant operations.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1617123002 .
2016-01-21 10:59:49 -08:00
Konstantin Shcheglov
709cbcd76c
Add named arguments support into constant ASTs.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1616023002 .
2016-01-21 10:25:44 -08:00
Konstantin Shcheglov
2d47247b73
Serialize long integers as unsigned 32-bit pieces.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1612863002 .
2016-01-21 08:26:01 -08:00
Konstantin Shcheglov
6794b47c38
Use Uint32 for int in IDL.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1615453002 .
2016-01-20 14:40:44 -08:00
Konstantin Shcheglov
0a495243c6
Validate that int values that we write to summaries are >= 0.
...
Also make tweaks for TestTypeProvider to ensure that this is true.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1605763007 .
2016-01-20 13:38:10 -08:00
Konstantin Shcheglov
e53f7e7a88
Add support for Uint32 fields and lists in Flat Buffers.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1612533002 .
2016-01-20 09:48:55 -08:00
Konstantin Shcheglov
203e16919a
Issue 25515. Don't incrementally resolve if a constructor initializer is changed.
...
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/25515
Review URL: https://codereview.chromium.org/1606103003 .
2016-01-20 08:49:29 -08:00
Konstantin Shcheglov
23e9fbcf30
Issue 25514. Harden parents validation in incremental resolver.
...
R=brianwilkerson@google.com , skybrian@google.com
BUG= https://github.com/dart-lang/sdk/issues/25514
Review URL: https://codereview.chromium.org/1605263002 .
2016-01-20 08:02:07 -08:00
Paul Berry
c6dd4a3967
Add propagated types to summary files.
...
Note: the prelinker doesn't support type propagation, since type
propagation may require looking at files beyond direct imports and the
transitive closure of exports. However, to pave the way for a future
implementation of a full linker, we still maintain the distinction
between linked and unlinked data. The unlinked data for a propagated
type is simply a unique "slot id" for each type in the compilation
unit which may be propagated. The linked data is the propagated type
to fill into each slot, if any.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1610043002 .
2016-01-20 06:36:04 -08:00
Paul Berry
738b835b0b
Split _LibrarySerializer into two classes.
...
The new class, _CompilationUnitSerializer, is responsible for
serializing a single compilation unit. In a future CL, this will allow
us to serialize all the compilation units for a given library in phases,
retaining state information in each of the _CompilationUnitSerializers.
Also, this fixes a previously undiscovered bug where we were trying to
use the same reference index to represent unresolved references across
compilation units; the correct behavior is for each compilation unit to
have its own index for unresolved references.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1601973006 .
2016-01-19 21:09:53 -08:00
Paul Berry
1db9d760fc
Rename UnlinkedTypeRef to TypeRef.
...
This data structure is going to be re-used in the "linked" section of
summaries to refer to propagated and inferred types.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1610003002 .
2016-01-19 18:52:05 -08:00
Konstantin Shcheglov
633b09698d
Enable most of the constant AST serialization for AST-based summaries.
...
Class member references - constructors (both ambigue and not) and static
methods.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1606113002 .
2016-01-19 16:14:59 -08:00
John Messerly
8aa3df862b
remove unused method in ElementResolver
...
I forgot to delete this in a previous CL
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1606043003 .
2016-01-19 15:54:53 -08:00
Konstantin Shcheglov
07f8831bc2
Serialize constant initializers.
...
No implementation for element references in this CL.
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1602203004 .
2016-01-19 13:42:51 -08:00
Paul Berry
cbe4248f4e
Fix summarization of trailing dynamic type arguments.
...
Serialization code now matches the comments in the IDL, which say that
trailing `dynamic` type arguments (e.g. `Map<int, dynamic>`) are omitted
from the summary.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1602263002 .
2016-01-19 13:34:41 -08:00
Paul Berry
1cbf8cfd5f
Introduce code for computing an unlinked summary directly from an AST.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1602883003 .
2016-01-19 10:25:49 -08:00
Brian Wilkerson
c2f5b876c7
Improve failure mode when there is no SDK (issue 25528)
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1605923005 .
2016-01-19 10:16:55 -08:00
Paul Berry
832512a2d0
Properly resynthesize field formal parameter elements.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1603643007 .
2016-01-19 10:15:12 -08:00
John Messerly
f82b8ae978
strong_mode.dart: remove extra asserts and throw
...
this was an old TODO we discussed a while back
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1596733002 .
2016-01-19 09:18:03 -08:00
Brian Wilkerson
21ecb14548
Clean-up imports
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1602803002 .
2016-01-18 15:42:16 -08:00
Brian Wilkerson
539f0dff4a
Move AST implementation out of generated
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1595243003 .
2016-01-18 13:02:12 -08:00
Brian Wilkerson
6f56368747
Create a public interface for AST nodes and rename the implementation classes
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1594313002 .
2016-01-18 09:53:40 -08:00
Konstantin Shcheglov
37c2eca20d
Prepare for chaining resynthesizers from AC to SDK AC.
...
AboutToComputeResultHelper for each AnalysisContext should be set
externally, because analysis engine does not know where summaries are
stored.
R=brianwilkerson@google.com , paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1591483002 .
2016-01-17 09:25:24 -08:00
Paul Berry
2f99679042
Don't include implicit initializing formal types in summaries.
...
These can be easily inferred at resynthesis time.
R=scheglov@google.com
Review URL: https://codereview.chromium.org/1597893003 .
2016-01-17 09:12:07 -08:00
Konstantin Shcheglov
028254cea1
Generate code UnlinkedConst / UnlinkedConstOperation.
...
R=paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/1596703002 .
2016-01-17 08:58:35 -08:00