Commit Graph

18 Commits

Author SHA1 Message Date
Johnni Winther 34fb48bb8a [kernel,front_end] Migrate first wave of pkg/kernel and pkg/front_end
Migrates libraries dependent only on already migrated libraries.

Change-Id: I0e85ee8dbc2afce031b92e0009e71c206a55af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-18 15:40:21 +00:00
Jens Johansen 5601eabda6 [CFE] Spell check messages and dart code
This CL adds a simple spell-checker, adds a spell-checking-phase to
messages_test to spell-check our messages, adds a new test that
spell-check our dart-code and fixes a lot of spelling mistakes / typos.

Change-Id: I8943a5bd67970e9a8a775251ae0aa97799eab097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112346
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-09 08:47:00 +00:00
Sam Rawlins 3154bb0d37 Stop using external deprecated members in front_end
Change-Id: I3fa03de568f72bfc3adb46efcfa2b61b781c706b
Reviewed-on: https://dart-review.googlesource.com/c/89020
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-01-15 18:55:10 +00:00
Jens Johansen 35589e03cc Don't create defensive copies in memory file system
Follow-up to ac05595889.
This removes the defensive copies (except when adding a non-Utf8list),
resulting in another ~10 MB of savings.

Change-Id: I0d34270cfcdbcc16df0e1988302c5029488a759b
Reviewed-on: https://dart-review.googlesource.com/63951
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-07-10 09:29:30 +00:00
Lasse R.H. Nielsen 973a1a0219 Remove uses of upper-case constants in remaining SDK code.
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.

Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 16:11:57 +00:00
Jens Johansen 22d0696d91 [CFE] Move front-end API under src/
This CL deprecates the front-end API and moves it into src/api_prototype.

For now all usages have been updated to point to the new location,
but they should be updated to use custom-client invocations instead (e.g.
one specific way for DDC, another for dart2js etc.)

Bug:
Change-Id: I9b4f41f6ebf55d42510fd35240d942d1dc7292d6
Reviewed-on: https://dart-review.googlesource.com/24822
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2017-12-01 08:42:16 +00:00
Paul Berry d9de63eb81 Disable supermixin support in front end and kernel.
Supermixin support is not currently planned for the initial release of
Dart 2.0, so it seems unwise for front end and kernel to enable it.

Kernel didn't actually contain any usages of supermixin support; front
end contained one usage in a test.

Change-Id: I2b225f8d6c5f0ea32cb60d7636e043c89439548c
Reviewed-on: https://dart-review.googlesource.com/3020
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2017-09-04 18:50:17 +00:00
Konstantin Shcheglov c28419bce0 Add support for SDK outline in KernelDriver.
I had to weaken file system createDirectory() to avoid conflicts when
we re-create SDK, and attempt to re-recreate its directory.

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

Review-Url: https://codereview.chromium.org/2993093003 .
2017-08-07 10:46:44 -07:00
Konstantin Shcheglov 41bcfaa4a4 Add createDirectory() to MemoryFileSystemEntity.
We need this API to create a mock SDK in a way that makes
ProcessedOptions.validateOptions() to accept it - the SDK root
must exist.

Alternatively (or in addition to) we could make writeXYZ create parent
directories implicitly. So, to "create" a directory, you would need
to create a file in this directory.

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

Review-Url: https://codereview.chromium.org/2994643002 .
2017-08-04 11:46:02 -07:00
Sigmund Cherem c6600c08d3 Remove FileSystem.lastModified
It is no longer in use.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2988443002 .
2017-07-21 11:45:56 -07:00
Konstantin Shcheglov 48b22b0e52 Throw FileSystemException from FileSystemEntity methods.
We need to be able to handle exceptions regardless of the implementation.

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

Review-Url: https://codereview.chromium.org/2864183002 .
2017-05-08 08:27:54 -07:00
Sigmund Cherem f8fbff7322 Extend file-system abstraction with a couple methods, remove context.
New methods:
 - exists: I'll be using it for input validation among other things
 - lastModified: I'll be using this on some utilities to support the incremental
 API.

BUG=
R=paulberry@google.com

Committed: https://github.com/dart-lang/sdk/commit/99ab24f628b23f248582874a6987883ab76c3195
Committed: https://github.com/dart-lang/sdk/commit/102de9e476bcd2b17f35604a7a3e442b28e14194
Review-Url: https://codereview.chromium.org/2844903002 .
2017-04-28 15:57:06 -07:00
Dmitry Stefantsov 95f15308c8 Revert "Extend file-system abstraction with a couple methods, remove context."
This reverts commit 102de9e476.

TBR=sigmund@google.com

Review-Url: https://codereview.chromium.org/2850533004 .
2017-04-28 12:50:41 +02:00
Sigmund Cherem 102de9e476 Extend file-system abstraction with a couple methods, remove context.
New methods:
 - exists: I'll be using it for input validation among other things
 - lastModified: I'll be using this on some utilities to support the incremental
 API.

BUG=
R=paulberry@google.com

Committed: https://github.com/dart-lang/sdk/commit/99ab24f628b23f248582874a6987883ab76c3195
Review-Url: https://codereview.chromium.org/2844903002 .
2017-04-27 15:05:10 -07:00
Sigmund Cherem 6ce9d4e1fb Revert "Extend file-system abstraction with a couple methods, remove context."
This reverts commit 99ab24f628.

Tests failed under `--use-sdk`. Fix is simple, but the affected tests seem to
be failing because of another CL as well.

TBR=brianwilkerson@google.com,paulberry@google.com

Review-Url: https://codereview.chromium.org/2852463004 .
2017-04-27 14:46:40 -07:00
Sigmund Cherem 99ab24f628 Extend file-system abstraction with a couple methods, remove context.
New methods:
 - exists: I'll be using it for input validation among other things
 - lastModified: I'll be using this on some utilities to support the incremental
 API.

BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2844903002 .
2017-04-27 14:01:10 -07: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 28b6a1f7ea Add implementations of the front end FileSystem API.
This required some small changes to the API contract.

Note that the tests use supermixins.  I'm assuming that supermixin
functionality will be available on all platforms by the time this is
needed.  If not, I will be happy to rewrite them.

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

Review URL: https://codereview.chromium.org/2471283002 .
2016-11-03 08:21:10 -07:00