Commit graph

1519 commits

Author SHA1 Message Date
Vijay Menon 3b5a187726 [dartdevc] move ddc internal libraries under sdk
Note, this has the effect of including all DDC Dart sources with the
shipped SDK: we ship everything under sdk/lib.

This should enable https://github.com/dart-lang/build/issues/2262

Change-Id: If66bc7c620034e7f2acf7d2c3e9524a408417681
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104383
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-04 13:47:29 +00:00
Vijay Menon 1b95819e3d [dartdevc] Train ddc on dill file instead of analyzer summary
Change-Id: I5560e309cac8e7ba4e4807af683bd64c6d0f63ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104040
Auto-Submit: Vijay Menon <vsm@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-05-29 16:17:10 +00:00
Jens Johansen ec3cd7ffe0 Workaround for dartbug.com/36983 also when not in incremental compiler
When invoking the kernel worker in worker mode, reusing previous state,
but not using the incremental compiler, we will currently leak,
see dartbug.com/36983.
This was previously fixed in the incremental compiler case, but this CL
moves the fix outside the if to fix it in every configuration.

Change-Id: I993fecbcc053d2bca64af9e65d270f75411f2e68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103626
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-27 10:46:18 +00:00
Sigmund Cherem 64ed4bf664 Changes to bazel worker to support modular testing.
This includes:
 * accepting null values like sdk-summary or .packages (which are not used when building kernel for the sdk itself)
 * allow enabling language experiments
 * only exclude-non-sources on the non-incremental code path if that's requested

Change-Id: I08eeb643676f1f1406f0f3030c341d68179d42a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103574
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-05-24 19:09:12 +00:00
Jens Johansen 2bbb6aae9b Fixes to incremental DDK/blaze
This CL fixes a number of issues:
* Semi-leaking old components when starting over
  (i.e. when loading a new sdk)
* Setting new filesystem not really working because the old one was
  cached in the ProcessedOptions
* Leaking old state because of an apparent VM bug (http://dartbug.com/36983)

Change-Id: Ib124257c456b019941e253409c1ef56eedcf66b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103121
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-05-21 09:10:58 +00:00
Jens Johansen 6b730e8203 [bazel/kernel_worker] Only workers use incremental compiler; require digest
Change-Id: Iff4b45ffba79a05ce829ed73d952937ae55624d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101282
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-05-21 08:13:58 +00:00
Jens Johansen 099af47a69 [kernel] add ability to disable offsets for bazel worker to use
This is a lightly modified version of Jennys CL @
https://dart-review.googlesource.com/100275

Change-Id: I46a1665d84d04602af1f338cf963bc25b4e6b25c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-21 07:55:10 +00:00
Jacob Richman e2976acd22 Add --track-widget-creation flag to frontend_server.
This is needed to activate the kernel transformer embedded with the kernel package from the flutter engine.

Change-Id: I3253e01723b662eb48b4b3743ac5bcc1b44c7d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102920
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
2019-05-20 22:47:28 +00:00
Aske Simon Christensen 8754351283 [CFE] Run widget transformer before constant evaluation.
Change-Id: I51ded35ecb95cb5cfbac5ecf8967e0918a48269a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101987
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-10 11:02:49 +00:00
Aske Simon Christensen 1179467a5e Move widget transformer to kernel package
Change-Id: I7f9ece029e181d380f37028ed04f97d4fdfb12b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101985
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-10 11:02:49 +00:00
Ryan Macnak 3ad32e4287 [vm] Revert 1db1ac4863.
This feature was for Goma work that has been marked obsolete.

Bug: FL-48
Change-Id: I9997f8aefbe1d55f86cff2ab377166a0bce1ed53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101925
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-05-08 23:52:29 +00:00
Chingjun Lau 51730db51b Add flutter track widget creation transform to bazel kernel worker
Had to do a few changes to make this happen:
1. Restored some of the code removed in the transformer, making class
hierarchy optional.
2. Split the "compile" method in bazel_worker.dart into two, since we
need the intermediate Component object in one of the case.

Change-Id: I0ee004467e76dff0025f7979834c62b9db328ecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100480
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-05-06 19:20:08 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Chingjun Lau 2c4dc7a431 Support targetting flutter and flutter_runner in kernel_worker
Change-Id: I87745f48ba09a0ac8629ae6518b7dad883733447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100180
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-23 20:06:45 +00:00
Vijay Menon 43eebea5a3 [kernel_worker] retry on failure
Workaround for https://github.com/dart-lang/sdk/issues/36644

See similar for dartdevc: https://dart-review.googlesource.com/c/sdk/+/99442

Change-Id: Id02549a7bd8110b4691a724fa8930ede477464f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99735
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-04-17 23:36:01 +00:00
Nate Bosch d8a0d68bd6 Rename devcompiler to ddc
The value 'devcompiler' is never being passed to this argument so this
will not break any known use cases. The name 'ddc' has better
consistency with how we label SDK platforms in `build_runner`.

Bug: https://github.com/dart-lang/build/issues/2174
Change-Id: I95f6cb75ec86c2f276298781443203d201550815
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99704
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-04-17 21:42:51 +00:00
Jacob MacDonald edc6f88168 Use compiler context when serializing components and performing transformations.
Without this, if an error occurs during serialization you get this message:

```
Internal problem: Compiler cannot run without a compiler context.

```

Instead of the real error.

Change-Id: I016ec0923a2e01b68f850988724be9d30179f78d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98740
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-04-10 06:26:33 +00:00
Clement Skau 907c514c89 [SDK] Adds build targets, wrappers and SDK builds for Dart AOT.
Adds:
- dart2aot, a script similar to dart2js which compiles my.dart to my.dart.aot.
- dartaotruntime, a minimal Dart runtime that only runs AOT blobs.
- some extra tooling like gen_kernel and gen_snapshot used by the above.
- build rules for all of the above, including adding it to the full SDK builds.

Bug:https://github.com/dart-lang/sdk/issues/27596
Change-Id: Ic35f832b2b86be959212b8d21cfc5a082da5ced4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97627
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2019-04-05 13:23:44 +00:00
Jens Johansen b7f69e24a2 dartdevc and bazel worker can use incremental compiler
This allows dartdevc and the bazel worker to user
the incremental compiler with kernel.
Use --reuse-compiler-result --use-incremental-compiler to run in this mode.

Change-Id: I9189ce5f1a51320d9d96e071f8c95c80fe6fca84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95386
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-29 12:07:42 +00:00
Liam Appelbe 89f00ab25f Add a build rule for bytecode version of kernel_service.dill
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ifc95ff270c33cce13699bda23c1b7c8fb6139e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96835
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-19 21:29:29 +00:00
Jacob MacDonald d267fb6bf3 change the SummaryTarget to extend the DevCompilerTarget
Change-Id: I2ebd09e35b8ba8a254a318103102d33291f006a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97003
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2019-03-15 20:50:25 +00:00
Sigmund Cherem 74a23b96b0 Add support for dart2js targets to kernel_worker
This includes a `--target` flag (that in the future we can use for other targets
too) and a flag to accept the libraries.json file (currently needed to properly
compute constants of the form `bool.fromEnvironment('dart.library.io')`.

Change-Id: I8beea48610f0e1e721b7c76e545c9f662e3255ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96849
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2019-03-15 18:02:10 +00:00
Zach Anderson 8332fb0631 [vm] Adds an API call to dump the CPU profile to the timeline
Used in https://fuchsia-review.googlesource.com/c/topaz/+/258655

Change-Id: I79b102e0d318d7be3bae44fb88f81bb8086a10d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94400
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2019-03-07 21:28:26 +00:00
Ryan Macnak 30b47d24e6 [sdk] Remove unused --packages flag no longer recognized by gen_snapshot.
Change-Id: Ibcb27b11ed550724c2e8bac1b68801a2d3eb4892
Reviewed-on: https://dart-review.googlesource.com/c/94001
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-02-22 19:48:51 +00:00
jonahwilliams 3e304def65 switch dartdevc to kernel and fix path in rules.
The flutter engine needs to switch to the full SDK to include web support. As written, the dartdevc rules do not work outside of the sdk repo


Bug: https://github.com/dart-lang/sdk/issues/35834
Change-Id: I3b7711cf1920d86b82ddc4f0959b447207f54751
Reviewed-on: https://dart-review.googlesource.com/c/93760
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-02-22 01:02:05 +00:00
Ben Konyi 4cff5a4fd6 [ VM / Service ] Dynamically load source from linked-in platform kernel
- Added `Dart_SetDartLibrarySourcesKernel` to the Dart embedding API.
- vm_platform_strong.dill now contains the Dart SDK sources
- If vm_platform_strong.dill is linked into the Dart binary, the first
  request for a Dart SDK Script object from the VM service will load the
  sources for the script from the linked in kernel buffer.

Change-Id: I664abe31f9378d25ec79c21edce0b237a278495d
Reviewed-on: https://dart-review.googlesource.com/c/93375
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-02-21 18:22:39 +00:00
Jenny Messerly 3d6acab3e7 [dartdevc] remove unused dartdevk binary, fixes #35483
It's simply an alias for `dartdevc --kernel`, and now that build_runner
is switching to that, there's no reason to keep it around anymore.

Change-Id: I43d30a582314a236bcfa2e3a0b50bb48ddac79f8
Reviewed-on: https://dart-review.googlesource.com/c/88281
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-04 17:19:52 +00:00
Kevin Millikin d0c2cdcd4c [Kernel] Remove the syncAsync flag
This flag was always true so we can remove it and specialize the
remaining code that used it.  The only code that used it was in the
Dart VM's async transformation.

Specializing that code led to some unused fields in the async helper
class which were removed.  This triggered me to look at core types
which seems to have a lot of unused stuff.

Change-Id: I7da800ca17ac05478149f4c90337a38d2c2b1459
Reviewed-on: https://dart-review.googlesource.com/c/87960
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:07:04 +00:00
Jenny Messerly d3c3341b8a [dartdevc] fix conditional imports in kernel backend
Change-Id: I694b67624dff65099ca8cb8147d2b56a3532cd6c
Reviewed-on: https://dart-review.googlesource.com/c/85880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-04 18:39:46 +00:00
Sigmund Cherem b484aada21 Remove library-root option - replace it with a libraries-spec option instead
Change-Id: Ie1df52cdaa7ab4381a4c1b94c61a1210f0f31b5f
Reviewed-on: https://dart-review.googlesource.com/c/83641
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-11-09 22:40:28 +00:00
Jacob MacDonald 8f4e379665 update kernel worker to enable sync-async
Bug: https://github.com/dart-lang/sdk/issues/34852
Change-Id: I80a6209fd241aec455c67a9eb1893bf3c4c70e47
Reviewed-on: https://dart-review.googlesource.com/c/80561
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-10-18 16:07:18 +00:00
Peter von der Ahé 0a6d960d66 Update bazel_worker to onDiagnostic
Change-Id: If1e0f3977f9d70ae74cfb589aeddcb96ce1fafc1
Reviewed-on: https://dart-review.googlesource.com/c/78041
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-15 14:06:55 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Peter von der Ahé 8c872e0e3a Remove TargetFlags.strongMode
Change-Id: Ibf8661e5444d16666c54f1d81c626893b000521a
Reviewed-on: https://dart-review.googlesource.com/c/78986
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:11:41 +00:00
Peter von der Ahé ee97806084 Replace strongMode with legacyMode in CompilerOptions
Also, remove --strong and --strong-mode flags (use --legacy-mode
flag to enable legacy mode).

Change-Id: I577ab5f755a2bee88f0f4d63915a6e852e792f06
Reviewed-on: https://dart-review.googlesource.com/c/79000
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-10 12:04:26 +00:00
Ivan Naydonov ed6c557d1a Add cli parameters to kernel_sdk.dart to get all paths explicitly
To allow ddc sdk kernel generation internally, add a way to provide
paths to dependent files explicitly, instead of assuming relative from
Platform.script.

Also remove .packages file parameter. We don't have this file internally
and sdk shouldn't depend on any of packages anyway, so it just work
without this option.

Change-Id: Iec892cbb640d35e64d107c6af36d214632815bae
Reviewed-on: https://dart-review.googlesource.com/c/77485
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Ivan Naydonov <inayd@google.com>
2018-10-09 22:15:06 +00:00
asiva 30aa464f77 [VM] Remove 'corelib' and 'dart-io' sources generation into C++ arrays
- Remove all code that generates the corelib and dart:io library sources into C++ arrays and link them into dart_bootstrap
- Remove the executable dart_bootstrap and all uses of it
- Remove bootstrap_nolib.cc and builtin_nocore.cc
- Remove the Dart 1 code in core lib bootstrap path

Change-Id: Ifd33496204285a08b42fe09e39428e7a92b416b6
Reviewed-on: https://dart-review.googlesource.com/c/77241
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-10-02 23:27:05 +00:00
Ryan Macnak 4a51268890 [gen_snapshot] Restore support for --snapshot_kind=vm-aot-assembly; update docs.
Disable broken analyzer training runs.

Bug: https://github.com/dart-lang/sdk/issues/34616
Change-Id: Ib2bb022f5b095bcd29451741aa4ed557d2f78c17
Reviewed-on: https://dart-review.googlesource.com/77228
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-28 21:43:04 +00:00
Ryan Macnak 2f25dcda16 [vm] Remove script snapshots.
Change-Id: I5bc692b754c0909de4aa5f05af81b074578b16f4
Reviewed-on: https://dart-review.googlesource.com/76706
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-09-26 22:49:27 +00:00
asiva 355c73d4ee [VM] Remove support for option --no-preview-dart-2
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2

Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-09-24 20:38:08 +00:00
Zach Anderson 0bbdd8f7d9 [build] Correctly rebase kernel-service output for depfile
Otherwise ninja thinks kernel-service is always dirty.

Change-Id: I40fdddf25bddeb4546e520e7d8f0137eedf87bfd
Reviewed-on: https://dart-review.googlesource.com/75780
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-09-20 17:59:50 +00:00
Devon Carew 2c427d33fc Train the dartanalyzer on less source.
Change-Id: I6d8ff52839b0178cbc7d72ab8a1638bae5065993
Reviewed-on: https://dart-review.googlesource.com/75626
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 23:37:52 +00:00
asiva a0776096b9 Cleanup some of the build rules to not use Dart 1 mode.
Change-Id: I799ae7e910b90047a76151e47fc4c46d20f46ff7
Reviewed-on: https://dart-review.googlesource.com/74493
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-09-19 22:23:33 +00:00
Devon Carew 7df4900a94 Train the dartanalyzer tool on generating summaries.
Change-Id: Ic887eb2135161b5795a2456d38677f016bbe3643
Reviewed-on: https://dart-review.googlesource.com/75561
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 17:43:46 +00:00
Stephen Adams 96a190020e Remove dart2js non-strong platforms
Since dart2js is now strong-mode-only and ignores the --strong flag, I don't see the point in having 'strong' in the platform name.

Removed:
  dart2js_platform
  dart2js_server_platform
renamed:
  dart2js_platform_strong --> dart2js_platform
  dart2js_server_platform_strong --> dart2js_server_platform

Change-Id: If74ef31a17acc15a23a5338e5f53e820fc66b0dd
Reviewed-on: https://dart-review.googlesource.com/71425
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2018-09-18 16:33:19 +00:00
Jens Johansen 1e4b3e9754 Train kernel-service on Windows
Now, on Windows:
hello.dart (hello world script): ~0.33s, ~0.33s, ~0.29s, ~0.28s, ~0.29s
pkg\complier\bin\dart2js.dart --help: ~3.37s, ~3.36s, ~3.40s, ~3.50s, ~3.41s

Before, on Windows:
hello.dart (hello world script): ~0.85s, ~0.87s, ~0.86s, ~0.90s, ~0.91s
pkg\complier\bin\dart2js.dart --help: ~6.12s, ~6.20s, ~6.26s, ~6.13s, ~6.04s

So...:
hello.dart (hello world script): -65.3759% +/- 4.15274% at 95.0% confidence
pkg\complier\bin\dart2js.dart --help: -44.5854% +/- 1.68273% at 95.0% confidence

Change-Id: I6679a7fff68c146390ef70832278ece6eb120c7c
Reviewed-on: https://dart-review.googlesource.com/73921
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-09-07 14:31:03 +00:00
Paul Berry d04d304909 Stop using/generating spec.sum file.
For some time now, this file has had the same contents as strong.sum.
There's no point in keeping it around.

Change-Id: I793a41ca6cb1c47c68357f549d299fa95b96c4c5
Reviewed-on: https://dart-review.googlesource.com/71701
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-08-30 12:32:52 +00:00
asiva a6d20e6df4 Fix dependence on kernel-service in the application snapshot rule.
Change-Id: I8cc047ed3bcb1fbd9144ca3f1c9192f63b99a10b
Reviewed-on: https://dart-review.googlesource.com/71421
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-24 18:03:30 +00:00
asiva d1bd887d03 [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Iccca3233f6cb8d6b307b4cf1ca3262f293f794a6
Reviewed-on: https://dart-review.googlesource.com/70841
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-21 20:28:06 +00:00
Vyacheslav Egorov 032037681e Revert "[VM/SDK] Switch kernel isolate to run in Dart 2 mode"
This reverts commit 499761f0da.

Reason for revert: crashes when building SDK, red bots, broken Flutter 3xHEAD bot

Original change's description:
> [VM/SDK] Switch kernel isolate to run in Dart 2 mode
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
> Reviewed-on: https://dart-review.googlesource.com/70461
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: Ibf6d526fb5132b766f063fcf873cde661ae895d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/70516
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2018-08-19 19:58:32 +00:00
asiva 499761f0da [VM/SDK] Switch kernel isolate to run in Dart 2 mode
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: I067c5f1165fb93811dcc8e390a8bf381db721e5b
Reviewed-on: https://dart-review.googlesource.com/70461
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-08-18 22:50:09 +00:00
Vyacheslav Egorov bde6bbca96 [kernel] Move VmTarget and FlutterTarget to package:vm
Similar to how dart2js keeps its own target in package compiler.

This allows VmTarget to use package vm specific transformations and metadata.

Change-Id: I41dd2ae241b828224fb2c9a51e6ad5073b6fdea8
Reviewed-on: https://dart-review.googlesource.com/69160
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-08-10 12:55:57 +00:00
Zach Anderson 00e3109368 [VM] Adjust flags for creating depfiles
Currently, the VM can create depfiles when writing out a snapshot.
The snapshot file is the output file for the depfile. This change
allows creating a depfile when not writing out a snapshot. It
accomplishes this by adding a new flag --depfile_output_filename,
which allows the user to supply the output filename for the depfile,
which would otherwise be ambiguous when we are not creating a snapshot.

This change also adds the flag --depfile, which
--snapshot_depfile is now an alias of.

related #34026

Change-Id: I45eee463c499fc542e577d805b7ef9911ccb72a7
Reviewed-on: https://dart-review.googlesource.com/67420
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-07-31 17:09:31 +00:00
Devon Carew 05b9bbd2b5 Remove the dart1 version of the analysis server snapshot.
Change-Id: I0e2739fee543604110d95e46b4c62d49fcab2b1a
Reviewed-on: https://dart-review.googlesource.com/67383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-30 20:13:27 +00:00
Devon Carew 9107399190 Add back in the analysis server training.
Change-Id: I6c7349d0df68e18e960bcc071aec40fd9cb8a224
Reviewed-on: https://dart-review.googlesource.com/66803
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-30 18:04:42 +00:00
Devon Carew 5d145bdc22 Temporarily revert training the analysis server snapshot.
Change-Id: I0d78918f70d1f1f39e9108eca5d4b86f6ac7acd0
Reviewed-on: https://dart-review.googlesource.com/66681
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-07-25 18:06:05 +00:00
Siva Annamalai 33697f7339 Revert "Reland "[VM/SDK]""
This reverts commit b59583edea.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Reland "[VM/SDK]"
> 
> This is a reland of b4146411d0
> 
> Original change's description:
> > [VM/SDK]
> > 
> > - Switch the kernel isolate to run in Dart2 mode
> > - Refactor build rules so bootstrapping of the front end happens
> >   with a prebuilt dart sdk
> > - Refactor application snapshot build rules so the kernel application
> >   snapshot rule does not get into a cyclic dependency during the
> >   bootstrap stage
> > 
> > Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> > Reviewed-on: https://dart-review.googlesource.com/61660
> > Commit-Queue: Siva Annamalai <asiva@google.com>
> > Reviewed-by: Zach Anderson <zra@google.com>
> 
> Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
> Reviewed-on: https://dart-review.googlesource.com/65841
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=zra@google.com,asiva@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I6077236481bec9089ead881c902036b0817114fc
Reviewed-on: https://dart-review.googlesource.com/66240
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-07-23 18:07:29 +00:00
asiva b59583edea Reland "[VM/SDK]"
This is a reland of b4146411d0

Original change's description:
> [VM/SDK]
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

Change-Id: I2a3fa8ed4f331cf3de89ddff5cf8e478809dae39
Reviewed-on: https://dart-review.googlesource.com/65841
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-07-19 22:04:56 +00:00
Siva Annamalai 7f5334480e Revert "[VM/SDK]"
This reverts commit b4146411d0.

Reason for revert: Seems to have build issues on certain bots

Original change's description:
> [VM/SDK]
> 
> - Switch the kernel isolate to run in Dart2 mode
> - Refactor build rules so bootstrapping of the front end happens
>   with a prebuilt dart sdk
> - Refactor application snapshot build rules so the kernel application
>   snapshot rule does not get into a cyclic dependency during the
>   bootstrap stage
> 
> Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
> Reviewed-on: https://dart-review.googlesource.com/61660
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=zra@google.com,asiva@google.com

Change-Id: I4fc5b81e0a102bde4e8b4f737af3825e9728be3b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/65840
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2018-07-19 21:20:39 +00:00
asiva b4146411d0 [VM/SDK]
- Switch the kernel isolate to run in Dart2 mode
- Refactor build rules so bootstrapping of the front end happens
  with a prebuilt dart sdk
- Refactor application snapshot build rules so the kernel application
  snapshot rule does not get into a cyclic dependency during the
  bootstrap stage

Change-Id: Id16b2859e0b299b2d689971d03a247cb94d0aa26
Reviewed-on: https://dart-review.googlesource.com/61660
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-07-19 20:48:18 +00:00
Devon Carew 7ddc4ce8ba Train the analysis server snapshot on pkg/analyzer_cli.
Change-Id: I07dcaec344d681a4abf8f09558d83a68efdd70e8
Reviewed-on: https://dart-review.googlesource.com/65575
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-18 21:32:09 +00:00
Devon Carew e84f061db8 Build a 2nd, --no-preview-dart-2, analysis server snapshot.
Change-Id: I991aabef1ecacdcd01a67d5dcb536e7592f6b5cc
Reviewed-on: https://dart-review.googlesource.com/65020
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-16 23:37:53 +00:00
Zach Anderson 7d7e39a952 [build] Move dart2js run for Observatory from python to GN
Change-Id: Ief90d6125e30c6bed808bacce521fc84957fddb9
Reviewed-on: https://dart-review.googlesource.com/63662
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-07-03 22:50:16 +00:00
Ryan Macnak 64641d014b [kernel] Resolve single_base_root at GN time.
In Flutter and Fuchsia, this repository is not at <build-dir>/../..

Change-Id: Ia2bf1f76d736125f1bb1a01068ed671b47da7abd
Reviewed-on: https://dart-review.googlesource.com/63451
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-07-02 20:47:23 +00:00
Bob Nystrom bebf12cec5 Fix outputs for dartdevc_test_pkg target.
Now that the dartdevk tests are run using an SDK and packages also
built using kernel, the test packages have a different output directory.

Fixes https://github.com/dart-lang/sdk/issues/33652

Change-Id: I6da4ec8291794185356343791407e3a1c3cb2d7a
Reviewed-on: https://dart-review.googlesource.com/62741
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-06-28 16:15:18 +00:00
Zach Anderson b15572933d Update checked-in Dart SDK to 2.0.0-dev.64.1
Updated to pass --dfe to invocations of the
checked-in SDK.

Change-Id: I47e122422926d235f166972669c8c2cb18a89735
Reviewed-on: https://dart-review.googlesource.com/62201
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-25 21:39:35 +00:00
Jacob MacDonald 9d3533ff72 snapshot the kernel worker in dart 2 mode and fix some dart 2 errors
Change-Id: Icf4e123e61bc265ba1d4c6620826e5f23241add0
Reviewed-on: https://dart-review.googlesource.com/62120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-06-25 21:36:15 +00:00
Nate Bosch f598e6933c Drop support for Dart 1 in pub
Closes #33187

Brings in the latest version of pub. There is still an issue with
invaliding old snapshots, but this version works better than the current
synced version.

Change-Id: I5c98b0277ea769baa83c3fee7ebfff2034ba9920
Reviewed-on: https://dart-review.googlesource.com/61983
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-06-23 01:00:05 +00:00
Zach Anderson 70ac1f90ec Revert "Update checked-in Dart SDK to 2.0.0-dev.64.1"
This reverts commit 47f394d61c.

Change-Id: I95cc7ab3cb9d112748460f793fd8906f216ac056
Reviewed-on: https://dart-review.googlesource.com/61986
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-06-22 22:28:39 +00:00
William Hesse 47f394d61c Update checked-in Dart SDK to 2.0.0-dev.64.1
Change-Id: Id4e8f4987f830a4f81fbb4d70afeeb68b3babd67
Reviewed-on: https://dart-review.googlesource.com/61521
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-21 22:42:42 +00:00
Alexander Markov 530f1f6512 [build] Possible fix for 'Error while initializing Kernel isolate'
The flaky errors

[215/296] ACTION //utils/dartdevc:stack_trace_mapper(//build/toolchain/linux:clang_x86)
FAILED: dev_compiler/build/web/dart_stack_trace_mapper.js
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/stack_trace_mapper.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/dart_stack_trace_mapper.js
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/stack_trace_mapper.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/dart_stack_trace_mapper.js
output: Error while initializing Kernel isolate
[216/296] ACTION //utils/compiler:dart2js_create_snapshot_entry(//build/toolchain/linux:clang_x86)
FAILED: gen/utils/compiler/dart2js.dart
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/utils/compiler/create_snapshot_entry.dart --output_dir=/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/gen/utils/compiler --dart2js_main=pkg/compiler/lib/src/dart2js.dart
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/utils/compiler/create_snapshot_entry.dart --output_dir=/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/gen/utils/compiler --dart2js_main=pkg/compiler/lib/src/dart2js.dart
output: Error while initializing Kernel isolate
[217/296] ACTION //utils/dartdevc:dartdevc_web(//build/toolchain/linux:clang_x86)
FAILED: dev_compiler/build/web/ddc_web_compiler.js
python ../../build/gn_run_binary.py compiled_action dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/main.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/ddc_web_compiler.js
Command failed: ./dart --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/pkg/compiler/lib/src/dart2js.dart /b/s/w/ir/cache/builder/sdk/pkg/dev_compiler/web/main.dart -m -o/b/s/w/ir/cache/builder/sdk/out/ReleaseIA32/dev_compiler/build/web/ddc_web_compiler.js
output: Error while initializing Kernel isolate

could appear due to stale kernel service snapshot.

The problem is that dart_action() used when building snapshots for dart2js and DDC
uses kernel service snapshot in Dart 2 mode, but it can't depend on kernel service
as it will create a circular dependency.

The short-term solution is to add dependency on kernel service snapshot to the rules
which use dart_action().

Change-Id: Icfe9148e24342f199370a09293e93806027b2a39
Reviewed-on: https://dart-review.googlesource.com/61742
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2018-06-21 22:09:13 +00:00
Nate Bosch 1a1ff9e666 Reverse the pub snapshot names
Fixes https://github.com/dart-lang/pub/issues/1931

Pub color output depends on the name of the entrypoint it is running
from, when the entrypoint went from "pub" to "pub2" it confused this
check and we stopped getting colors.

Since the Dart 1 version of the snapshot has a short remaining lifespan
we can switch it to the other name and let "pub" mean Dart 2 and
continue to behave like it used to.

Change-Id: I1851a4c908ffe2222ab5fe6802f4b81a63d7f9f1
Reviewed-on: https://dart-review.googlesource.com/61641
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-06-21 19:52:53 +00:00
asiva edcd3be290 Update aot_assembly rule to temporarily use --no-preview-dart-2
until it is updated to call gen_kernel to produce a kernel file
before creating the AOT snapshot.

Change-Id: I7e85c3b5189a6ba9ad66fc0c715b4bb3da1b299a
Reviewed-on: https://dart-review.googlesource.com/61082
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-19 20:06:32 +00:00
Zach Anderson 119236996a [build] Remove tools/compile_platform.py
It was just a shim around calling into Dart, which we are trying to
funnel through the templates in build/dart/dart_action.gni.

Change-Id: Ieb46ddddcbaacd01667e27a05cb7badd5bb5c0fd
Reviewed-on: https://dart-review.googlesource.com/61020
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-06-19 17:57:28 +00:00
asiva bc7220a4fd [VM] Turn dart2 on by default on the command line VM
- make Dart2 the default option for the command line VM
- add option --no-preview-dart-2 as a fallback option to run dart1
- change test scripts to use the executable dart for testing dart2 mode instead of
pkg/vm/tool/dart2
- adjust numerous build and test configurations

Change-Id: Id813fa5b71a89c7ec9335d3f6e83cfc9f35f86e7
Reviewed-on: https://dart-review.googlesource.com/58240
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 22:31:32 +00:00
Bob Nystrom 67695b9842 Fix the dependencies on the dartdevk_sdk build step.
Change-Id: If3c58294ef1ecd23a5aef4c0019a029e9a2fd7d9
Reviewed-on: https://dart-review.googlesource.com/60780
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2018-06-18 21:24:41 +00:00
Jenny Messerly 3ba3e2a752 Revert "switch to dart_action until prebuilt Windows Dart VM is updated"
This reverts commit 0bac650833.

Change-Id: Iccdb81c1b2bca2f7ef5de45105ae5b262f41129c
Reviewed-on: https://dart-review.googlesource.com/60740
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-18 20:31:44 +00:00
Sigmund Cherem 44650cc9eb Pass the location of vm_platform to compile_platform from the commandline.
This is to make it more transparent to use the same compile_platform template in
flutter/fushia builds.

Change-Id: I2a94c77bd2887cbc86f4547f7c8a0d54520a259b
Reviewed-on: https://dart-review.googlesource.com/60326
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-06-15 20:19:21 +00:00
Jenny Messerly 0bac650833 switch to dart_action until prebuilt Windows Dart VM is updated
Change-Id: I805dc84640929e1d588680960978171af291c2d5
Reviewed-on: https://dart-review.googlesource.com/60446
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-06-15 20:04:57 +00:00
Jacob MacDonald 541dd195bb Enable creating full kernel files in addition to outlines from the bazel worker for kernel.
Change-Id: I2dc5ef10046fd210a1a7cd7db44a22fc47654e17
Reviewed-on: https://dart-review.googlesource.com/58920
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-06-15 16:24:24 +00:00
Jenny Messerly 1ef4399df0 Run dartfmt --fix for dart2 on pkg/dev_compiler
This uses optional new/const and `=` in named argument defaults.

All changes are automated, except for:

- utils/dartdevc/BUILD.gn: run DDC build scripts with --preview-dart-2
- pkg/dev_compiler/tool/patch_sdk.dart: add a TODO that Analyzer doesn't
  supporting implicit const in libraries.dart
- pkg/dev_compiler/tool/input_sdk/libraries.dart: was not formatted due
  to the aforementioned Analyzer bug
- tools/bots/test_matrix.json: run DDC sourcemap suite in Dart 2 mode
- pkg/pkg.status: skip pkg/dev_compiler if running in Dart 1 mode

Change-Id: I9b80ccba0c2cc7b66efc662a0b16562e3660aee3
Reviewed-on: https://dart-review.googlesource.com/60402
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2018-06-15 00:28:13 +00:00
Sigmund Cherem 6779ea0cc6 GN rules: add libraries_specification_uri argument to the compile_platform template.
Change-Id: I58ac93cdd99a86009bd3ab3c7b37157104ae8aa4
Reviewed-on: https://dart-review.googlesource.com/60145
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-06-13 23:50:54 +00:00
Sigmund Cherem c30ce41ae6 Add hook to use single-root in fasta scripts and make use of it when creating
the dart2js platform files.

The main use-case right now is in compile-platform, but the way it is implemented
makes this available to any fasta tool.

This also adds resolveInputUri so we don't incorrectly treat supported URIs as file:* Uris.

Fixes https://github.com/dart-lang/sdk/issues/32633

Change-Id: I0ea3b1128352e72957b35823c6a1749ee418768b
Reviewed-on: https://dart-review.googlesource.com/56282
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-06-13 22:14:14 +00:00
Peter von der Ahé bd603ba3c6 Record dependencies via CompilerContext
Change-Id: Ia53314aecb0f3162ef2cb8ec451681651aa30d42
Reviewed-on: https://dart-review.googlesource.com/58202
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-06-13 20:49:54 +00:00
Peter von der Ahé 3d98cce456 Replace Severity.nit by Severity.ignored
Change-Id: Ib249c2e383c25173bd25b965bdb0d67c9a487cb4
Reviewed-on: https://dart-review.googlesource.com/59085
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-06-13 08:12:34 +00:00
Jenny Messerly 976aa4074b Run dartdevk against its own compiled SDK and packages
Currently we test dartdevk against SDK/packages that were compiled with
dartdevc (DDC+Analyzer). This CL migrates to having those files compiled
with DDC+Kernel. dartdevc testing is unchanged.

Most of the fixes are around things like special optimized annotations
used in our SDK code, that were not understood by DDK. Also some inline
JS type annoations were not correct.

Change-Id: Iccf4427e4b9beffd6d97a4be654253d91f6cb89e
Reviewed-on: https://dart-review.googlesource.com/57800
Reviewed-by: Vijay Menon <vsm@google.com>
2018-06-08 19:18:34 +00:00
Emily Fortuna 483c42b899 Switch dart2js to use dart 2 vm.
Change-Id: I39e807e10f53f647414d4e419b9f3ef3862bd651
Reviewed-on: https://dart-review.googlesource.com/57440
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-05-31 19:44:36 +00:00
Jenny Messerly a1f6aa8a3b improve speed of dartdevk SDK and ddc test package summary build
Renames the target to dartdevk_sdk (to match dartdevc_sdk), and switches
dartdevk_sdk and dartdevc_test_pkg to use prebuilt_dart_action.

Change-Id: Ib31c85c46743a005bb95cf888055a4d093ffe07f
Reviewed-on: https://dart-review.googlesource.com/57481
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-05-30 21:14:01 +00:00
Janice Collins 753d95453c Move to dartdoc 0.20.0 and enable preview-dart-2.
Change-Id: I8e1b7957a416644b8c7d02bee60c248e6c6d9827
Reviewed-on: https://dart-review.googlesource.com/57444
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2018-05-30 19:08:41 +00:00
Emily Fortuna e7bad54986 Make dart2js only run with 64 bit ints, not the larger ints from the vm.
Change-Id: I03887a0af963f1a8f68acff0428635fc130687f5
Reviewed-on: https://dart-review.googlesource.com/57041
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2018-05-30 17:21:49 +00:00
Vijay Menon 30ad3f66ce Set DDK to run on Dart-2 VM
Change-Id: I0c0558996c5d6d6c739ded5e5c8b2554a4cd7b04
Reviewed-on: https://dart-review.googlesource.com/53320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-05-24 21:51:25 +00:00
Bob Nystrom 7c59fe6332 Flip dartfmt to run in Dart 2 mode.
Change-Id: I245dce2510ccf99cd443b4d27828790dabe54e8a
Reviewed-on: https://dart-review.googlesource.com/56283
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-05-23 20:45:03 +00:00
Sigmund Cherem 8c0f5747a0 Add build_integration package and move multi_root_file_system there.
This is following the design discussion we had a few months ago.

Change-Id: I48b2e82af33d10b9cd1e599e1b3a4e8e419417c8
Reviewed-on: https://dart-review.googlesource.com/56035
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-05-22 20:09:24 +00:00
Zach Anderson a9ab8f4e7d [GN] Hack around Dart 2 application_snapshot deps issue
For Dart 2 snapshots, application_snapshots() hardcodes a deps on
//utils/kernel-service:copy_kernel_service_snapshot

related #33167

Change-Id: I9a598e83a3e8ebb9a27bfe83132f3a957f2fea0e
Reviewed-on: https://dart-review.googlesource.com/56161
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-22 17:47:16 +00:00
Devon Carew eeec6466b6 Convert the command-line analyzer to a dart 2 snapshot.
Change-Id: Ieb5cd8971494a8a6ffc07c0fd4dde07cfb6f5373
Reviewed-on: https://dart-review.googlesource.com/56034
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-05-22 15:44:04 +00:00
Nate Bosch 2ff2af7921 Allow running pub with --preview-dart-2
- Make a snapshot in Dart 2 mode
- Check for the VM argument `--preview-dart-2` and run the correct
  snapshot

Towards fixing https://github.com/dart-lang/sdk/issues/32188

Change-Id: I56d5e7f268ff40b80783fae571981705536280f2
Reviewed-on: https://dart-review.googlesource.com/54743
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2018-05-18 20:27:29 +00:00
Vijay Menon 9f6e8a3a96 Move DDC to Dart 2 snapshot
This is not yet working.

Change-Id: I86990eb7a8758d9bccee45997f30286d72a8925f
Reviewed-on: https://dart-review.googlesource.com/54532
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-05-18 19:13:08 +00:00
Zach Anderson 24f5ca0187 [fuchsia] Use Fuchsia prebuilts
This is still using the prebuilts from Dart's bot for building
the Observatory. Instead, we should probably build/take the
Observatory from Fuchsia's bots.

Change-Id: I466061d6f7176e2b76912d303ef0b0c518d19e1e
Reviewed-on: https://dart-review.googlesource.com/55580
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-05-17 20:54:06 +00:00
Zach Anderson 50fbd1a3ed [GN] Fix dartanalyzer_aot target
Change-Id: Ie8ab10fdf44a8376b1fa676b2fc4c8dc1c034416
Reviewed-on: https://dart-review.googlesource.com/53695
Commit-Queue: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-03 23:50:04 +00:00
Zach Anderson 4877587346 [GN] Uses dart_action.gni instead of compiled_action.gni.
This avoids conflicts with client repos that have a file
//build/compiled_action.gni with something different in them.

Change-Id: I133f66b0989bcb547cb8eed8710a88e2c1384bd7
Reviewed-on: https://dart-review.googlesource.com/53440
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-05-03 21:07:13 +00:00
Ryan Macnak 61c226b4ea Only create Goma's analyzer on Linux.
Bug: https://github.com/dart-lang/sdk/issues/33011
Change-Id: I9bc294fb4cda2b2c8b2d552feb18c7ce6af28695
Reviewed-on: https://dart-review.googlesource.com/53341
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-05-02 16:27:15 +00:00
Ryan Macnak 61b15fede8 [build] Remove unnecessary inputs from uses of application_snapshot.
These dependencies are tracked via a depfile generated along with the snapshot.

Change-Id: I4245a982212a5aff28aea8456d0219808df54af0
Reviewed-on: https://dart-review.googlesource.com/51245
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-16 21:13:09 +00:00
Jenny Messerly 5dd283e783 fix #32270, DDC tests can now work with preview-dart-2
Also removes unsafe-force-compile for DDC's selfhost during snapshot
build, and fixes DDK's snapshot to train by selfhosting.

This does not enable preview-dart-2 for DDC/DDK's snapshots or on
the buildbots yet.

Change-Id: Id0b395eb67677d0e69dc5e827536a9039bc95816
Reviewed-on: https://dart-review.googlesource.com/51206
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-16 07:03:07 +00:00
Ryan Macnak 1db1ac4863 Produce a single-file analyzer for Goma.
Change-Id: I5cfdd9b6d5b01157abc1468f905313adfd1063e6
Reviewed-on: https://dart-review.googlesource.com/50360
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-04-11 18:31:36 +00:00
Alexander Thomas 3851591642 [infra] Keep comments intact when updating status files.
* Preserve empty lines in the file header.
* Add empty entry to the tool's newly created sections.
* Remove extra empty line at the end of the file.

Change-Id: I271583774d5f5497025a9d85bcadf8b0b9e39e81
Reviewed-on: https://dart-review.googlesource.com/37600
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2018-04-10 19:03:21 +00:00
Aske Simon Christensen 20ea3f5d69 Pass a list of context messages in onProblem callback.
Change-Id: I518e229eba261a999f43ab7ccd8cb3cfc8aae7b1
Reviewed-on: https://dart-review.googlesource.com/44541
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-05 13:29:16 +00:00
Aske Simon Christensen 83ef97f873 Wrap a formatted message with line and column in a FormattedMessage.
Change-Id: I9df1bc7ee839d6310e3670d99e813fe969fe1cb4
Reviewed-on: https://dart-review.googlesource.com/44430
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-04-05 13:29:16 +00:00
Sigmund Cherem 07d2c9f287 Add server category for dart2js
Change-Id: I077da86aff4420aba1323e98d6cde08ac871f6f1
Reviewed-on: https://dart-review.googlesource.com/47721
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-03-23 00:40:55 +00:00
Peter von der Ahé 4f2bdff90b Rename Program to Component
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-03-15 12:22:23 +00:00
Peter von der Ahé 0f1c576dd9 Fix dart2js dependencies after making kernel default
Change-Id: I8d59ab0752955b01a0ca81c998bb42b5d1d18d83
Reviewed-on: https://dart-review.googlesource.com/46741
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-03-15 12:10:23 +00:00
Sigmund Cherem 7fd5294bb3 Add rules to build dart2js platform in strong mode
This must land after we make the libraries strong clean.

Change-Id: I3a49a2be3b2bcb15842434266f55ce49e3800fc6
Reviewed-on: https://dart-review.googlesource.com/42140
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-03-02 22:19:19 +00:00
Alexander Aprelev ee15c8eb68 Move frontend_server from flutter to dart sdk.
Change-Id: I7f8b36977b448f08caf58b88b3fda43fab364514
Reviewed-on: https://dart-review.googlesource.com/43888
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2018-03-01 22:39:39 +00:00
Vijay Menon ea7c7988e3 Don't inline source maps into the SDK
Change-Id: Ia4e8673cf0c023353b27a3c0a947b09e04ec09c0
Reviewed-on: https://dart-review.googlesource.com/44320
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2018-03-01 03:21:37 +00:00
Alexander Markov a681867054 [vm/kernel/aot] Prepare to enable type flow analysis in Flutter
* Introduce --tfa option in gen_kernel and 'useGlobalTypeFlowAnalysis'
  parameter in compileToKernel(), which is used in Flutter's frontend
  server.

* Split entry_points_extra.json into 2 parts: common to all embedders
  and specific to a standalone VM (entry_points_extra_standalone.json).

* Extract generation of entry points JSON files into a separate .gni
  file, introduce action to generate entry points JSON using
  gen_snapshot instead of dart_bootstrap (required for Flutter), and
  action to copy checked-in extra entry points file.

Issue: https://github.com/dart-lang/sdk/issues/30480
Change-Id: Ie0af9d7128d7fc0e3a9d623fd3c1589e87c83f5c
Reviewed-on: https://dart-review.googlesource.com/43884
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-02-27 19:59:19 +00:00
Vyacheslav Egorov 0b5c52456a [testing] Make dartkp configuration work on Windows
Change-Id: I4a09994a1b79a7d857a854e3dcc1fe24068ffdec
Reviewed-on: https://dart-review.googlesource.com/43671
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2018-02-26 17:31:48 +00:00
Zachary Anderson e842c9b0b5 [infra] Use dart_action() instead of python scripts
This change shifts logic for invoking Dart scripts during the build
from a couple of python scripts to a new template called dart_action().

Change-Id: Ic0818122cd7317cbd22a7255d880fe8f87271b7e
Reviewed-on: https://dart-review.googlesource.com/39260
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-02-06 21:51:13 +00:00
Sigmund Cherem c241078b10 Cleanup dart2js snapshot generation
- I beleive create_snapshot.dart is no longer in use: it was replaced by
  create_snapshot_entry + GN application snapshot rules.

- utils_wrapper seems to be something really historical (maybe we thought we
  were going to only have a single wrapper for all of our tools back in the
  day). The only use of it is to track build dependencies in test.py, which I
  think we can do by directly using dart2js.dart.snapshot instead.

Change-Id: I6e32403eb8c5d40f0b58e48ae5ff6fb60fd855b3
Reviewed-on: https://dart-review.googlesource.com/34923
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2018-01-17 00:35:34 +00:00
Sigmund Cherem 0c04eb53c7 Disable int64 when running dart2js
The goal is to renable it as soon as we migrate our constant-evaluator and
constant folding to use Bigint.

Change-Id: I3bba1bbe07517e9cb496896b3417f58173878d62
Reviewed-on: https://dart-review.googlesource.com/34302
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2018-01-16 19:52:22 +00:00
Siva Chandra 4b73d12082 Link kernel service dill with the command line dart executable.
This linked in kernel service dill file will be used to load the kernel
isolate if the attempt to lookup the kernel service snapshot fails. The
kernel service snapshot is looked up in the following order.

1. If the "--dfe" option is specified, the file specified is used.
2. If the kernel service snapshot is found next to the executable,
then it is used.
3. If the kernel service snapshot is found in the "snapshots" directory
next to the executable, then it is used.

Change-Id: I5a0e757eb27b26a274b22b4bc36350fee59a100f
Reviewed-on: https://dart-review.googlesource.com/32446
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2018-01-12 20:40:41 +00:00
Aske Simon Christensen 9bdcc40f69 Rename PhysicalFileSystem to StandardFileSystem.
Preparation for data URI support. For clarity, this is just a rename.

Change-Id: Ibbd8da05d1a7106b5ec7c0ea9c1e13a95a89d1bd
Reviewed-on: https://dart-review.googlesource.com/33460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-01-11 11:23:25 +00:00
Vijay Menon bedf7121e0 Wire build rules to generate ddc-kernel versions of SDK files
Change-Id: I7d39bce7a3382c7a332ecdc4886bb08dabfdf09a
Reviewed-on: https://dart-review.googlesource.com/33900
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-01-10 18:34:38 +00:00
Jenny Messerly 303d71f53f fixes #31575, DDC kernel backend can now compile the SDK to JS
Also adds this to the build script, so we can eventually replace the existing SDK compile step with this new one.

Change-Id: Iba0720df5bbab302d2fdd0b5aeeb182de152cc98
Reviewed-on: https://dart-review.googlesource.com/32504
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-01-05 21:32:50 +00:00
Sigmund Cherem 95477b835c Add support in summary-worker to filter out files that belong to other summaries
Bug:
Change-Id: I429f8b6788feed75ee2a6b464c6d7ed870b329ce
Reviewed-on: https://dart-review.googlesource.com/32002
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2018-01-03 20:29:04 +00:00
Sigmund Cherem 5e4ec2c8ab bazel worker fixes: add flag to set multi-root-scheme, resolve input uris correctly
Bug:
Change-Id: I4d680bdb56f54479cbf423dc1bc29dcdb6e273f6
Reviewed-on: https://dart-review.googlesource.com/30926
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-21 19:49:11 +00:00
Sigmund Cherem 22298629e8 Add unstable API for bazel summary worker and move the actual worker out of package:front-end
Bug:
Change-Id: I0a64d3de46ef55e8185e723d6111fa315ad286ca
Reviewed-on: https://dart-review.googlesource.com/30621
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2017-12-21 19:09:11 +00:00
Zachary Anderson 8c21a6dd6b [GN] Use the prebuilt toolchain to build analyzer summaries
This will speed up cross-builds.

TO-660

Change-Id: Idb1bf8839ffc3443ff620fbe94b733fe71d6bf84
Reviewed-on: https://dart-review.googlesource.com/30901
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-12-20 22:03:39 +00:00
Sigmund Cherem 414bad86df Directly create dart2js platform files using its patch files
Change-Id: I1c7d59968bfafeeb5a8b5252fa2d47e3c05b893e
Reviewed-on: https://dart-review.googlesource.com/27404
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>
2017-12-19 20:31:57 +00:00
Zachary Anderson 786508e5cb [GN] Try to fix dartdevc dart invocation
related #31613

Change-Id: Ib01771cc85be37469e7cd862ec3b25f35769db90
Reviewed-on: https://dart-review.googlesource.com/30502
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-12-19 17:59:13 +00:00
Karl Klose 2132089ec4 Delete devk build file
Change-Id: If5cd723815deb27684d79d7d129e0bdeaf809e9f
Reviewed-on: https://dart-review.googlesource.com/28661
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2017-12-13 09:00:24 +00:00
Jens Johansen 5072cba017 [DDC-kernel] Train snapshot on an actual compilation run
The previous situtation of training it by running "--help" doesn't
give much.
This trains it on a small input file (i.e. theoretically not as good as
training it on big input file, but better than the --help situation).
On a local hack where I "forced" the compilation of dartdevc.dart itself
(i.e. a big input ifle) as the training, it shaved off a few extra
seconds, but nothing major.

This CL, running language_2 locally this takes it from
[04:08 | 100% | + 5171 | -    0]
to
[03:12 | 100% | + 5171 | -    0]


Bug:
Change-Id: I9397e11027be3dee3c080be7cdff22ea2f64b654
Reviewed-on: https://dart-review.googlesource.com/28622
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-12-13 08:13:26 +00:00
William Hesse befc04f774 Fix error in dev compiler build script
Bug:
Change-Id: I269b8ceed5fe055081cbad1a83a8f98fa4d7d031
R=rnystrom@google.com,athom@google.com
Reviewed-on: https://dart-review.googlesource.com/28640
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-12-12 12:27:23 +00:00
Karl Klose 7b2678bd17 Fix paths in sdk/bin/dartdevk.bat
R=jensj@google.com

Change-Id: I3690674bf334f257b78916b88813d220330c72af
Reviewed-on: https://dart-review.googlesource.com/27761
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2017-12-12 06:51:27 +00:00
Ryan Macnak 76842f7a70 [vm] Fix leak when generating snapshot depfile.
Use depfiles for the SDK's application snapshots.

Add check that we don't try to create a script snapshot after loading from an app snapshot.

Bug: TO-596
Change-Id: Ib4209c3062dbe0f3c37b8f65e5a50ca64544a39b
Reviewed-on: https://dart-review.googlesource.com/26043
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-12-05 17:09:52 +00:00
Jacob MacDonald 15148dde93 compile and ship the front_end blaze worker entrypoint as a snapshot
Bug:
Change-Id: Id8611e484df73a1ffb36baca5c529327bbb336cb
Reviewed-on: https://dart-review.googlesource.com/24560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2017-11-29 23:40:35 +00:00
Karl Klose 2d48be6e62 Invoke dartdevk.dart through shell script that locates the 'dart' executable
Change-Id: Id13cc838b67785b12f95d19b480a6a830ad5c003
Reviewed-on: https://dart-review.googlesource.com/24120
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2017-11-29 11:27:50 +00:00
Ryan Macnak d366f9619a [vm] Toward deterministic builds.
- Remove random build-id.
 - Replace build time in embedded version string with commit time.
 - Remove timestamps from Observatory tarball.
 - Zero-initialize skipped bytes in snapshot streams.
 - Fix uninitialized fields in PatchClass, Script and Library.
 - Disable (under flag) random identity hashes and concurrent GC.

Bug: https://github.com/dart-lang/sdk/issues/31427
Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1
Reviewed-on: https://dart-review.googlesource.com/22901
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-23 00:07:56 +00:00
Bob Nystrom 37cd5e33ce Don't spew DDC SDK build warnings when building.
Change-Id: I56b829e218a970ca8186910481422a5b9d25150c
Reviewed-on: https://dart-review.googlesource.com/22720
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2017-11-21 21:58:37 +00:00
Bob Nystrom d87125993a Fix the SDK build when a prebuilt binary isn't available.
This should, I hope, fix the debianpackage bot.

Change-Id: I39347cf64aba1d99c882d78bf7cf60483b3e85c5
Reviewed-on: https://dart-review.googlesource.com/22301
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2017-11-21 16:46:41 +00:00
Bob Nystrom 68dc77f456 Build DDC's SDK as part of the regular build.
This involves a few main pieces:

- Add code to the GN scripts to generate DDC's patched SDK and then
  compile it to summaries and JS in the build output directory.

- Add support to the underlying DDC build scripts to support controlling
  which files are built where.

- Update test.dart to use the DDC SDK from the build directory.

- Update create_sdk to use the built SDK instead of the checked in one.

- Fix various internal DDC tools to build their own copy of the SDK
  (since they can't easily find the one in the build directory because
  it's path if config-specific) and use those.

- Delete the checked DDC SDK JS and summaries.

I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.

The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.

Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-20 23:24:07 +00:00
Alexander Markov 58ffdbf5fc [VM] Move kernel service to pkg/vm, populate pkg/vm with necessary files
* kernel-service.dart is moved to pkg/vm/bin and renamed to
  kernel_service.dart

* LICENSE, pubspec.yaml and analysis_options.yaml added to pkg/vm.

* Kernel isolate name is corrected to be independent of URI passed
  in --dfe VM option.

Change-Id: I5b7b860297314e240e557af80913e7ac3e6324ad
Reviewed-on: https://dart-review.googlesource.com/21260
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-17 17:45:03 +00:00
Zachary Anderson a99cdabd00 Reland: [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

Relanding to fix bad toolchain conditions in dart_os_config and
dart_arch_config.

TO-549

Change-Id: I276f47d9071233acb98f6029a4666da0cee33d7d
Reviewed-on: https://dart-review.googlesource.com/18361
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 19:02:18 +00:00
Zach Anderson 8f5d55623e Revert "[GN] Adds dart_host_sdk_toolchain argument"
This reverts commit 8fc90bd3bc.

Broken precomp bots due to wrong toolchain condition in dart_arch_config and dart_os_config.

Change-Id: Ic5c75f9ca3a0d4f316678354da44d1fcca10499d
Reviewed-on: https://dart-review.googlesource.com/18360
Reviewed-by: Zach Anderson <zra@google.com>
2017-11-02 18:03:27 +00:00
Zachary Anderson 8fc90bd3bc [GN] Adds dart_host_sdk_toolchain argument
Setting this build argument to something other than host_toolchain will
cause the build target create_host_sdk to be exposed. That target will
build the Dart SDK with the toolchain specified by
dart_host_sdk_toolchain.

TO-549

Change-Id: Ida92521724cf7af34b34fb8c6d3514a226c48dd4
Reviewed-on: https://dart-review.googlesource.com/18145
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2017-11-02 17:27:19 +00:00
Zachary Anderson 02eebb0c69 [GN] Remove the dart_host_toolchain arg
This flag can be removed after: https://github.com/flutter/engine/pull/4308
lands.

Change-Id: I4730aaece1e43cf71ea569bda78c2cd546a66358
Reviewed-on: https://dart-review.googlesource.com/18060
Reviewed-by: Alexander Aprelev <aam@google.com>
2017-11-01 21:13:28 +00:00
Bob Nystrom cf8a477cb7 Support test packages in dartdevk in test.dart.
This allows dartdevk to compile tests that import packages like expect.
There are a few pieces to this:

- Add support to build_pkgs.dart to build the kernel summaries for each
  test package (in addition to the analyzer summaries it already
  builds).

- Plumb that through the dartdevc_test target in the GN build as well.

- While we're at it, use GN to build the ddc_sdk.dill file and have
  test.dart load that one instead of the manually built one from calling
  ./tool/kernel_sdk.dart.

- Add command-line arguments to dartdevk for passing in the path to the
  SDK summary and the other summaries to compile against.

- Fix a little typo in processed_options.dart that was preventing it
  from resolving "package:" URIs.

- In test.dart, when compiling a test, link in the summaries for all of
  the test packages.

At runtime, it still uses the JS for those packages generated from the
old analyzer-based front end since the kernel-based compiler isn't
complete enough to compile any of those packages yet.

With all of this, if I change a test to:

  import "package:expect/expect.dart";

  main() {
    Expect.equals("a", "b");
  }

Then it compiles but fails at runtime. The compiler is completing, but
the generated code has some bugs. I don't know enough to fix them
myself, but here's what I've found out:

- In _libraryToModule(), the Library we get from kernel has a null
  fileUri, so this returns an empty string. That in turn means the
  generated JS tries to use "$" as the module name.

  Using this works around it temporarily:

      if (moduleName.isEmpty) moduleName = library.name;

- In _emitTopLevelNameNoInterop(), it doesn't handle the case where the
  NamedNode is a static method on a class. It just generates the library
  and method name, skipping the class, so "Expect.equals(1, 2)" gets
  compiled to "expect.equals(1, 2)" instead of
  "expect.Expect.equals(1, 2)".

Change-Id: I6bd9d98bc9706965160d8fb7cf70b20eeebab3a8
Reviewed-on: https://dart-review.googlesource.com/16687
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-10-27 21:25:58 +00:00
Vyacheslav Egorov 0fe889dbd7 [VM] Pass --strong down to DFE isolate
Bug: https://github.com/dart-lang/sdk/issues/31147
Change-Id: Id8dbdadc1f69213604572efc815d45675d49734e
Reviewed-on: https://dart-review.googlesource.com/15883
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-23 11:27:47 +00:00
Peter von der Ahé dc250fe168 Address comments from CL 11506.
Change-Id: Ie4e06ec5badd7f06cf8c38096b0ee87c917b6d8a
Reviewed-on: https://dart-review.googlesource.com/11980
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-20 13:59:58 +00:00
Peter von der Ahé 7e40ae990b compile_platform should work when there's no checked-in dart binary.
Change-Id: Ib3338e616b05b9b1a7462c9f484402faca0fc13b
Reviewed-on: https://dart-review.googlesource.com/13983
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-17 11:29:50 +00:00
Peter von der Ahé b96ac4520a Update most clients to use computePlatformBinariesLocation.
Change-Id: I6e6960c471b2fab3f0cd8a672da05d7699217410
Reviewed-on: https://dart-review.googlesource.com/12291
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-17 10:48:40 +00:00
Peter von der Ahé 3e08354f85 Remove stray reference to :patched_sdk.
Change-Id: If5a1ea7082eae52e109f9b7272b2fcd0a866ba97
Reviewed-on: https://dart-review.googlesource.com/12000
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-06 16:19:40 +00:00
Peter von der Ahé 16aa720d27 Remove compiling platform.dill from patch_sdk.dart
This separates compiling platform.dill files from the patch_sdk.dart
script. The motivation for that is that I'm working on reading patch
files directly from Fasta, so we can completely remove the build step
for generating patched_sdk and dart2js_patched_sdk.

Short-term this should allow Paul to add a strong-mode version of
platform.dill without causing to many conflicts with my work on
patches.

Change-Id: I1150845b2986348d4fffe27092701d8a9b57ea54
Reviewed-on: https://dart-review.googlesource.com/11506
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-06 15:34:37 +00:00
Alexander Markov 9ee73fe322 [Kernel] Remove outdated and duplicated front-end Targets
This CL replaces outdated VmTarget and FlutterTarget with VmFastaTarget
and FlutterFastaTarget. 'Fasta' suffix is droped from target names.

The new FlutterTarget extends VmTarget, so they share more code.

Change-Id: Id79956698a889c9a49b8a67914f1f96a731407ab
Reviewed-on: https://dart-review.googlesource.com/9423
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2017-10-04 18:02:49 +00:00
Florian Loitsch 38bf70d7ac Use generic functions in zones.
Migrated from https://chromiumcodereview.appspot.com/2893893002/

Change-Id: I0bd6dc1438eb1e6762e7760a08b5a760b07d4b10
Reviewed-on: https://dart-review.googlesource.com/4942
Reviewed-by: Florian Loitsch <floitsch@google.com>
Commit-Queue: Florian Loitsch <floitsch@google.com>
2017-09-20 15:46:06 +00:00
Jens Johansen d854c77e58 [kernel] Only serialize non-external libaries and sources from those.
Previously the VM couldn't handle external libraries, but that was
fixed in 2f49198520.

Part of the CL was reverted though because the compilatin was changed
to using an outline instead of the platform which doesn't work.
What does work though, is not including the external libraries in the
output.

This CL makes the following changes:

* Don't include external libraries in the output (by not setting all
  libraries to be non-external).

* Only writes the sources actually used to the binary (i.e. whatever
  libraries left out because they were external will not contribute
  source code either).

* Cleanup of now unused code.


Timings (only run once though):


Without this CL (but with the CL it's based on):

$ time python tools/test.py -m release -cdartk language -j6
Test configuration: dartk_vm_release_x64
[05:43 | 100% | + 3504 | -    0]

real    5m43.597s
user    33m48.152s
sys     9m34.140s


Only the "utils/kernel-service/kernel-service.dart" part of this CL:

$ time python tools/test.py -m release -cdartk language -j6
Test configuration: dartk_vm_release_x64
[04:55 | 100% | + 3504 | -    0]

real    4m55.684s
user    29m54.360s
sys     8m7.408s


Entire CL:

$ time python tools/test.py -m release -cdartk language -j6
Test configuration: dartk_vm_release_x64
[04:20 | 100% | + 3504 | -    0]

real    4m20.416s
user    27m17.320s
sys     6m53.472s

Change-Id: Ie9c5bfa958e558a5007784e821a0b58d417bae55
Reviewed-on: https://dart-review.googlesource.com/3161
Reviewed-by: Samir Jindel <sjindel@google.com>
2017-09-06 11:56:24 +00: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
Alexander Aprelev ba543167ec Pass path to platform kernel binary to kernel-service.
Currently kernel-service derives path to platform binary from path to dart executable. It doesn't always work, so dartk tests fail.

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

BUG:http://dartbug.com/30456
Review-Url: https://codereview.chromium.org/3001013002 .
2017-08-17 09:49:48 -07:00
Alexander Aprelev e25898d963 Allow caller of application_snapshot to override .packages.
This will be used in flutter engine to build snapshot of frontend server dart app.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2995053002 .
2017-08-15 16:10:20 -07:00
Alexander Aprelev 747348caec Remove unused import statement.
This is a follow-up to a9afb54d6d to fix the tests.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2999983002 .
2017-08-15 10:06:57 -07:00
Alexander Aprelev a9afb54d6d Revert "Revert "Introduce IKG into kernel-service to support incremental compilation.""
This reverts commit c35510d835
with fix for the build - remove implicit temporary array in TestCase::LoadTestScript.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2998963002 .
2017-08-15 09:03:48 -07:00
Alexander Aprelev c35510d835 Revert "Introduce IKG into kernel-service to support incremental compilation."
This reverts commit f596d440f5.

BUG=

Review-Url: https://codereview.chromium.org/3002553003 .
2017-08-14 14:15:41 -07:00
Alexander Aprelev f596d440f5 Introduce IKG into kernel-service to support incremental compilation.
This CL also adds few hot-reload incremental kernel files tests(some pass, one is failing), which are useful to track progress of hot reload functionality in Flutter setting.

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

Review-Url: https://codereview.chromium.org/2993013002 .
2017-08-14 14:06:15 -07:00
Zach Anderson 0394d3a0cf [infra] Begin removing gyp
This CL begins removing gyp from Dart's tree.

Removing gyp will go in three stages:
1. Remove unused .gyp and .gypi files.
2. Translate *_sources.gypi files to *_sources.gni files
3. Remove //third_party/gyp from DEPS

This CL is stage 1.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2992593002 .
2017-08-04 22:19:35 -07:00
Sigmund Cherem de7e14436c Include platform.dill files in sdk builds
R=zra@google.com

Review-Url: https://codereview.chromium.org/2984243002 .
2017-07-26 14:50:49 -07:00
Siva Annamalai 33c50e9374 1. Correctly set root_library based on the application script URI instead of looking for the library that has the 'main' method.
2. Adjust the Dart front end to not require a 'main' method when the in memory filesystem is used, this allows execution of VM unit tests which all do not necessarily have a 'main' method (integrated CL from siggi)

3. Change kernel reader to not look for a 'main' methos when Dart_LoadKernel is called.

4. Change Dart_LoadScript to also support loading of dart programs when Dart front end is used

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

Review-Url: https://codereview.chromium.org/2948273002 .
2017-07-19 18:09:19 -07:00
Sigmund Cherem 1aa139bc94 Unifying compiler context
Changes in this CL:
 - Updated CompilerContext:
    - it now contains a ProcessedOptions object

    - it no longer depends on CompilerCommandLine/CommandLine

    - it delegates to ProcessedOptions.report so all error reporting
      goes to one single place.

    - use "withContext" term instead of "withGlobalOptions" to be
      more clear about the intent

 - Changes in public API
    - added more options that correspond to flags in command-line
      fasta tools

    - default onError is different: we now use the
      command_line_reporting report, which prints and throws
      on fatal messages, but doesn't throw eagerly on all messages
      as before.

    - introduced "printMessages" option: make it easy to have
      both onError + command_line_reporting  (kernel-service.dart
      is the main use case at this time, other ideas welcome!)

    - renamed CompilationError to CompilationMessage

 - Other changes

    - set exit code is done on report, not on format
    - fixed corner cases not covered in previous CL
        - error reporting with missing-main needs to happen with
          a context
        - missing error cases when inferring .packages and input
          URIs are not file:* URIs

Ideas for follow up after this CL:
 - combine ProcessedOptions and CompilerContext into a single class
   (or extend one from the other)
 - switch onError to a stream

R=ahe@google.com

Review-Url: https://codereview.chromium.org/2982093003 .
2017-07-18 17:02:59 -07:00
Bob Nystrom 1d8c3af663 Delete old tests that aren't used and/or useful any more.
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2976313002 .
2017-07-18 14:12:57 -07:00
Sigmund Cherem 2465864241 simplify and remove unnecessary checks in kernel service
Checks here should also be handled internally by the front-end, so no need to do
them twice.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2979053002 .
2017-07-17 15:31:33 -07:00
Sigmund Cherem ebd9440b18 support resolving .packages in FE
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2979003002 .
2017-07-14 12:54:35 -07:00
Sigmund Cherem cc567226a8 Fix remaining failures from earlier CL (that switched kernel-service and dart2js
to use the public frontend apis.)

 * As part of the refactor I made kernel-service truncate the .dill file it
   sends to the VM so it excludes the SDK code. This works in most cases, but
   caused 26 failures in debug mode. The error matches what I saw in Issue
   #30111.

 * Some Dart2js tests using --use-sdk failed to run because they tried to find
   platform.dill incorrectly. Our bots do have it available, we just have
   to make sure to resolve it based on the build configuraiton and not based on
   the SDK executable.

Review-Url: https://codereview.chromium.org/2974683003 .
2017-07-08 10:26:49 -07:00
Sigmund Cherem b71bd543a9 Reapply "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.""
Original CL had a bug that wasn't visible unless you delete your
out/ReleaseX64/patched_sdk folder.

Patchset #1 is the original CL, patchset #2 shows the fix.

This reverts commit 4aadfe09df.

BUG=

Review-Url: https://codereview.chromium.org/2976543002 .
2017-07-07 15:32:24 -07:00
Sigmund Cherem 4aadfe09df Revert "Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service."
Reason: broke VM bots, still investigating.

This reverts commit 610d081947.

TBR= paulberry@google.com

Review-Url: https://codereview.chromium.org/2979463002 .
2017-07-07 15:21:37 -07:00
Sigmund Cherem 610d081947 Tweak public APIs and use them in patch_sdk, dart2js, and kernel-service.
This CL tweaks the public APIs in package:front_end, and
starts using those APIs outside the package. For example, this
removes 9 uses of DillTarget, so it is not longer mentioned
outside pkg/front_end and the analyzer_target.

Actual changes:
 - in package:front_end

   * added kernel_generator_impl: new file contains code that
     used to be in kernel_generator. Code has some modifications:
     it uses a single canonical-root when loading summaries, and
     it supports generating both outlines and kernel in one go.

   * removed code that didn't belong here:
     a. most of calculating deps for .GN moved to patch_sdk
     b. vm-specific outcomes moved to kernel-service

   * updated how `native` is implemented, so we can more easily
     support dart2js and ddc

   * updated how we check where `int`, `bool`, etc can be implemented.

   * added support "hermetic mode" in modular builds
     ('chaseDependencies = false' option)

   * moved `trim` step out of fasta, and for now call it only within
     the public API. This is not yet exposed, and I stopped covering it in
     most tests (now only covered in shaker tests). The plan is to add
     tests for the public API covering this in the future.

   * removed `uriToSource` when serializing outlines

   * added unit tests for public APIs

 - patch_sdk
   * use the public API to craete platform.dill, outline.dill (now
     500K insted of 3Mb because it excludes sources), and vmservice_io.dill
   * moved here logic internal to .GN

 - kernel service
   * use the public API
   * moved here logic that depends on VM internals (e.g. status enum,
     compilation results)

 - package:compiler
   * use the public API in tools and unit tests
   * simplified patched-sdk generation: no more extending fasta's internals

 - package:kernel
   * fix bug in deserialization: initializers and other lists were
     overwritten accidentally with external definitions.
   * updated unit tests, moved shared logic to frontend/src/fasta/testing

R=johnniwinther@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2953703002 .
2017-07-07 15:14:22 -07:00
Bob Nystrom 0b2c9b048d Dynamically load packages for dartdevc tests in test.dart.
This involves a few pieces:

- Add support to DDC for specifying the module name associated with a
  given summary. This lets test.dart invoke DDC using summaries in the
  build directory outside of the directory containing the test itself.

- Add support to the build scripts for building the packages. This adds
  a new GN target that builds everything needed to run test.dart with
  dartdevc. In particular, it invokes build_pkgs.dart to compile the
  relevant packages to JS+summary so that the tests can use them.

  This requires some changes to build_pkgs.dart so it can output to a
  given directory.

- In test.dart, when tests are compiled with dartdevc, pass in the
  summaries for the packages so they don't get compiled in. Then, when
  the test is run, configure require.js with the right paths to their
  JS files so they can be loaded.

  I also removed a bunch of unneeded buildDir parameters being passed
  around the various CompilerConfiguration class methods now that they
  have direct access to the configuration.

Fix #29923.

R=vsm@google.com, whesse@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2955513002 .
2017-06-29 13:45:57 -07:00
Florian Loitsch 978213d427 Revert "Make Zone API strong mode clean."
This reverts commit 0b35711d48.

BUG=

Review-Url: https://codereview.chromium.org/2963743002 .
2017-06-28 13:31:32 +02:00
Florian Loitsch 0b35711d48 Make Zone API strong mode clean.
Review-Url: https://codereview.chromium.org/2959163002 .
2017-06-28 13:16:39 +02:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Alexander Aprelev 4f9b25e410 Fix previous CL where dart_bootstrap was accidently changed to dart_bootstrap_host_arch.
Also fix two missed places where host_toolchain should be replaced with dart_host_toolchain.

R=rmacnak@google.com

BUG:flutter/flutter#10841
Review-Url: https://codereview.chromium.org/2953873002 .
2017-06-22 13:17:53 -07:00
Alexander Aprelev 8cd713bed3 Introduce dart_host_toolchain argument for generate_patch_sdk.gni. This allows for Flutter build to make sure that host_toolchain used for patched_sdk generation word size matches target platform.
Flutter Dart in product configuration doesn't allow --checked option. So remove '--checked' from invocation.

R=rmacnak@google.com

BUG:https://github.com/flutter/flutter/issues/10841
Review-Url: https://codereview.chromium.org/2944103003 .
2017-06-22 12:41:31 -07:00
Zachary Anderson ac16656161 Remove MIPS support
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2858623002 .
2017-06-22 08:49:22 -07:00
Ryan Macnak 1eee6d8af3 Mostly revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 9ab39ae099.

Keep removal of bad assert in loader.dart.  Keep using script snapshot in cross builds.

We expect to use a checked-in SDK in the Fuschia build instead.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2951133002 .
2017-06-21 15:19:21 -07:00
Ryan Macnak 9ab39ae099 Reapply "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
Add missing config to run_vm_tests.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2937503003 .
2017-06-13 08:49:00 -07:00
Ryan Macnak 3383c4ac25 Revert "[fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries."
This reverts commit 54e80a8c32.

Review-Url: https://codereview.chromium.org/2940513002 .
2017-06-12 15:19:23 -07:00
Ryan Macnak 54e80a8c32 [fuchsia] Prepare for setting the Dart target architecture appropriately in the host binaries.
Build another varient of dart_bootstrap targeting the host architecture to ensure reasonable Observatory build times.

Remove assert assuming a root script, which does not exist when gen_snapshot builds core snapshots.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2924173005 .
2017-06-12 14:33:10 -07:00
Sigmund Cherem ebdb0af64f Add integration test: hot reload + incremental compiler
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2925953002 .
2017-06-07 12:47:27 -07:00
Sigmund Cherem edd835c5bb Fix vm tests: introduce a hybrid file system so that the vm tests can find the
sdk files.

The reason the tests broke is that they use a memory-file-system which only
contains the test file and a mock .packages file.

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

Review-Url: https://codereview.chromium.org/2910473003 .
2017-05-25 12:25:15 -07:00
Jacob Richman 728f71f740 Ship dart2js output for dev_compiler/web in the sdk.
These tools are used to support applying source maps to stack traces
and running the Dart dev compiler in the browser as part of an extension.

This CL adds the following files
dart-sdk/lib/dev_compiler/web/ddc_web_compiler.js
dart-sdk/lib/dev_compiler/web/dart_stack_trace_mapper

BUG=
R=rmacnak@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2889253002 .
2017-05-19 13:21:53 -07:00
Alexander Aprelev b0c6a59731 Fix analyzer tests in checked mode.
BUG=
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2884023002 .
2017-05-15 10:25:59 -07:00
Alexander Aprelev 089a355766 Build up and pass MemoryFileSystem to fasta frontend.
Allow kernel service request to provide source files(filename, content), which will be used to build up MemoryFileSystem instance. MemoryFileSystem instance will be used instead of PhysicalFileSystem instance.

Immediate need for this is to support VM unit testing, where small Dart scripts that have to be parsed are hardcoded in the unit tests.

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

Review-Url: https://codereview.chromium.org/2880453005 .
2017-05-15 08:44:34 -07:00
Vijay Menon 96f9287c0b Regenerate DDC artifacts
I had to put --unsafe-force-compile back to get the snapshot to build.  Investigating...

TBR=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2873013003 .
2017-05-09 14:08:47 -07:00
Ryan Macnak 98d31056a7 Change build.py to be like ninja.py and only use a single GN/Ninja invocation to cross-build the SDK. This step alone would fix #29580. This breaks cross-building the SDK with GYP.
Remove hack in bin/snapshot_utils.cc that avoided building a true app-jit snapshot for ARM, ARM64 and MIPS because of the multiple invocations above.

Add GN flags to choose to build script snapshots instead of app-jit snapshots, avoiding a slow training run inside a simulator.

Fixes #29580.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2871713002 .
2017-05-08 13:06:09 -07:00
Sigmund Cherem de36d11817 Add support for building patched_sdk and platform.dill for dart2js:
- defines a .gn target for patched_dart2js_sdk
 - changes patch_sdk.dart to handle a dart2js target
 - adds support in fasta to understand the `native` clause still used by dart2js
 - add option to fasta to know whether it is generating kernel for the vm or dart2js

I'm not excited about how I added the target distinction in fasta, the reason I
did so is that it affects the behavior in several ways: in how we handle
`native`, in the libraries that are included by default in the platform.dill file,
and in the transformations that need to be done.  I'm happy to change the
approach.

BUG=
R=ahe@google.com, vegorov@google.com, zra@google.com

Committed: 714523b103
Review-Url: https://codereview.chromium.org/2832353002 .
2017-05-01 17:23:02 -07:00
Zachary Anderson c5751b27e0 [GN] Change a filesystem absolute path deps to be source absolute
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2856713003 .
2017-05-01 15:58:35 -07:00
Sigmund Cherem e9cd0b0fa5 Revert "Add support for building patched_sdk and platform.dill for dart2js:"
This reverts commit 714523b103.

TBR=ahe@google.com,vegorov@google.com

Review-Url: https://codereview.chromium.org/2849183002 .
2017-05-01 10:29:26 -07:00
Sigmund Cherem 714523b103 Add support for building patched_sdk and platform.dill for dart2js:
- defines a .gn target for patched_dart2js_sdk
 - changes patch_sdk.dart to handle a dart2js target
 - adds support in fasta to understand the `native` clause still used by dart2js
 - add option to fasta to know whether it is generating kernel for the vm or dart2js

I'm not excited about how I added the target distinction in fasta, the reason I
did so is that it affects the behavior in several ways: in how we handle
`native`, in the libraries that are included by default in the platform.dill file,
and in the transformations that need to be done.  I'm happy to change the
approach.

BUG=
R=ahe@google.com, vegorov@google.com

Review-Url: https://codereview.chromium.org/2832353002 .
2017-05-01 10:11:42 -07:00
Vijay Menon 75b7bea014 Snapshot DDC trained on itself
Note: path.canonicalize appears to normalize windows paths (c:/ vs c:\).

Fixes #29119

R=jmesserly@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2836483002 .
2017-04-21 16:19:57 -07:00
Jacob Richman 119b2d58ce Format all files under tools and utils directory.
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2827793002 .
2017-04-20 09:08:31 -07:00
Peter von der Ahé 2d9956a93d Move kernel baseline tests to front_end.
R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2825063002 .
2017-04-19 10:57:58 +02:00
William Hesse 011a5a6a66 Remove ie10 and opera sections from status files
BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2783653002 .
2017-03-28 16:38:59 +02:00
Vijay Menon 6854dec8a7 Revert "Train ddc snapshot on itself"
This reverts commit 1bd92d4f04.

Breaking on windows.

TBR=jakemac@google.com
BUG=

Review-Url: https://codereview.chromium.org/2762043002 .
2017-03-20 18:57:22 -07:00
Vijay Menon 1bd92d4f04 Train ddc snapshot on itself
This speeds up dartdevc on hello world from about 600ms to about 150ms.

OTOH, it also increases the snapshot size from ~4.6M to ~31M (the
latter is just under the size of the dart2js snapshot).

I tried this before.  This may break again on windows - if so, i'll revert.

R=jakemac@google.com

Review-Url: https://codereview.chromium.org/2760043002 .
2017-03-20 18:51:37 -07:00
Peter von der Ahé d1bdc9596d Improve detection of compile-time errors.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2739213004 .
2017-03-10 14:14:49 +01:00
Peter von der Ahé c19b49ff26 Move most of kernel-service.dart to package:front_end.
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2738253003 .
2017-03-10 13:10:28 +01:00
Peter von der Ahé 6176847e36 Consolidate analyzer dependencies.
This allows us to create a smaller .dill file for Fasta.

R=paulberry@google.com

Review-Url: https://codereview.chromium.org/2723113002 .
2017-03-02 12:59:47 +01:00
Peter von der Ahé c59ecd801c Remove package imports from itself.
Without this, we risk creating two different libraries at runtime. One
named file:///something/ and one named package:front_end/something.
These libraries are different and if enums from one gets mixed with
the other, you get very confusing errors (to apparently identical enums
aren't equal).

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2726793003 .
2017-03-02 12:34:46 +01:00
Vyacheslav Egorov 3b7a956e0c VM: [Kernel] Pass correct parameters to fasta's TranslateUri.parse.
Signature is TranslateUri.parse(Uri sdk, [Uri uri]) so path to the packages
file should be passed as a second argument and not the first one.

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2720693003 .
2017-02-27 14:00:54 +01:00
Vyacheslav Egorov b026aed3cf Remove dartk and DFE workers support from testing scripts and kernel-service.
We only support running -c dark and -c dartkp configuration through Kernel isolate and fasta in non-batch mode.

R=kustermann@google.com
BUG=

Review-Url: https://codereview.chromium.org/2721543003 .
2017-02-27 13:31:03 +01:00
Asger Feldthaus 8bfc4b47c0 Implement canonical name scheme in kernel.
This adds a class CanonicalName that can represent a library, class,
or member.  All references now go through a Reference object, which is
linked to both the AST node and its CanonicalName, so either can be
created first.

dartk now accepts multiple input files:
- If multiple dart files are given, they are all compiled.
- If multiple binaries are given, they are linked together.
Mixed dart and binary input is not supported by dartk.

dartk now has a flag --include-sdk which includes the entire SDK in
the output.  This is so the SDK can be compiled alone and then linked.

Example of compiling separately and then linking:
  dartk foo.dart -o foo.dill
  dartk main.dart -o main.dill
  dartk --include-sdk -o sdk.dill
  dartk main.dill foo.dill sdk.dill --target=vm --link -o program.dill

dartk still has incredibly slow cold start due to the analyzer loading
the dart sdk, so this does not actually speed things up at the moment.

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

Review-Url: https://codereview.chromium.org/2665723002 .
2017-02-23 14:12:10 +01:00
Vijay Menon 019e16a7ad Rerun format
Looks like I forgot to do this on my last cl.

TBR=jmesserly@google.com

Committed: 0c8704e1c7
Review-Url: https://codereview.chromium.org/2709613003 .
2017-02-21 16:07:01 -08:00
Vijay Menon e4733ac145 Train ddc snapshot on itself
This speeds up dartdevc on hello world from about 600ms to about 150ms.

OTOH, it also increases the snapshot size from ~4.6M to ~31M (the
latter is just under the size of the dart2js snapshot).

R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2707023002 .
2017-02-21 15:56:19 -08:00
Peter von der Ahé d32f47b293 Implement line and column numbers.
R=karlklose@google.com

Review-Url: https://codereview.chromium.org/2704753002 .
2017-02-20 10:04:12 +01:00
Martin Kustermann d93928a6ce Make dartk-{release,debug} builders work properly again
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2696613003 .
2017-02-14 14:01:58 +01:00
Peter von der Ahé c13730e8ea Pay some naming debt.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2682993002 .
2017-02-09 13:10:24 +01:00
Vyacheslav Egorov d5a11f3d34 [Kernel] Enable Kernel Isolate to use Fasta instead of DartK.
We are not switching yet, but now everybody can try fasta by doing:

$ dart -DDFE_USE_FASTA=true --dfe=utils/kernel-service.dart hello.dart

Note that when using fasta we expect that patched_sdk contains platform.dill
Kernel binary containing compiled patched sdk. This file can be obtained by
doing:

$ export DART_AOT_SDK=<path-to-patched_sdk>
$ dart pkg/front_end/lib/src/fasta/bin/compile_platform.dart \
  ${DART_AOT_SDK}/platform.dill

We are also adding --use-fasta to testing script to allow end-to-end testing
of fasta (though platform.dill file needs to be generated manually prior to
running tests):

$ tools/test.py -c dartk -m release -a x64 --nobatch --use-fasta

Current test status:

$ tools/test.py -c dartk -m release -a x64 --nobatch --use-fasta
[27:34 | 100% | +12566 | - 1941]

BUG=
R=ahe@google.com, kustermann@google.com

Review-Url: https://codereview.chromium.org/2684943003 .
2017-02-08 16:48:35 +01:00
Kevin Millikin 3057283f0c Split the Kernel transformations into modular and global ones
Target-specific modular transformations have to be able to cope with
external libraries.  Target-specific global transformations should be
optimizations, and not required for correctness, since a simple linker
may choose not to perform them.

Make mixin resolution modular by making it fail when a mixed-in class
comes from an external library.  (We cannot mix in such a class because
we do not necessarily have all class members.)

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2671653003 .
2017-02-02 13:08:27 +01:00
Ryan Macnak 9eb216a495 Reapply "Create an app snapshot of the Dart front end."
Skip training on Windows, issue #28532.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2665753002 .
2017-01-31 09:47:51 -08:00
Ryan Macnak 728f460798 Revert "Create an app snapshot of the Dart front end."
This reverts commit 8c7111c967.
This reverts commit 27c8e59d2e.

Review-Url: https://codereview.chromium.org/2657123002 .
2017-01-26 17:42:25 -08:00
Ryan Macnak 8c7111c967 Create an app snapshot of the Dart front end.
R=asiva@google.com, hausner@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2655173002 .
2017-01-26 16:28:59 -08:00
Ryan Macnak 26a364f998 Support spawnUri in app snapshots.
- Don't mark core_isolate_snapshot_buffer as a const pointer.
 - Update app snapshots without code to not rewrite the VM isolate snapshot, as already done by app snapshots with code.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2637193002 .
2017-01-17 15:59:41 -08:00
Ryan Macnak 12a3699301 Revert "Support spawnUri in app snapshots."
Failures on IA32.

This reverts commit c6ecfe1746.

Review-Url: https://codereview.chromium.org/2631893002 .
2017-01-13 15:52:36 -08:00
Ryan Macnak c6ecfe1746 Support spawnUri in app snapshots.
Don't mark core_isolate_snapshot_buffer as a const pointer.

Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2623423007 .
2017-01-13 15:18:27 -08:00
Ryan Macnak f89056f6cd Revert "Support spawnUri in app snapshots."
This reverts commit 593d4504b0.
This reverts commit 113aa64b98.
This reverts commit 422afa2ead.

Review-Url: https://codereview.chromium.org/2633543003 .
2017-01-13 11:02:44 -08:00
Ryan Macnak 593d4504b0 Support spawnUri in app snapshots.
Fixes #28368

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2628283002 .
2017-01-13 10:37:51 -08:00
Ryan Macnak 5062baffb6 Revert pub to script snapshots in the GN build. Fixes #28346.
App snapshots do not yet support spawnUri (issue #28368).

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2621423004 .
2017-01-12 13:07:29 -08:00
Zachary Anderson 7f55ad8b86 Fuchsia: Allows building the full SDK for host and target.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2571713004 .
2016-12-13 13:02:52 -08:00
Zachary Anderson ccfafee023 Make list_files.py and list_dart_files.py return absolute paths for GN
This makes doing an SDK build in the Fuchsia tree easier.

The previous attempt at this change failed in gyp builds targeting xcode.
They failed because input lists for actions of the same target (e.g. the
actions for dartanalyzer) are merged and de-duped when the lists contain
relative paths, but merged and *not* de-duped when the lists contain
absolute paths. gyp rejects xcode files that it generated itself
when they contain duplicate entries.

This CL works around that bug, by using absolute paths in the GN build
and keeping relative paths in the gyp build.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2567213002 .
2016-12-13 10:01:28 -08:00
Zachary Anderson b873e2b8e3 Revert "Make list_files.py and list_dart_files.py return absolute paths"
This reverts commit a858542c89.

mac gyp build fails.

Review-Url: https://codereview.chromium.org/2574523002 .
2016-12-12 13:14:53 -08:00
Zachary Anderson a858542c89 Make list_files.py and list_dart_files.py return absolute paths
This makes doing an SDK build in the Fuchsia tree easier

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2564413004 .
2016-12-12 13:09:26 -08:00
Ryan Macnak 13ba4b2710 When building app snapshots for the SDK, train dart2js on itself.
Don't train the analzyer on itself as this makes running the test suite slower.

Disable code collection when generating an app snapshot.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2509453002 .
2016-11-16 09:10:22 -08:00
Zachary Anderson 90d3962ca3 Don't depend on dart_bootstrap if there is a usable prebuilt sdk
Also replace invoke_dart() with compiled_action(), and some other
cleanups.

fixes #27781

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2493833002 .
2016-11-10 11:16:24 -08:00
Zachary Anderson e4e7e28c7f GN: Fix build
DDC needs another argument to make --help work.

R=vsm@google.com

Review URL: https://codereview.chromium.org/2480573002 .
2016-11-03 14:51:00 -07:00
Zachary Anderson f7799da7c5 GN: Fall back on dart_bootstrap where appropriate.
Review URL: https://codereview.chromium.org/2464153003 .
2016-11-01 12:59:36 -07:00
Zachary Anderson 8169499ef8 GN: Format more gn files
Missed these on the first pass.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2454703004 .
2016-10-27 04:25:34 -07:00
Zachary Anderson c1b08a0b97 GN: Try to fix Linux build on bots
Review URL: https://codereview.chromium.org/2449213003 .
2016-10-26 10:48:14 -07:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Zachary Anderson c39525802e GN: Fix build
GN is unhappy when a rule that consumes a file generated by
another rule doesn't depend directly on that rule.

This change also quiets output from invoking Dart to follow the
rule of GN builds that a successful build generates no output.

Review URL: https://codereview.chromium.org/2446473002 .
2016-10-22 00:05:39 -07:00
Ryan Macnak af7bf4dab0 GN: Build the SDK with app snapshots instead of script snapshots.
R=zra@google.com

Review URL: https://codereview.chromium.org/2442513003 .
2016-10-21 17:40:21 -07:00
Zachary Anderson ee21a2261d Use list_dart_files.py instead of list_files.py in GN build.
To track https://codereview.chromium.org/2391863002/ on the
gyp side, and use it in more places.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392253002 .
2016-10-05 07:50:40 -07:00
Zach Anderson 9a6797e6ba GN build on windows
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2385643004 .
2016-10-04 09:19:07 -07:00
Zachary Anderson 7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00
William Hesse 1f97819b25 Add --packages flag when compiling dart2js snapshot
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2368073004 .
2016-09-26 18:48:26 +02:00
William Hesse 79b682b885 Add explicit package spec to snapshot build steps
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2372573002 .
2016-09-26 15:52:31 +02:00
William Hesse 0695b1db3a Remove package root target and support scripts
BUG=https://github.com/dart-lang/sdk/issues/23565
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2346163005 .
2016-09-20 13:32:50 +02:00
Konstantin Shcheglov f4fdf25cb1 Fix dartanalyzer.gyp for SDK summary generation.
R=paulberry@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org/2341303004 .
2016-09-16 09:13:01 -07:00
William Hesse 61eee9ee52 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

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

Committed: 5d3e356ca7

Review URL: https://codereview.chromium.org/1746743002 .

Reverted: 6d238ba197
2016-09-16 15:03:18 +02:00
Konstantin Shcheglov fa24d1caaa Stop generating index information for SDK and simplify summary generation.
The implementation is still element model based, I will switch it to
the AST based approach in a following CL.

R=paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2345793002 .
2016-09-15 16:15:20 -07:00
William Hesse 6d238ba197 Revert "Use checked-in .package file for building and testing"
This reverts commit 5d3e356ca7.

BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2340813004 .
2016-09-15 15:46:49 +02:00
William Hesse 5d3e356ca7 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

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

Review URL: https://codereview.chromium.org/1746743002 .
2016-09-15 14:50:30 +02:00
John Messerly c1cde9600b use pkg/dev_compiler in the build 2016-08-31 18:05:17 -07:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Paul Berry b73e02db49 Add dev_compiler to the SDK build process.
Also update DEPS to bring the latest dev_compiler into the SDK.

This is a second attempt at
https://codereview.chromium.org/1777173003, with the following fixes:

- Added .bat files for Windows.

- Added missing dependency: create_sdk_internal depends on
  dartdevc.dart.snapshot.

- Used pkg_files.stamp to note the source code dependency for
  dartdevc, so that we don't go beyond xcodebuild's input length
  limit.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1818543002 .
2016-03-18 13:09:11 -07:00