Commit Graph

6018 Commits

Author SHA1 Message Date
Jacob MacDonald 91c9de2ac2 don't use internal throwOnWarnings option
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3010033002 .
2017-09-01 13:52:48 -07:00
Peter von der Ahé b460a25459 Store actual Reference(s) for additional exports.
R=johnniwinther@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/3009953003 .
2017-09-01 16:30:43 +02:00
Leaf Petersen 05af4fb787 Disable fuzzy arrow hints in front_end and dart2js
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3004143002 .
2017-08-31 12:17:47 -07:00
Konstantin Shcheglov 39b921ecce Transitively include outlines of all public members of Class(es).
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3004943002 .
2017-08-31 11:35:08 -07:00
Peter von der Ahé bb90bb5b30 Ensure all tests are analyzed.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3012643002 .
2017-08-31 17:10:01 +02:00
Peter von der Ahé 24ec5691d0 Don't re-export hidden members.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3004123002 .
2017-08-31 16:45:18 +02:00
Peter von der Ahé f0277b32e8 Revert "Store actual Reference(s) for additional exports."
This reverts commit 234c4a7f49.

Revert "Fix for ScopeBuilder[] - look into setters too."

This reverts commit 7924f4c42f.

Revert "Don't include BuiltinTypeBuilder(s) into additional exports."

This reverts commit e28aac09c4.

The reason for reverting is that the two follow-up commits aren't correct.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3004973002 .
2017-08-31 16:13:50 +02:00
Dan Rubel 5f5386b404 improve recovery of invalid top level abstract modifier usage
The fasta parser now gracefully degrades if the user puts 'abstract' before a top level declaration other than 'class'.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/3010713002 .
2017-08-31 07:28:42 -04:00
Peter von der Ahé 893b4d4fe9 Add missing copyright on test cases.
Also rename void-methods.dart to void_methods.dart.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3006963002 .
2017-08-31 13:09:20 +02:00
Paul Berry b8e5e03ff4 Remove ShadowVariableDeclaration.isSemiSafe.
This only existed as a temporary measure while we were discussing how
to modify the kernel format.  It has been replaced by
VariableDeclaration.formalSafety.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3009883002 .
2017-08-30 17:38:30 -04:00
Konstantin Shcheglov 37b301e21a Restructure outline shaker tests.
1. Instead of using a single lib/lib.dart, use a couple of small shared
   libraries, and special libraries for each case we want to test.

2. Give tests meaningful structured names, with "source_*" tests
   testing that we take into account referenced *from* somewhere.
   And "target_*" tests for testing that we include referenced entities.
   And "transitive_*" tests for including complete transitive closure
   of referenced entities.

We don't yet include full transitive closure, this CL is just for
tests and results produced at the moment. Implementation and test
fixes will follow.

We also don't yet take exports into account.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3011663002 .
2017-08-30 13:33:27 -07:00
Paul Berry a09896216d Add another runtime check test case.
This test case verifies correct generation of abstract forwarding
stubs.  Since analyzer doesn't contain logic for generating abstract
forwarding stubs, the test is in "runtime_checks_new" so that it won't
be checked against analyzer.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3009873002 .
2017-08-30 16:23:08 -04:00
Paul Berry a5b3cbac13 Rename front end shadow classes from "Kernel..." to "Shadow...".
This should reduce confusion, since these classes are specifically
*not* part of kernel.  I also went ahead and renamed a few classes
that aren't shadow classes but are related to the shadow classes,
e.g. KernelTypeInferrer -> ShadowTypeInferrer.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004923002 .
2017-08-30 13:10:25 -07:00
Konstantin Shcheglov e28aac09c4 Don't include BuiltinTypeBuilder(s) into additional exports.
Their `target` fails.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3004093002 .
2017-08-30 12:48:57 -07:00
Paul Berry c3ae6bd296 Simplify annotations in runtime check tests.
It turns out that it is easier to calculate whether or not checks are
needed at the site of the declaration of the interface target, not at
the call site.  Accordingly, it makes sense to put the annotations on
the interface target declarations as well.  This lets us get rid of a
clumsy annotation format that referred to arguments by number, in
favor of simply annotating the formal parameters themselves.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3010613003 .
2017-08-30 11:05:16 -07:00
Konstantin Shcheglov 288b203b6c Stop building export scopes in KernelDriver.
Fasta already store exports scopes into Kernel.
It was added some time ago and improved recently.
https://github.com/dart-lang/sdk/commit/234c4a7f493e1fc3dafc393472e39163ac2ad783

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3004913002 .
2017-08-30 10:38:17 -07:00
Konstantin Shcheglov 7924f4c42f Fix for ScopeBuilder[] - look into setters too.
TBR

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3010763002 .
2017-08-30 10:32:35 -07:00
Konstantin Shcheglov 234c4a7f49 Store actual Reference(s) for additional exports.
We need this to be able to tree shake outline.
https://github.com/dart-lang/sdk/issues/30448#issuecomment-325434406

R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3008763002 .
2017-08-30 09:56:21 -07:00
Konstantin Shcheglov 5d07433bb1 Mark types of Constructor parameters and preserve referenced typedefs.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3009803002 .
2017-08-29 16:52:51 -07:00
Devon Carew 98370444fc Add a missing import to compile_platform_test.dart.
BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3008813002 .
2017-08-29 13:22:02 -07:00
Sigmund Cherem 1a2870f798 Remove check for scheme in source-loader.
Context: this prevents us from using other schemes in unit tests, and causes
issues when processign a URI with no scheme, that happens to be supported by the
underlying file-system (e.g. PhysicalFileSystem will make it a `file:*` URI if
no scheme was present).

This is necessary to fix dartbug.com/30141

R=ahe@google.com

Committed: https://github.com/dart-lang/sdk/commit/d9ae60e14fdec52bda977ed114f6ad70dc2f0bc4
Review-Url: https://codereview.chromium.org/3006483002 .
2017-08-29 11:35:15 -07:00
Dan Rubel 059e877d23 report abstract as extraneous modifier
R=ahe@google.com

Review-Url: https://codereview.chromium.org/3004683002 .
2017-08-29 11:00:35 -04:00
Peter von der Ahé 48503c8720 Don't export unnamed mixins.
Fixes https://github.com/dart-lang/sdk/issues/30553

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3004703002 .
2017-08-29 16:33:33 +02:00
Peter von der Ahé 37d3c369d8 Start trying to compile platform from unpatched sources.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3009503002 .
2017-08-29 16:09:24 +02:00
danrubel a816484b59 tweak fasta parser event debug code
R=ahe@google.com

Review-Url: https://codereview.chromium.org/3002323002 .
2017-08-29 09:10:47 -04:00
Dan Rubel 2d449c870f flatten token hierarchy
This merges functionality and removes several Token classes
making the Token hierarchy more compact.

* merge BeginTokenWithComment into BeginToken
* merge KeywordTokenWithComment into KeywordToken
* merge StringTokenWithComment into StringToken
* merge TokenWithComment into SimpleToken

R=ahe@google.com

Review-Url: https://codereview.chromium.org/3010533002 .
2017-08-29 08:59:16 -04:00
Peter von der Ahé a5bcf58b06 Move tools to tool folder.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3003743002 .
2017-08-29 14:30:51 +02:00
Peter von der Ahé 6eff945874 Mark top-level error field as static.
Closes https://github.com/dart-lang/sdk/issues/30431

R=sjindel@google.com

Review-Url: https://codereview.chromium.org/2999033002 .
2017-08-29 12:39:00 +02:00
Peter von der Ahé f60a6af7c1 Make internalFormat more robust.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2999963002 .
2017-08-29 11:46:15 +02:00
Peter von der Ahé 1b5cbc7694 Add debug names to scopes.
R=johnniwinther@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2995023002 .
2017-08-29 11:19:50 +02:00
Peter von der Ahé c89fb50056 Fix issues from CL 3009573002.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3003993002 .
2017-08-28 13:51:52 +02:00
Jens Johansen 1ad24e4b46 [kernel] Add offset to SwitchContinueStatement; add debugging test
BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3004693002 .
2017-08-28 12:01:03 +02:00
Konstantin Shcheglov a751b971a2 Remember direct dependencies in LibraryCycle.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/3009683002 .
2017-08-26 14:50:37 -07:00
Paul Berry 1cadaf4b80 Add tests demonstrating bugs #30547 and #30552.
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/3010483002 .
2017-08-26 08:00:07 -07:00
Konstantin Shcheglov f78d43c3d3 Convert GeneratedContent to async and use AnalysisDriver for tasks graph.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/3002293003 .
2017-08-26 07:51:34 -07:00
Brian Wilkerson 1a1bfa4a9c More pre-publish changes
R=devoncarew@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/3002363002 .
2017-08-25 14:22:57 -07:00
Brian Wilkerson 1f552d8c96 More clean-up prior to publishing
Review-Url: https://codereview.chromium.org/3006633002 .
2017-08-25 14:11:42 -07:00
Brian Wilkerson f64000374d Update pubspecs prior to publishing
R=devoncarew@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/3006623002 .
2017-08-25 13:24:17 -07:00
Dan Rubel 8786656783 map fasta error codes to analyzer
Rather than have multple fine grained error codes for each type
of modifier in each situation, this CL adds a new analyzer
ParserErrorCode.EXTRANEOUS_MODIFIER parallel to the fast parser
error code and updates the AstBuilder to generate that error
rather than ParserErrorCode.ABSTRACT_CLASS_MEMBER.

My goal is to review each analyzer error code similar to
ParserErrorCode.ABSTRACT_CLASS_MEMBER and map each to the same
ParserErrorCode.EXTRANEOUS_MODIFIER error code.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2999303002 .
2017-08-25 09:00:18 -04:00
Dan Rubel 07a00fc258 remove old fasta missing exponent recovery
As of https://codereview.chromium.org/3002493003
fasta recovers from a missing exponent by
first issuing an error and then appending '0' to the number
so that 347e becomes 347e0

This CL removes the old error recovery that appends NaN
to the token stream as it is no longer needed.

Fix https://github.com/dart-lang/sdk/issues/30508

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3004573002 .
2017-08-25 08:57:24 -04:00
Jens Johansen 2ba6cce387 [kernel] Position on switch expression
BUG=
R=ahe@google.com

Review-Url: https://codereview.chromium.org/3003863002 .
2017-08-25 13:54:40 +02:00
Peter von der Ahé aff5d768d7 Serialize exports scopes.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3009573002 .
2017-08-25 13:54:13 +02:00
Sigmund Cherem 752df5edb9 Revert "Remove check for scheme in source-loader."
This triggered some failures on the vm bots, I'll hopefully reland tomorrow morning.

This reverts commit d9ae60e14f.

R=ahe@googl.com
CC=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/3005573002 .
2017-08-24 21:40:43 -07:00
Sigmund Cherem d9ae60e14f Remove check for scheme in source-loader.
Context: this prevents us from using other schemes in unit tests, and causes
issues when processign a URI with no scheme, that happens to be supported by the
underlying file-system (e.g. PhysicalFileSystem will make it a `file:*` URI if
no scheme was present).

This is necessary to fix dartbug.com/30141

Review-Url: https://codereview.chromium.org/3006483002 .
2017-08-24 16:24:34 -07:00
Konstantin Shcheglov 6d5a29004c Generalize LRU Cache to any objects.
It turned out that caching just bytes does not allow us to realize full
benefits of caching PackageBundle(s). We want to keep partially
decoded values like sub-objects and strings for maximum performance.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2998363002 .
2017-08-24 11:07:07 -07:00
Konstantin Shcheglov 827075befb Store the covariant keyword flag for parameters and fields into Kernel and resynthesize in analyzer.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/3008463002 .
2017-08-24 07:17:36 -07:00
Sigmund Cherem f539785e03 Load extraRequiredLibraries from the target passed in the options
This makes the behavior match what fasta does.

Long term I agree we don't want these implicit imports. I sent an email to
brainstorm a solution for that.

This change will address one of the issues reported in http://dartbug.com/30491

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/3007503002 .
2017-08-23 20:11:53 -07:00
Paul Berry 913852aaa4 Test some more complex cases of covariant generic parameters.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/3006463002 .
2017-08-23 15:01:46 -07:00
Paul Berry f6e2676571 Properly annotate the checks needed when invoking function-typed objects.
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2999403003 .
2017-08-23 13:49:14 -07:00
Konstantin Shcheglov dab5318fad Clear StringToken.canonicalizer after each parsing.
Otherwise the canonicalizer grows without limit, and if the user
edits files, we constantly parse new strings, so constantly add new
entries into the cananonicalizer. Basically, it is not friendly for
long running processes. I'm not quite sure why we need to makes it
static anyway, if it can be used only for the same file content. Once
we're done with a file, that is it, we don't need its entries.

Anyway, this fixes a leak in Analysis Server.

R=ahe@google.com, brianwilkerson@google.com, danrubel@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/3003753002 .
2017-08-23 10:57:27 -07:00