Commit Graph

2004 Commits

Author SHA1 Message Date
Paul Berry 5a714dd192 Update fasta scanner tests to refer to #28665.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2682753003 .
2017-02-08 05:14:56 -08:00
Paul Berry 6c86822bf5 Separate fasta and analyzer scanner tests.
This makes it easier to run one set of tests or the other.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2680903002 .
2017-02-07 17:36:52 -08:00
Paul Berry e29f83feeb Modify fasta scanner testing logic to use ErrorToken.errorCode.
Fixes 6 failing tests.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674353002 .
2017-02-07 06:36:00 -08:00
Paul Berry a4f8db2c0b Use token.value to distinguish comment types.
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674383002 .
2017-02-07 05:57:21 -08:00
Paul Berry 04f19f6bfb Connect fasta's scanner to the analyzer-derived scanner tests in front_end.
Failing tests are currently marked with "@failingTest" to prevent
breaking buildbots.

I've marked the issues I'm aware of with "TODO(paulberry,ahe)".  Peter
and I need to triage these issues--some of them may not be necessary
to fix due to the fact that fasta replaces the parser as well.  We
will follow up with CLs that either fix the issues or remove the TODO
comments as appropriate.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2676083002 .
2017-02-06 05:54:15 -08:00
Peter von der Ahé a7c75dd2a1 Add option --compile-sdk to fasta compile and run.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2676823002 .
2017-02-06 11:20:36 +01:00
Peter von der Ahé bf91a3f6e5 Pop named mixin type variables in correct order.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2677483003 .
2017-02-03 21:05:19 +01:00
Peter von der Ahé 7512ab5c79 Enable running of fasta tests on build bot.
Fixes https://github.com/dart-lang/sdk/issues/28594

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2675593003 .
2017-02-03 07:12:04 +01:00
Peter von der Ahé 7be9cd0ded Throw input error instead of parser error to avoid crashing.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2664333003 .
2017-02-02 14:35:38 +01:00
Paul Berry ee78e6c3b3 Add fasta subdirectories to subpackage_relationships_test.
I populated subpackageRules with the set of dependencies that are
needed in order to make the tests pass.  Hopefully we can eliminate
some of these dependencies in the future.

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2674463002 .
2017-02-02 03:01:48 -08:00
Peter von der Ahé e037a21ec3 Update location of rasta tests.
Fixes https://github.com/dart-lang/sdk/issues/28594

R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2663163005 .
2017-02-01 16:33:15 +01:00
Peter von der Ahé 92cfd09e42 Fix some problems with lexical error recovery.
* current.next was sometimes null.

* recoverUnmatched would create a cycle.

R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2661153005 .
2017-02-01 16:24:22 +01:00
Peter von der Ahé c64608e905 Include pkg/compiler/tool in analysis.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2662363004 .
2017-02-01 15:42:19 +01:00
Peter von der Ahé ac656ccf3e Ignore hints and warnings from analzyer.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2670443003 .
2017-02-01 15:38:14 +01:00
Paul Berry 1ec9a02f23 Account for fasta in subpackage_relationships_test
R=ahe@google.com

Review-Url: https://codereview.chromium.org/2663403002 .
2017-02-01 05:47:19 -08:00
Peter von der Ahé dba31176cb Rewrite package:fasta/testing URIs.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2666913003 .
2017-02-01 14:06:15 +01:00
Peter von der Ahé ce742a1697 Port parser and scanner fixes from rasta branch.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2664593002 .
2017-02-01 13:59:11 +01:00
Peter von der Ahé ef8ec26cf3 Update status files and expectations of rasta tests.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2653223002 .
2017-02-01 13:35:35 +01:00
Peter von der Ahé 683fe6ab7c Update rasta direct expectations.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2658093007 .
2017-02-01 13:32:42 +01:00
Peter von der Ahé 5f1092d494 Update rasta outline expectations.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2662703002 .
2017-02-01 13:29:47 +01:00
Peter von der Ahé e4c8a99f67 Import rasta tests.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2650913007 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé 8b237e4638 Updated to kernel changes in master.
Rebased on 919b5ac8d0.

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2644633004 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé 0da94cc888 Apply toValue conversion on assert messages.
R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2639903005 .
2017-02-01 12:27:36 +01:00
Peter von der Ahé 1f459481e9 Update status file.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2646443007 .
2017-02-01 12:27:35 +01:00
Peter von der Ahé 24a0111781 Implement correct scope of for-in expression.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2642713002 .
2017-02-01 12:27:35 +01:00
Peter von der Ahé 3d70457812 Add Fasta tests.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2631613003 .
2017-02-01 12:27:35 +01:00
Peter von der Ahé 3a113944cc Update testing.json.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2670523002 .
2017-02-01 12:26:46 +01:00
Peter von der Ahé d0d27c1c38 Use parser and scanner from package:front_end.
Originally reviewed as:

    Review-Url: https://codereview.chromium.org/2650413002 .
    Review-Url: https://codereview.chromium.org/2652203002 .
    Review-Url: https://codereview.chromium.org/2655843002 .
    Review-Url: https://codereview.chromium.org/2654433009 .
    Review-Url: https://codereview.chromium.org/2647343003 .
    Review-Url: https://codereview.chromium.org/2652663005 .
    Review-Url: https://codereview.chromium.org/2650813002 .
    Review-Url: https://codereview.chromium.org/2650803002 .
    Review-Url: https://codereview.chromium.org/2651843004 .
    Review-Url: https://codereview.chromium.org/2649923002 .
    Review-Url: https://codereview.chromium.org/2651563003 .
    Review-Url: https://codereview.chromium.org/2649123002 .
    Review-Url: https://codereview.chromium.org/2644843006 .
    Review-Url: https://codereview.chromium.org/2647043002 .
    Review-Url: https://codereview.chromium.org/2642903003 .
    Review-Url: https://codereview.chromium.org/2645513002 .
    Review-Url: https://codereview.chromium.org/2642663003 .
    Review-Url: https://codereview.chromium.org/2642713002 .
    Review-Url: https://codereview.chromium.org/2635473002 .
    Review-Url: https://codereview.chromium.org/2624373003 .
    Review-Url: https://codereview.chromium.org/2627723006 .
    Review-Url: https://codereview.chromium.org/2627093007 .
    Review-Url: https://codereview.chromium.org/2629543008 .
    Review-Url: https://codereview.chromium.org/2629543007 .
    Review-Url: https://codereview.chromium.org/2631503002 .
    Review-Url: https://codereview.chromium.org/2621153006 .
2017-02-01 10:29:25 +01:00
Paul Berry b489ae5a5f Simplify the API for incremental_resolved_ast_generator.
The use of a two-layer map will dovetail well with changes I have
planned for the AnalysisDriver.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2665043003 .
2017-01-31 13:34:55 -08:00
Paul Berry 7bfc3ced58 Clean up hacky handling of "dart:" URIs in incremental resolved AST generator.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2643033003 .
2017-01-20 08:54:01 -08:00
Paul Berry 6acc2c2611 Store a file state in the incremental resolved AST generator.
This is necessary to make invalidation work properly.  It also ensures
that we don't do redundant reads from the filesystem.

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2644953002 .
2017-01-19 13:58:57 -08:00
Paul Berry c04ba40745 Add initial support for parts to the incremental kernel generator.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2642083003 .
2017-01-19 12:32:27 -08:00
Paul Berry 28bfd11a70 Create a "file repository" data structure to help interface analyzer and front_end code.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2645923002 .
2017-01-19 10:55:50 -08:00
Paul Berry 2adae270d6 Fix incremental kernel builder to handle multiple calls to computeDelta.
Note that the invalidate() method is not supported yet; you must use
invalidateAll().

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2638423002 .
2017-01-18 14:43:06 -08:00
Paul Berry 05a417034a Initial implementation of front_end hot reload API.
This implementation is based on the existing kernel and analysis
driver logic, using proxy classes to account for interface
incompatibilities between those components.  In future CLs, I
hope we can (a) move the necessary analysis driver logic into
front_end, and (b) reduce or eliminate the number of proxy
classes needed.

This CL represents the very first inklings of functionality; all that
is confirmed to work at this point is compilation of a single source
file containing an empty `main` method.

R=danrubel@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2624193003 .
2017-01-17 06:10:02 -08:00
Paul Berry 577c91ba27 Fix physical_file_system_test.dart on Windows.
With the simplification to PhysicalFileSystem introduced in
fef4569eb5, the URI "/foo.dart" is now
uniformly treated as equivalent to "file:///foo.dart", even on
Windows.  (At the time the file is read, the file will be located on
the current drive).  This is consistent with what we do for relative
paths.

TBR=sigmund@google.com

Review-Url: https://codereview.chromium.org/2634543003 .
2017-01-13 05:51:00 -08:00
Paul Berry 561dacdad5 Simplify finding of .dart files in subpackage_relationships_test.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2627143004 .
2017-01-12 16:07:20 -08:00
Paul Berry fef4569eb5 Simplify PhysicalFileSystem implementation.
- Use Uri.base.resolveUri() to do all necessary normalization and
  conversion to absolute paths.

- Store a URI in _PhysicalFileSystemEntity rather than a path.

- Use `new io.File.fromUri(...)` to access the physical files.

- Fix some minor bugs in physical_file_system_test.dart.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2622423003 .
2017-01-12 15:48:48 -08:00
Paul Berry 9e49451643 Test that subpackages of front_end don't have undesired dependencies.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2624913004 .
2017-01-12 14:33:42 -08:00
Paul Berry fdbdd8a4d8 Add code to ProcessedOptions to fetch the SDK summary bundle.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2625533002 .
2017-01-11 06:19:40 -08:00
Paul Berry 9d5c3a9917 Fix Windows path handling in uri_resolver_test.
Fixes #28309

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2628653002 .
2017-01-10 15:09:17 -08:00
Paul Berry ba241c0c8d Use URIs rather than paths in front end API.
This carries a number of benefits:

- It allows the front end to trivially support schemes other than
  "file:" (e.g. "http:") by allowing the client to supply a FileSystem
  implementation that handles them.

- It is more consistent with the functionality of the ".packages" file
  (which allows packages to map to any kind of URI).

- It allows the "bazel root" feature to be rewritten to use a magic
  scheme rather than a magic path.  (This eliminates concerns about
  the magic path overlapping with a user's use case).  Note that this
  feature has been renamed to "multi root" since it is sufficiently
  generic to be applicable to build systems other than Bazel.

- It reduces the risk of forgetting to use the front end's FileSystem
  abstraction to access the file system, since the native file system
  interfaces do not accept URIs.

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2614063007 .
2017-01-09 11:19:38 -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
Paul Berry 0d1703309a dependency_grapher: handle dependencies on SDK.
R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2581263002 .
2016-12-16 13:23:41 -08:00
Paul Berry 519f7d4025 Add preliminary packages file support to dependency_grapher.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2572383004 .
2016-12-16 10:07:29 -08:00
Paul Berry ede20b6558 Implement a front end API for querying the dependency structure of a project.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2575403005 .
2016-12-15 18:47:20 -08:00
Paul Berry 4e33530fbf Add front end code for reading the SDK's "libraries.dart" file.
R=danrubel@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2578693002 .
2016-12-14 15:23:31 -08:00
Paul Berry b29fa08444 Implement URI resolution in the front end.
R=danrubel@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2577503002 .
2016-12-13 13:21:14 -08:00
Paul Berry 4ee949c154 Add an async version of dependency_walker.dart.
This is intended to be used in situations where computing dependencies
and/or evaluating nodes is an asynchronous operation.  (For example,
when performing a compilation, computing dependencies of a library
requires file I/O to read the files constituting the library;
evaluating a library cycle might potentially be performed
asynchronously by a separate isolate).

At the moment the implementation is nearly the same as that of
dependency_walker.dart, except asynchronous.  In future CLs I will
look into allowing computeDependencies(), evaluate(), and
evaluateScc() to operate in parallel.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2552383002 .
2016-12-06 12:29:07 -08:00
Paul Berry 11d43180af Add missing copyrights
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2550323003 .
2016-12-06 11:20:05 -08:00