Commit Graph

12967 Commits

Author SHA1 Message Date
Paul Berry e9915515e1 Disable processed_options_test for dart2js.
This test uses dart:io so it can't run on dart2js.

TBR=danrubel@google.com

Review-Url: https://codereview.chromium.org/2617833005 .
2017-01-06 13:37:45 -08:00
Konstantin Shcheglov d6fdc65220 Run 'Rename Library' refactoring tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614903006 .
2017-01-06 12:33:23 -08:00
Konstantin Shcheglov 05963058d2 Implement search for LibraryElement in its parts.
It's not the most efficient implementation though.
Probably does not matter, search for libraries should be very rare.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2619013003 .
2017-01-06 12:11:41 -08:00
Paul Berry 3800a45ff0 Work around broken analyzer test front_end/test/src/base/processed_options_test
The test is broken due to bug #28236.

TBR=danrubel@google.com

Review-Url: https://codereview.chromium.org/2611123006 .
2017-01-06 11:50:29 -08:00
Paul Berry 1d57e1b096 Extract code from dependency_grapher.dart for easier re-use elsewhere in the front end.
In the process I've made the constructors for Graph, LibraryCycleNode,
and LibraryNode public.  I don't think this should be a problem, since
these are simple data structures, so there is no harm in allowing
clients to create them.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2617483007 .
2017-01-06 11:37:12 -08:00
Konstantin Shcheglov 429379045b Run rename-import tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617213002 .
2017-01-06 11:35:29 -08:00
Emily Fortuna 745c2989f4 Reapply 0c78abd090
"Ensure we're looking at the correct resolved AST when initializing fields in constructors."

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2614983004 .
2017-01-06 11:01:39 -08:00
Brian Wilkerson 07895169be Remove code duplication
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2618983003 .
2017-01-06 10:55:55 -08:00
Konstantin Shcheglov 31c7cce275 Run refactoring tests with the new analysis driver.
There are some failures because of missing potential search results.

These tests are not updated yet because they have too many problems now.

inline_method_test.dart
move_file_test.dart
rename_import_test.dart
rename_library_test.dart

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618993003 .
2017-01-06 10:49:34 -08:00
Paul Berry ca271d003e Create a wrapper class to handle CompilerOptions in a uniform way.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2618633006 .
2017-01-06 10:40:45 -08:00
Stephen Adams 5305e8685c dart2js-kernel: do not crash on missing const initializers
Compilation will fail, but only after compiling functions that might use the constants.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2612273003 .
2017-01-06 10:34:08 -08:00
Paul Berry 848d059581 Add a missing copyright notice.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2611183004 .
2017-01-06 10:03:35 -08:00
Stephen Adams d9b8a3018c dart2js-kernel: Associate irregular calls
BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2616843006 .
2017-01-06 09:33:21 -08:00
Konstantin Shcheglov c7380f5d14 Run Quick Fixes tests with the new analysis driver.
There is a handful of failing tests though.
I fill triage them in subsequent CLs.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833003 .
2017-01-06 09:27:04 -08:00
Konstantin Shcheglov 71fc176b9b Run class/member hierarchy tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2618033002 .
2017-01-06 09:24:31 -08:00
Paul Berry d061d39342 Reject patches that change parameter names/types or return types.
R=kmillikin@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2616993002 .
2017-01-06 09:01:26 -08:00
Emily Fortuna 5f60d0c3c4 Revert "Ensure we're looking at the correct resolved AST when initializing fields in constructors."
This reverts commit 0c78abd090.

The change to in-memory tests requires a little more finesse than what is written. Backing out to redo.

BUG=

Review-Url: https://codereview.chromium.org/2615173002 .
2017-01-05 17:53:04 -08:00
Konstantin Shcheglov 4e49205c61 Run AssistProcessor tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2617833002 .
2017-01-05 16:59:35 -08:00
Bob Nystrom d1030e9be0 Don't hardcode 'dart' as the executable name to spawn.
I don't think it's on the PATH on the buildbots.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2617013003 .
2017-01-05 16:44:09 -08:00
Emily Fortuna 0c78abd090 Ensure we're looking at the correct resolved AST when initializing fields in constructors.
Step 30 of bagilliondy.

BUG=https://github.com/dart-lang/sdk/issues/27394
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2616933003 .
2017-01-05 16:19:57 -08:00
Stephen Adams 1fc6d58699 dart2js-kernel: map rasta 'read' node in 'field ??= e'
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2610413002 .
2017-01-05 15:58:36 -08:00
Konstantin Shcheglov d2f48ccf58 Make subclasses of AbstractContextTest asynchronous.
As a preliminary step before duplicating them for the new analysis driver.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2614033003 .
2017-01-05 14:21:29 -08:00
Konstantin Shcheglov e870bc9872 Fix for summarizing triple slash documentation comments.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615013003 .
2017-01-05 12:30:44 -08:00
Konstantin Shcheglov d8c426bb85 Fix for resynthesizing libraries with invalid part URIs.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615903003 .
2017-01-05 12:26:47 -08:00
Sigmund Cherem 313190029a Fix perf.dart test.
These tests didn't cover much, but I still managed to break them...
TBR=paulberry@google.com

Review-Url: https://codereview.chromium.org/2613113002 .
2017-01-05 12:17:06 -08:00
Sigmund Cherem cc3682f134 fe: minor change to benchmarks to match what the runners expect and some minor refactoring.
I'm happy to split the style/refactorings as separate CLs if you prefer. Here is a summary of the changes:
  - update the reported strings to match the names expected by our benchmark runners ("unlinked summaize + parse" => "unlinked_summarize")
  - invert the benchmark results (like Paul did in 2551533003)
  - stop counting input-size while scanning, count that separately once
  - combine the multiple summarization steps into a single function
  - clean up the logic that dispatches into each benchmark

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2602003002 .
2017-01-05 11:31:35 -08:00
Konstantin Shcheglov e9794e37b5 Call processOptionsForDriver() before creating the driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2615903002 .
2017-01-05 11:10:01 -08:00
Konstantin Shcheglov e6634d67f4 Issue 28149. Don't include non-Dart file into FileState.
So, these non-Dart files are not include into 'knownFiles', and we
don't attempt to request CompilationUnitElement(s) for them in search.

R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28149

Review-Url: https://codereview.chromium.org/2613683005 .
2017-01-05 10:55:35 -08:00
Jennifer Messerly 95d5bf471c fix analyzer failing resolve loop variable nodes
for example: `var item; for (item in list) { ... }`

this happens anytime ResolutionCopier is used on these, because it drops the staticElement reference for `item` in the above example.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2612983002 .
2017-01-05 10:47:43 -08:00
Stephen Adams fd44f86cfb dart2js: Constant folding and specialization for remainder. modulo
"a.remainder(b)" can be compiled to "a % b"

"a % b" can be compiled to "a % b" in some limited circumstances.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2561533002 .
2017-01-05 09:58:53 -08:00
Konstantin Shcheglov d9930d86cd processOptionsForDriver() is never called with 'optionsRemoved'.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612783004 .
2017-01-05 08:47:52 -08:00
Konstantin Shcheglov 9a3b6a09e5 Issue 28261. Add support for implementing generic methods in Quick Fix.
R=brianwilkerson@google.com
BUG= https://github.com/dart-lang/sdk/issues/28261

Review-Url: https://codereview.chromium.org/2618653002 .
2017-01-05 08:32:03 -08:00
Johnni Winther 12491d4ab8 Fix needsNoSuchMethod computation for abstractly instantiated classes
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2612253002 .
2017-01-05 16:42:38 +01:00
Jens Johansen 5215ec6ef2 Revert "Non-format-changing kernel offset changes"
The commit breaks package:compiler.

This reverts commit 5edca8c4d3.

BUG=

Review-Url: https://codereview.chromium.org/2614663007 .
2017-01-05 14:19:23 +01:00
Jens Johansen 5edca8c4d3 Non-format-changing kernel offset changes
Updates to kernel that sets more offsets (and introduces end offests
and 'debuggability') - but doesn't necessarily persist them,
i.e. the format doesn't change and no C++ changes are neccessary yet.

This is step #1 in introducing these things, next step(s) will be
persisting the new stuff and using it on the C++ side.

R=asgerf@google.com, kmillikin@google.com

Review-Url: https://codereview.chromium.org/2610133002 .
2017-01-05 13:25:46 +01:00
Johnni Winther 51e3c01e3e Prefix resolution_types with Resolution.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2603263002 .
2017-01-05 13:10:20 +01:00
Johnni Winther c899f20de3 Reduce use of Element in optimize.dart
R=sigmund@google.com

Committed: https://github.com/dart-lang/sdk/commit/52158e2ad61d614dc1356a38924af541ddaf4d89

Reverted: https://github.com/dart-lang/sdk/commit/a7bd904ecc1bf109d79b1a0f7deb731bf38c91c3
Review-Url: https://codereview.chromium.org/2608273002 .
2017-01-05 10:20:52 +01:00
Dan Rubel dff9e61d4d fix tests
Review-Url: https://codereview.chromium.org/2614893002 .
2017-01-04 22:08:55 -05:00
Dan Rubel 55ef6e193c support --options flag and other analysis options flags in DDC
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic

As well as general refactoring and cleanup of DDC options processing

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2598593003 .
2017-01-04 18:15:21 -05:00
Konstantin Shcheglov 4f03cccf06 Fix part related completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2616493004 .
2017-01-04 15:06:10 -08:00
Konstantin Shcheglov 1e43b4f270 Replace using MockSdk with FolderBasedDartSdk + summaries in AbstractContextTest(s).
It has some performance penalty (about 2-3 seconds in 35 seconds total).

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

Review-Url: https://codereview.chromium.org/2610823004 .
2017-01-04 14:39:24 -08:00
Konstantin Shcheglov 20ca3e9b7e Enable several completion tests with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612103002 .
2017-01-04 14:23:18 -08:00
Jacob Richman 93fb5d8119 Fix cross-window JS interop on FireFox.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2610813003 .
2017-01-04 14:15:20 -08:00
Konstantin Shcheglov 305d0dff89 Set ContentCache for created AnalysisContext(s) to control its view of the world.
This should help to avoid inconsistency exceptions during Quick Fixes,
when we attempt to match element models created for a source with overlay,
and AST that AnalysisContext created for the content without overlay.

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

Review-Url: https://codereview.chromium.org/2617433003 .
2017-01-04 12:55:46 -08:00
Konstantin Shcheglov 9619a9f157 Add ContentCache.getExists() and use it in AnalysisContextImpl.exists().
This allows us to avoid direct Source IO and be able to make analysis
in an AnalysisContext hermetic.

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

Review-Url: https://codereview.chromium.org/2610063004 .
2017-01-04 12:31:46 -08:00
Bob Nystrom da16354b1b Use the function name as the location for a missing return error.
Previously, it was using the entire function node, including it's body,
which makes for a gratuitously large amount of red squiggles. :)

This uses the function's name instead. As a side effect, the error now
appears a little later for a getter:

  get foo => ...
      ^^^

Where before it was:

  get foo => ...
  ^^^^^^^^^^^^^^

I tried putting the span on "get" instead in this case because that's
closer to where the return type should go, but I think the name looks a
little better because that's the name mentioned in the error message
too.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2609993002 .
2017-01-04 10:18:12 -08:00
Konstantin Shcheglov 44bab19cb3 Implement 'analysis.analyzedFiles' notification with the new analysis driver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2612723002 .
2017-01-04 07:12:47 -08:00
Vijay Menon 77cd33722b Mark test failing on FF
Jacob: looks like you changed the test just before the holidays?

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2610843002 .
2017-01-04 05:53:57 -08:00
Johnni Winther a7bd904ecc Revert "Reduce use of Element in optimize.dart"
This reverts commit 52158e2ad6.

Review-Url: https://codereview.chromium.org/2615623002 .
2017-01-04 14:28:23 +01:00
Asger Feldthaus 0546f6b4b7 Support generic method syntax in kernel pipeline.
Closes https://github.com/dart-lang/sdk/issues/28231
Closes https://github.com/dart-lang/sdk/issues/28238

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2613683003 .
2017-01-04 14:25:36 +01:00